import Chisel._
import chisel3.experimental.{withClockAndReset}
+import freechips.rocketchip.util.ShiftRegInit
import sifive.blocks.devices.pinctrl.{Pin, PinCtrl}
-import sifive.blocks.util.ShiftRegisterInit
-
class I2CPins[T <: Pin](pingen: () => T) extends Bundle {
withClockAndReset(clock, reset) {
scl.outputPin(i2c.scl.out, pue=true.B, ie = true.B)
scl.o.oe := i2c.scl.oe
- i2c.scl.in := ShiftRegisterInit(scl.i.ival, syncStages, Bool(true))
+ i2c.scl.in := ShiftRegInit(scl.i.ival, syncStages, init = Bool(true))
sda.outputPin(i2c.sda.out, pue=true.B, ie = true.B)
sda.o.oe := i2c.sda.oe
- i2c.sda.in := ShiftRegisterInit(sda.i.ival, syncStages, Bool(true))
+ i2c.sda.in := ShiftRegInit(sda.i.ival, syncStages, init = Bool(true))
}
}
}
import Chisel._
import freechips.rocketchip.config.Field
+import freechips.rocketchip.util.SynchronizerShiftReg
import freechips.rocketchip.coreplex.{HasPeripheryBus, HasInterruptBus}
import freechips.rocketchip.devices.debug.HasPeripheryDebug
import freechips.rocketchip.devices.tilelink.HasPeripheryClint
outer.aon.module.reset := Bool(true)
// Synchronize the external toggle into the clint
- val rtc_sync = ShiftRegister(outer.aon.module.io.rtc.asUInt.toBool, 3)
+ val rtc_sync = SynchronizerShiftReg(outer.aon.module.io.rtc.asUInt.toBool, 3, Some("rtc"))
val rtc_last = Reg(init = Bool(false), next=rtc_sync)
val rtc_tick = Reg(init = Bool(false), next=(rtc_sync & (~rtc_last)))
package sifive.blocks.devices.spi
import Chisel._
-import sifive.blocks.util.ShiftRegisterInit
+import freechipchips.rocketchip.util.ShiftRegInit
class SPIMicroOp(c: SPIParamsBase) extends SPIBundle(c) {
val fn = Bits(width = 1)
val last = Wire(init = Bool(false))
// Delayed versions
val setup_d = Reg(next = setup)
- val sample_d = ShiftRegisterInit(sample, c.sampleDelay, Bool(false))
- val last_d = ShiftRegisterInit(last, c.sampleDelay, Bool(false))
+ val sample_d = ShiftRegInit(sample, c.sampleDelay, init = Bool(false))
+ val last_d = ShiftRegInit(last, c.sampleDelay, init = Bool(false))
val scnt = Reg(init = UInt(0, c.countBits))
val tcnt = Reg(io.ctrl.sck.div)
import Chisel._
import chisel3.experimental.{withClockAndReset}
import freechips.rocketchip.config.Field
+import freechips.rocketchip.util.ShiftRegInit
import freechips.rocketchip.coreplex.{HasPeripheryBus, PeripheryBusParams, HasInterruptBus}
import freechips.rocketchip.diplomacy.{LazyModule, LazyMultiIOModuleImp}
import sifive.blocks.devices.pinctrl.{Pin}
-import sifive.blocks.util.ShiftRegisterInit
case object PeripheryUARTKey extends Field[Seq[UARTParams]]
withClockAndReset(clock, reset) {
txd.outputPin(uart.txd)
val rxd_t = rxd.inputPin()
- uart.rxd := ShiftRegisterInit(rxd_t, syncStages, Bool(true))
+ uart.rxd := ShiftRegInit(rxd_t, n = syncStages, init = Bool(true))
}
}
}