1
0

devices: switch to using node-style API (#44)

This commit is contained in:
Wesley W. Terpstra 2017-10-28 12:29:31 -07:00 committed by GitHub
parent e4960a4e5a
commit 90e6ea1d2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View File

@ -22,8 +22,8 @@ trait HasPeripheryMockAON extends HasPeripheryBus
// are in the proper clock domain. // are in the proper clock domain.
val mockAONParams= p(PeripheryMockAONKey) val mockAONParams= p(PeripheryMockAONKey)
val aon = LazyModule(new MockAONWrapper(pbus.beatBytes, mockAONParams)) val aon = LazyModule(new MockAONWrapper(pbus.beatBytes, mockAONParams))
aon.node := pbus.toAsyncVariableWidthSlaves(sync = 3) aon.node := TLAsyncCrossingSource() := pbus.toVariableWidthSlaves
ibus.fromAsync := aon.intnode ibus.fromSync := IntSyncCrossingSink() := aon.intnode
} }
trait HasPeripheryMockAONBundle { trait HasPeripheryMockAONBundle {

View File

@ -44,12 +44,10 @@ class MockAONWrapper(w: Int, c: MockAONParams)(implicit p: Parameters) extends L
val isolation = LazyModule(new TLIsolation(fOut = isoOut, fIn = isoIn)) val isolation = LazyModule(new TLIsolation(fOut = isoOut, fIn = isoIn))
val crossing = LazyModule(new TLAsyncCrossingSink(depth = 1)) val crossing = LazyModule(new TLAsyncCrossingSink(depth = 1))
val node: TLAsyncInwardNode = isolation.node val node = aon.node := crossing.node := isolation.node
crossing.node := isolation.node
aon.node := crossing.node
// crossing lives outside in Periphery // crossing lives outside in Periphery
val intnode: IntOutwardNode = aon.intnode val intnode = IntSyncCrossingSource(alreadyRegistered = true) := aon.intnode
lazy val module = new LazyModuleImp(this) { lazy val module = new LazyModuleImp(this) {
val io = IO(new MockAONWrapperBundle { val io = IO(new MockAONWrapperBundle {

View File

@ -41,10 +41,10 @@ trait HasPeripherySPIFlash extends HasPeripheryBus with HasInterruptBus {
val qspis = spiFlashParams map { params => val qspis = spiFlashParams map { params =>
val qspi = LazyModule(new TLSPIFlash(pbus.beatBytes, params)) val qspi = LazyModule(new TLSPIFlash(pbus.beatBytes, params))
qspi.rnode := pbus.toVariableWidthSlaves qspi.rnode := pbus.toVariableWidthSlaves
qspi.fnode := (qspi.fnode
TLFragmenter(1, pbus.blockBytes)( := TLFragmenter(1, pbus.blockBytes)
TLBuffer(BufferParams(params.fBufferDepth), BufferParams.none)( := TLBuffer(BufferParams(params.fBufferDepth), BufferParams.none)
pbus.toFixedWidthSlaves)) := pbus.toFixedWidthSlaves)
ibus.fromSync := qspi.intnode ibus.fromSync := qspi.intnode
qspi qspi
} }