[rocketchip] split out Base and Example tops
This commit is contained in:
parent
7ff7076dab
commit
7b8aa6c839
@ -81,30 +81,3 @@ class BaseTopModule[+L <: BaseTop, +B <: BaseTopBundle](val p: Parameters, l: L,
|
|||||||
println(p(ConfigString))
|
println(p(ConfigString))
|
||||||
ConfigStringOutput.contents = Some(p(ConfigString))
|
ConfigStringOutput.contents = Some(p(ConfigString))
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Example Top with Periphery */
|
|
||||||
class ExampleTop(q: Parameters) extends BaseTop(q)
|
|
||||||
with PeripheryBootROM with PeripheryDebug with PeripheryExtInterrupts with PeripheryCoreplexLocalInterrupter
|
|
||||||
with PeripheryMasterMem with PeripheryMasterMMIO with PeripherySlave {
|
|
||||||
override lazy val module = Module(new ExampleTopModule(p, this, new ExampleTopBundle(p, _)))
|
|
||||||
}
|
|
||||||
|
|
||||||
class ExampleTopBundle(p: Parameters, c: Coreplex) extends BaseTopBundle(p, c)
|
|
||||||
with PeripheryBootROMBundle with PeripheryDebugBundle with PeripheryExtInterruptsBundle with PeripheryCoreplexLocalInterrupterBundle
|
|
||||||
with PeripheryMasterMemBundle with PeripheryMasterMMIOBundle with PeripherySlaveBundle
|
|
||||||
|
|
||||||
class ExampleTopModule[+L <: ExampleTop, +B <: ExampleTopBundle](p: Parameters, l: L, b: Coreplex => B) extends BaseTopModule(p, l, b)
|
|
||||||
with PeripheryBootROMModule with PeripheryDebugModule with PeripheryExtInterruptsModule with PeripheryCoreplexLocalInterrupterModule
|
|
||||||
with PeripheryMasterMemModule with PeripheryMasterMMIOModule with PeripherySlaveModule
|
|
||||||
|
|
||||||
/** Example Top with TestRAM */
|
|
||||||
class ExampleTopWithTestRAM(q: Parameters) extends ExampleTop(q)
|
|
||||||
with PeripheryTestRAM {
|
|
||||||
override lazy val module = Module(new ExampleTopWithTestRAMModule(p, this, new ExampleTopWithTestRAMBundle(p, _)))
|
|
||||||
}
|
|
||||||
|
|
||||||
class ExampleTopWithTestRAMBundle(p: Parameters, c: Coreplex) extends ExampleTopBundle(p, c)
|
|
||||||
with PeripheryTestRAMBundle
|
|
||||||
|
|
||||||
class ExampleTopWithTestRAMModule[+L <: ExampleTopWithTestRAM, +B <: ExampleTopWithTestRAMBundle](p: Parameters, l: L, b: Coreplex => B) extends ExampleTopModule(p, l, b)
|
|
||||||
with PeripheryTestRAMModule
|
|
35
src/main/scala/rocketchip/ExampleTop.scala
Normal file
35
src/main/scala/rocketchip/ExampleTop.scala
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// See LICENSE for license details.
|
||||||
|
|
||||||
|
package rocketchip
|
||||||
|
|
||||||
|
import Chisel._
|
||||||
|
import cde.{Parameters, Field}
|
||||||
|
import coreplex.Coreplex
|
||||||
|
import rocketchip._
|
||||||
|
|
||||||
|
/** Example Top with Periphery */
|
||||||
|
class ExampleTop(q: Parameters) extends BaseTop(q)
|
||||||
|
with PeripheryBootROM with PeripheryDebug with PeripheryExtInterrupts with PeripheryCoreplexLocalInterrupter
|
||||||
|
with PeripheryMasterMem with PeripheryMasterMMIO with PeripherySlave {
|
||||||
|
override lazy val module = Module(new ExampleTopModule(p, this, new ExampleTopBundle(p, _)))
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExampleTopBundle(p: Parameters, c: Coreplex) extends BaseTopBundle(p, c)
|
||||||
|
with PeripheryBootROMBundle with PeripheryDebugBundle with PeripheryExtInterruptsBundle with PeripheryCoreplexLocalInterrupterBundle
|
||||||
|
with PeripheryMasterMemBundle with PeripheryMasterMMIOBundle with PeripherySlaveBundle
|
||||||
|
|
||||||
|
class ExampleTopModule[+L <: ExampleTop, +B <: ExampleTopBundle](p: Parameters, l: L, b: Coreplex => B) extends BaseTopModule(p, l, b)
|
||||||
|
with PeripheryBootROMModule with PeripheryDebugModule with PeripheryExtInterruptsModule with PeripheryCoreplexLocalInterrupterModule
|
||||||
|
with PeripheryMasterMemModule with PeripheryMasterMMIOModule with PeripherySlaveModule
|
||||||
|
|
||||||
|
/** Example Top with TestRAM */
|
||||||
|
class ExampleTopWithTestRAM(q: Parameters) extends ExampleTop(q)
|
||||||
|
with PeripheryTestRAM {
|
||||||
|
override lazy val module = Module(new ExampleTopWithTestRAMModule(p, this, new ExampleTopWithTestRAMBundle(p, _)))
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExampleTopWithTestRAMBundle(p: Parameters, c: Coreplex) extends ExampleTopBundle(p, c)
|
||||||
|
with PeripheryTestRAMBundle
|
||||||
|
|
||||||
|
class ExampleTopWithTestRAMModule[+L <: ExampleTopWithTestRAM, +B <: ExampleTopWithTestRAMBundle](p: Parameters, l: L, b: Coreplex => B) extends ExampleTopModule(p, l, b)
|
||||||
|
with PeripheryTestRAMModule
|
Loading…
Reference in New Issue
Block a user