From: Wesley W. Terpstra Date: Sat, 28 Oct 2017 19:29:31 +0000 (-0700) Subject: devices: switch to using node-style API (#44) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=90e6ea1d2da7114ade389cc43d82ae202bc18007;p=sifive-blocks.git devices: switch to using node-style API (#44) --- diff --git a/src/main/scala/devices/mockaon/MockAONPeriphery.scala b/src/main/scala/devices/mockaon/MockAONPeriphery.scala index 6bdf6d5..f7f563b 100644 --- a/src/main/scala/devices/mockaon/MockAONPeriphery.scala +++ b/src/main/scala/devices/mockaon/MockAONPeriphery.scala @@ -22,8 +22,8 @@ trait HasPeripheryMockAON extends HasPeripheryBus // are in the proper clock domain. val mockAONParams= p(PeripheryMockAONKey) val aon = LazyModule(new MockAONWrapper(pbus.beatBytes, mockAONParams)) - aon.node := pbus.toAsyncVariableWidthSlaves(sync = 3) - ibus.fromAsync := aon.intnode + aon.node := TLAsyncCrossingSource() := pbus.toVariableWidthSlaves + ibus.fromSync := IntSyncCrossingSink() := aon.intnode } trait HasPeripheryMockAONBundle { diff --git a/src/main/scala/devices/mockaon/MockAONWrapper.scala b/src/main/scala/devices/mockaon/MockAONWrapper.scala index 426c200..86e5f19 100644 --- a/src/main/scala/devices/mockaon/MockAONWrapper.scala +++ b/src/main/scala/devices/mockaon/MockAONWrapper.scala @@ -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 crossing = LazyModule(new TLAsyncCrossingSink(depth = 1)) - val node: TLAsyncInwardNode = isolation.node - crossing.node := isolation.node - aon.node := crossing.node + val node = aon.node := crossing.node := isolation.node // crossing lives outside in Periphery - val intnode: IntOutwardNode = aon.intnode + val intnode = IntSyncCrossingSource(alreadyRegistered = true) := aon.intnode lazy val module = new LazyModuleImp(this) { val io = IO(new MockAONWrapperBundle { diff --git a/src/main/scala/devices/spi/SPIPeriphery.scala b/src/main/scala/devices/spi/SPIPeriphery.scala index b2edb0f..dd76d15 100644 --- a/src/main/scala/devices/spi/SPIPeriphery.scala +++ b/src/main/scala/devices/spi/SPIPeriphery.scala @@ -41,10 +41,10 @@ trait HasPeripherySPIFlash extends HasPeripheryBus with HasInterruptBus { val qspis = spiFlashParams map { params => val qspi = LazyModule(new TLSPIFlash(pbus.beatBytes, params)) qspi.rnode := pbus.toVariableWidthSlaves - qspi.fnode := - TLFragmenter(1, pbus.blockBytes)( - TLBuffer(BufferParams(params.fBufferDepth), BufferParams.none)( - pbus.toFixedWidthSlaves)) + (qspi.fnode + := TLFragmenter(1, pbus.blockBytes) + := TLBuffer(BufferParams(params.fBufferDepth), BufferParams.none) + := pbus.toFixedWidthSlaves) ibus.fromSync := qspi.intnode qspi }