coreplex: buses are now LazyModules with LazyScope
This commit is contained in:
		| @@ -53,7 +53,7 @@ trait HasFrontBus extends HasSystemBus { | ||||
|   private val frontbusParams = p(FrontBusKey) | ||||
|   val frontbusBeatBytes = frontbusParams.beatBytes | ||||
|  | ||||
|   val fbus = new FrontBus(frontbusParams) | ||||
|   val fbus = LazyModule(new FrontBus(frontbusParams)) | ||||
|  | ||||
|   sbus.fromFrontBus := fbus.toSystemBus | ||||
|  | ||||
|   | ||||
| @@ -66,7 +66,7 @@ trait HasMemoryBus extends HasSystemBus with HasPeripheryBus with HasInterruptBu | ||||
|   private val (in, out) = coherenceManager(p, this) | ||||
|   private val mask = ~BigInt((nBanks-1) * blockBytes) | ||||
|   val memBuses = Seq.tabulate(nMemoryChannels) { channel => | ||||
|     val mbus = new MemoryBus(mbusParams) | ||||
|     val mbus = LazyModule(new MemoryBus(mbusParams)) | ||||
|     for (bank <- 0 until nBanksPerChannel) { | ||||
|       val offset = (bank * nMemoryChannels) + channel | ||||
|       ForceFanout(a = true) { implicit p => in := sbus.toMemoryBus } | ||||
|   | ||||
| @@ -45,7 +45,7 @@ trait HasPeripheryBus extends HasSystemBus { | ||||
|   private val pbusParams = p(PeripheryBusKey) | ||||
|   val pbusBeatBytes = pbusParams.beatBytes | ||||
|  | ||||
|   val pbus = new PeripheryBus(pbusParams) | ||||
|   val pbus = LazyModule(new PeripheryBus(pbusParams)) | ||||
|  | ||||
|   // The peripheryBus hangs off of systemBus; here we convert TL-UH -> TL-UL | ||||
|   pbus.fromSystemBus := sbus.toPeripheryBus() | ||||
|   | ||||
| @@ -122,7 +122,7 @@ trait HasSystemBus extends HasInterruptBus { | ||||
|   private val sbusParams = p(SystemBusKey) | ||||
|   val sbusBeatBytes = sbusParams.beatBytes | ||||
|  | ||||
|   val sbus = new SystemBus(sbusParams) | ||||
|   val sbus = LazyModule(new SystemBus(sbusParams)) | ||||
|  | ||||
|   def sharedMemoryTLEdge: TLEdge = sbus.busView | ||||
|   def paddrBits: Int = sbus.busView.bundle.addressBits | ||||
|   | ||||
| @@ -21,7 +21,8 @@ trait TLBusParams { | ||||
|   def blockOffset: Int = log2Up(blockBytes) | ||||
| } | ||||
|  | ||||
| abstract class TLBusWrapper(params: TLBusParams, val busName: String)(implicit p: Parameters) extends TLBusParams { | ||||
| abstract class TLBusWrapper(params: TLBusParams, val busName: String)(implicit p: Parameters) | ||||
|     extends SimpleLazyModule with LazyScope with TLBusParams { | ||||
|  | ||||
|   val beatBytes = params.beatBytes | ||||
|   val blockBytes = params.blockBytes | ||||
|   | ||||
		Reference in New Issue
	
	Block a user