rocketchip: top-level systems are now multi-IO modules
Cake pattern only 2 layers instead of 3. Standardized naming convention. Comments for periphery mix-ins. Testharnesses use new periphery helper methods.
This commit is contained in:
@ -9,13 +9,8 @@ import rocketchip._
|
||||
import util._
|
||||
|
||||
class TestHarness(implicit p: Parameters) extends Module {
|
||||
val io = new Bundle {
|
||||
val success = Bool(OUTPUT)
|
||||
}
|
||||
|
||||
val io = new Bundle { val success = Bool(OUTPUT) }
|
||||
val dut = Module(LazyModule(new GroundTestTop).module)
|
||||
io.success := dut.io.success
|
||||
|
||||
val channels = p(coreplex.BankedL2Config).nMemoryChannels
|
||||
if (channels > 0) Module(LazyModule(new SimAXIMem(channels)).module).io.axi4 <> dut.io.mem_axi4
|
||||
io.success := dut.io_success
|
||||
dut.connectSimAXIMem()
|
||||
}
|
||||
|
@ -3,15 +3,14 @@
|
||||
package groundtest
|
||||
|
||||
import Chisel._
|
||||
import config._
|
||||
import diplomacy._
|
||||
import coreplex._
|
||||
import config.Parameters
|
||||
import diplomacy.LazyModule
|
||||
import rocketchip._
|
||||
|
||||
class GroundTestTop(implicit p: Parameters) extends BaseTop
|
||||
with PeripheryMasterAXI4Mem
|
||||
with PeripheryTestRAM {
|
||||
override lazy val module = new GroundTestTopModule(this, () => new GroundTestTopBundle(this))
|
||||
class GroundTestTop(implicit p: Parameters) extends BaseSystem
|
||||
with HasPeripheryMasterAXI4MemPort
|
||||
with HasPeripheryTestRAMSlave {
|
||||
override lazy val module = new GroundTestTopModule(this)
|
||||
|
||||
val coreplex = LazyModule(new GroundTestCoreplex)
|
||||
|
||||
@ -20,14 +19,8 @@ class GroundTestTop(implicit p: Parameters) extends BaseTop
|
||||
(mem zip coreplex.mem) foreach { case (xbar, channel) => xbar.node :=* channel }
|
||||
}
|
||||
|
||||
class GroundTestTopBundle[+L <: GroundTestTop](_outer: L) extends BaseTopBundle(_outer)
|
||||
with PeripheryMasterAXI4MemBundle
|
||||
with PeripheryTestRAMBundle {
|
||||
val success = Bool(OUTPUT)
|
||||
}
|
||||
|
||||
class GroundTestTopModule[+L <: GroundTestTop, +B <: GroundTestTopBundle[L]](_outer: L, _io: () => B) extends BaseTopModule(_outer, _io)
|
||||
with PeripheryMasterAXI4MemModule
|
||||
with PeripheryTestRAMModule {
|
||||
io.success := outer.coreplex.module.io.success
|
||||
class GroundTestTopModule[+L <: GroundTestTop](_outer: L) extends BaseSystemModule(_outer)
|
||||
with HasPeripheryMasterAXI4MemPortModuleImp {
|
||||
val io_success = IO(Bool(OUTPUT))
|
||||
io_success := outer.coreplex.module.io.success
|
||||
}
|
||||
|
Reference in New Issue
Block a user