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
}
}
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
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
}
}
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]]