From: Megan Wachs Date: Mon, 24 Jul 2017 16:17:53 +0000 (-0700) Subject: Merge remote-tracking branch 'origin/master' into typed_pad_ctrl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0a80d1987d35046858c36a4fa462410b54a126f0;p=sifive-blocks.git Merge remote-tracking branch 'origin/master' into typed_pad_ctrl --- 0a80d1987d35046858c36a4fa462410b54a126f0 diff --cc src/main/scala/devices/gpio/GPIOPeriphery.scala index cd658f1,109ffb8..d3b9cf5 --- a/src/main/scala/devices/gpio/GPIOPeriphery.scala +++ b/src/main/scala/devices/gpio/GPIOPeriphery.scala @@@ -10,12 -9,12 +9,12 @@@ import freechips.rocketchip.util.Hetero case object PeripheryGPIOKey extends Field[Seq[GPIOParams]] - trait HasPeripheryGPIO extends HasSystemNetworks { + trait HasPeripheryGPIO extends HasPeripheryBus with HasInterruptBus { val gpioParams = p(PeripheryGPIOKey) - val gpios = gpioParams map {params => - val gpio = LazyModule(new TLGPIO(peripheryBusBytes, params)) - gpio.node := TLFragmenter(peripheryBusBytes, cacheBlockBytes)(peripheryBus.node) - intBus.intnode := gpio.intnode - val gpio = gpioParams map { params => ++ val gpios = gpioParams map { params => + val gpio = LazyModule(new TLGPIO(pbus.beatBytes, params)) + gpio.node := pbus.toVariableWidthSlaves + ibus.fromSync := gpio.intnode gpio } } diff --cc src/main/scala/devices/pwm/PWMPeriphery.scala index f83cbaf,5ff9ccf..ff5b6bb --- a/src/main/scala/devices/pwm/PWMPeriphery.scala +++ b/src/main/scala/devices/pwm/PWMPeriphery.scala @@@ -3,11 -3,10 +3,10 @@@ package sifive.blocks.devices.pw import Chisel._ import freechips.rocketchip.config.Field - import freechips.rocketchip.diplomacy.{LazyModule,LazyMultiIOModuleImp} - import freechips.rocketchip.chip.HasSystemNetworks - import freechips.rocketchip.tilelink.TLFragmenter + import freechips.rocketchip.coreplex.{HasPeripheryBus, HasInterruptBus} + import freechips.rocketchip.diplomacy.{LazyModule, LazyMultiIOModuleImp} import freechips.rocketchip.util.HeterogeneousBag - import sifive.blocks.devices.pinctrl.{PinCtrl, Pin} -import sifive.blocks.devices.gpio._ ++import sifive.blocks.devices.pinctrl.{Pin} class PWMPortIO(val c: PWMParams) extends Bundle { val port = Vec(c.ncmp, Bool()).asOutput diff --cc src/main/scala/devices/spi/SPIPeriphery.scala index f2b3b41,37151bd..8097894 --- a/src/main/scala/devices/spi/SPIPeriphery.scala +++ b/src/main/scala/devices/spi/SPIPeriphery.scala @@@ -36,13 -41,13 +36,13 @@@ trait HasPeripherySPIModuleImp extends case object PeripherySPIFlashKey extends Field[Seq[SPIFlashParams]] - trait HasPeripherySPIFlash extends HasSystemNetworks { + trait HasPeripherySPIFlash extends HasPeripheryBus with HasInterruptBus { val spiFlashParams = p(PeripherySPIFlashKey) - val qspi = spiFlashParams map { params => + val qspis = spiFlashParams map { params => - val qspi = LazyModule(new TLSPIFlash(peripheryBusBytes, params)) - qspi.rnode := TLFragmenter(peripheryBusBytes, cacheBlockBytes)(peripheryBus.node) - qspi.fnode := TLFragmenter(1, cacheBlockBytes)(TLWidthWidget(peripheryBusBytes)(peripheryBus.node)) - intBus.intnode := qspi.intnode + val qspi = LazyModule(new TLSPIFlash(pbus.beatBytes, params)) + qspi.rnode := pbus.toVariableWidthSlaves + qspi.fnode := TLFragmenter(1, pbus.blockBytes)(pbus.toFixedWidthSlaves) + ibus.fromSync := qspi.intnode qspi } } diff --cc src/main/scala/devices/uart/UARTPeriphery.scala index 105592d,c925a38..d42850f --- a/src/main/scala/devices/uart/UARTPeriphery.scala +++ b/src/main/scala/devices/uart/UARTPeriphery.scala @@@ -2,12 -2,10 +2,11 @@@ package sifive.blocks.devices.uart import Chisel._ +import chisel3.experimental.{withClockAndReset} import freechips.rocketchip.config.Field + import freechips.rocketchip.coreplex.{HasPeripheryBus, HasInterruptBus} import freechips.rocketchip.diplomacy.{LazyModule, LazyMultiIOModuleImp} - import freechips.rocketchip.chip.HasSystemNetworks - import freechips.rocketchip.tilelink.TLFragmenter - import sifive.blocks.devices.pinctrl.{Pin, PinCtrl} -import sifive.blocks.devices.gpio.{GPIOPin, GPIOOutputPinCtrl, GPIOInputPinCtrl} ++import sifive.blocks.devices.pinctrl.{Pin} import sifive.blocks.util.ShiftRegisterInit case object PeripheryUARTKey extends Field[Seq[UARTParams]]