Updates to Freedom SoCs
[freedom-sifive.git] / src / main / scala / everywhere / e300artydevkit / System.scala
1 // See LICENSE for license details.
2 package sifive.freedom.everywhere.e300artydevkit
3
4 import Chisel._
5
6 import freechips.rocketchip.config._
7 import freechips.rocketchip.coreplex._
8 import freechips.rocketchip.devices.debug._
9 import freechips.rocketchip.devices.tilelink._
10 import freechips.rocketchip.diplomacy._
11 import freechips.rocketchip.system._
12
13 import sifive.blocks.devices.mockaon._
14 import sifive.blocks.devices.gpio._
15 import sifive.blocks.devices.pwm._
16 import sifive.blocks.devices.spi._
17 import sifive.blocks.devices.uart._
18 import sifive.blocks.devices.i2c._
19
20 //-------------------------------------------------------------------------
21 // E300ArtyDevKitSystem
22 //-------------------------------------------------------------------------
23
24 class E300ArtyDevKitSystem(implicit p: Parameters) extends RocketCoreplex
25 with HasPeripheryMaskROMSlave
26 with HasPeripheryDebug
27 with HasPeripheryMockAON
28 with HasPeripheryUART
29 with HasPeripherySPIFlash
30 with HasPeripherySPI
31 with HasPeripheryGPIO
32 with HasPeripheryPWM
33 with HasPeripheryI2C {
34 override lazy val module = new E300ArtyDevKitSystemModule(this)
35 }
36
37 class E300ArtyDevKitSystemModule[+L <: E300ArtyDevKitSystem](_outer: L)
38 extends RocketCoreplexModule(_outer)
39 with HasPeripheryDebugModuleImp
40 with HasPeripheryUARTModuleImp
41 with HasPeripherySPIModuleImp
42 with HasPeripheryGPIOModuleImp
43 with HasPeripherySPIFlashModuleImp
44 with HasPeripheryMockAONModuleImp
45 with HasPeripheryPWMModuleImp
46 with HasPeripheryI2CModuleImp {
47 // Reset vector is set to the location of the mask rom
48 val maskROMParams = p(PeripheryMaskROMKey)
49 global_reset_vector := maskROMParams(0).address.U
50 }