GPIO/SPI/I2C: Add sync stages in place of dummy variable since we need them and they are more useful.
This commit is contained in:
parent
d4bb8a77ea
commit
7c118790cb
@ -23,8 +23,8 @@ trait HasPeripherySPI extends HasSystemNetworks {
|
|||||||
trait HasPeripherySPIBundle {
|
trait HasPeripherySPIBundle {
|
||||||
val spis: HeterogeneousBag[SPIPortIO]
|
val spis: HeterogeneousBag[SPIPortIO]
|
||||||
|
|
||||||
def SPItoGPIOPins(dummy: Int = 1): Seq[SPIGPIOPort] = spis.map { s =>
|
def SPItoGPIOPins(sync_stages: Int = 0): Seq[SPIGPIOPort] = spis.map { s =>
|
||||||
val pin = Module(new SPIGPIOPort(s.c))
|
val pin = Module(new SPIGPIOPort(s.c, sync_stages))
|
||||||
pin.io.spi <> s
|
pin.io.spi <> s
|
||||||
pin
|
pin
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,8 @@ trait HasPeripheryUARTBundle {
|
|||||||
uarts.foreach { _.rxd := UInt(1) }
|
uarts.foreach { _.rxd := UInt(1) }
|
||||||
}
|
}
|
||||||
|
|
||||||
def UARTtoGPIOPins(dummy: Int = 1): Seq[UARTGPIOPort] = uarts.map { u =>
|
def UARTtoGPIOPins(sync_stages: Int = 0): Seq[UARTGPIOPort] = uarts.map { u =>
|
||||||
val pin = Module(new UARTGPIOPort)
|
val pin = Module(new UARTGPIOPort(sync_stages))
|
||||||
pin.io.uart <> u
|
pin.io.uart <> u
|
||||||
pin
|
pin
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user