coreplex: TileSlavePortParams inject adapters into PBus
This commit is contained in:
parent
660355004e
commit
8f5f80f958
@ -31,6 +31,30 @@ class PeripheryBus(params: PeripheryBusParams)(implicit p: Parameters) extends T
|
|||||||
TLFragmenter(params.beatBytes, maxXferBytes)(outwardBufNode)
|
TLFragmenter(params.beatBytes, maxXferBytes)(outwardBufNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def toSyncSlaves(adapt: () => TLNodeChain, name: Option[String]): TLOutwardNode = SinkCardinality { implicit p =>
|
||||||
|
val adapters = adapt()
|
||||||
|
adapters.in :=? outwardBufNode
|
||||||
|
adapters.out
|
||||||
|
}
|
||||||
|
|
||||||
|
def toAsyncSlaves(sync: Int, adapt: () => TLNodeChain, name: Option[String]): TLAsyncOutwardNode = SinkCardinality { implicit p =>
|
||||||
|
val adapters = adapt()
|
||||||
|
val source = LazyModule(new TLAsyncCrossingSource(sync))
|
||||||
|
name.foreach{ n => source.suggestName(s"${busName}_${n}_TLAsyncCrossingSource")}
|
||||||
|
adapters.in :=? outwardNode
|
||||||
|
source.node :=? adapters.out
|
||||||
|
source.node
|
||||||
|
}
|
||||||
|
|
||||||
|
def toRationalSlaves(adapt: () => TLNodeChain, name: Option[String]): TLRationalOutwardNode = SinkCardinality { implicit p =>
|
||||||
|
val adapters = adapt()
|
||||||
|
val source = LazyModule(new TLRationalCrossingSource())
|
||||||
|
name.foreach{ n => source.suggestName(s"${busName}_${n}_TLRationalCrossingSource")}
|
||||||
|
adapters.in :=? outwardNode
|
||||||
|
source.node :=? adapters.out
|
||||||
|
source.node
|
||||||
|
}
|
||||||
|
|
||||||
val fromSystemBus: TLInwardNode = {
|
val fromSystemBus: TLInwardNode = {
|
||||||
val atomics = LazyModule(new TLAtomicAutomata(arithmetic = params.arithmetic))
|
val atomics = LazyModule(new TLAtomicAutomata(arithmetic = params.arithmetic))
|
||||||
inwardBufNode := atomics.node
|
inwardBufNode := atomics.node
|
||||||
|
@ -109,19 +109,19 @@ trait HasRocketTiles extends HasTiles
|
|||||||
case SynchronousCrossing(params) => {
|
case SynchronousCrossing(params) => {
|
||||||
val wrapper = LazyModule(new SyncRocketTile(tp)(pWithExtra))
|
val wrapper = LazyModule(new SyncRocketTile(tp)(pWithExtra))
|
||||||
sbus.fromSyncTiles(params, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
sbus.fromSyncTiles(params, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
||||||
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toSyncSlaves(tp.name, crossing.slave.addBuffers) }
|
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toSyncSlaves(crossing.slave.adapterChain(this), tp.name) }
|
||||||
wrapper
|
wrapper
|
||||||
}
|
}
|
||||||
case AsynchronousCrossing(depth, sync) => {
|
case AsynchronousCrossing(depth, sync) => {
|
||||||
val wrapper = LazyModule(new AsyncRocketTile(tp)(pWithExtra))
|
val wrapper = LazyModule(new AsyncRocketTile(tp)(pWithExtra))
|
||||||
sbus.fromAsyncTiles(depth, sync, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
sbus.fromAsyncTiles(depth, sync, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
||||||
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toAsyncSlaves(sync, tp.name, crossing.slave.addBuffers) }
|
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toAsyncSlaves(sync, crossing.slave.adapterChain(this), tp.name) }
|
||||||
wrapper
|
wrapper
|
||||||
}
|
}
|
||||||
case RationalCrossing(direction) => {
|
case RationalCrossing(direction) => {
|
||||||
val wrapper = LazyModule(new RationalRocketTile(tp)(pWithExtra))
|
val wrapper = LazyModule(new RationalRocketTile(tp)(pWithExtra))
|
||||||
sbus.fromRationalTiles(direction, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
sbus.fromRationalTiles(direction, crossing.master.adapterChain(this), tp.name) :=* wrapper.masterNode
|
||||||
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toRationalSlaves(tp.name, crossing.slave.addBuffers) }
|
FlipRendering { implicit p => wrapper.slaveNode :*= pbus.toRationalSlaves(crossing.slave.adapterChain(this), tp.name) }
|
||||||
wrapper
|
wrapper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user