// level, and we have to do the pinmux
// outside of RocketChipTop.
-class GPIOPortIO(val c: GPIOParams) extends Bundle {
+class GPIOPortIO(private val c: GPIOParams) extends Bundle {
val pins = Vec(c.width, new EnhancedPin())
val iof_0 = if (c.includeIOF) Some(Vec(c.width, new IOFPin).flip) else None
val iof_1 = if (c.includeIOF) Some(Vec(c.width, new IOFPin).flip) else None
// even though it looks like something that more directly talks to
// a pin. It also makes it possible to change the exact
// type of pad this connects to.
-class GPIOSignals[T <: Data](private val pingen: ()=> T, val c: GPIOParams) extends Bundle {
+class GPIOSignals[T <: Data](private val pingen: () => T, private val c: GPIOParams) extends Bundle {
val pins = Vec(c.width, pingen())
}
-class GPIOPins[T <: Pin](pingen: ()=> T, c: GPIOParams) extends GPIOSignals[T](pingen, c)
+class GPIOPins[T <: Pin](pingen: () => T, c: GPIOParams) extends GPIOSignals[T](pingen, c)
object GPIOPinsFromPort {
import Chisel._
-abstract class SPIBundle(val c: SPIParamsBase) extends Bundle
+abstract class SPIBundle(private val c: SPIParamsBase) extends Bundle
class SPIDataIO extends Bundle {
val i = Bool(INPUT)
import chisel3.experimental.{withClockAndReset}
import sifive.blocks.devices.pinctrl.{PinCtrl, Pin}
-class SPISignals[T <: Data](val pingen: ()=> T, c: SPIParamsBase) extends SPIBundle(c) {
+class SPISignals[T <: Data](private val pingen: () => T, c: SPIParamsBase) extends SPIBundle(c) {
val sck = pingen()
val dq = Vec(4, pingen())
import freechips.rocketchip.regmapper._
import freechips.rocketchip.util.WideCounter
-class SlaveRegIF(val w: Int) extends Bundle {
+class SlaveRegIF(private val w: Int) extends Bundle {
val write = Valid(UInt(width = w)).flip
val read = UInt(OUTPUT, w)