From 7c118790cb89a74d8a67d8d1f78fe07b5a71038e Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Mon, 12 Jun 2017 17:53:08 -0700 Subject: [PATCH] GPIO/SPI/I2C: Add sync stages in place of dummy variable since we need them and they are more useful. --- src/main/scala/devices/spi/SPIPeriphery.scala | 4 ++-- src/main/scala/devices/uart/UARTPeriphery.scala | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/devices/spi/SPIPeriphery.scala b/src/main/scala/devices/spi/SPIPeriphery.scala index e5cdd4e..bd77259 100644 --- a/src/main/scala/devices/spi/SPIPeriphery.scala +++ b/src/main/scala/devices/spi/SPIPeriphery.scala @@ -23,8 +23,8 @@ trait HasPeripherySPI extends HasSystemNetworks { trait HasPeripherySPIBundle { val spis: HeterogeneousBag[SPIPortIO] - def SPItoGPIOPins(dummy: Int = 1): Seq[SPIGPIOPort] = spis.map { s => - val pin = Module(new SPIGPIOPort(s.c)) + def SPItoGPIOPins(sync_stages: Int = 0): Seq[SPIGPIOPort] = spis.map { s => + val pin = Module(new SPIGPIOPort(s.c, sync_stages)) pin.io.spi <> s pin } diff --git a/src/main/scala/devices/uart/UARTPeriphery.scala b/src/main/scala/devices/uart/UARTPeriphery.scala index a0e83ff..05c4a33 100644 --- a/src/main/scala/devices/uart/UARTPeriphery.scala +++ b/src/main/scala/devices/uart/UARTPeriphery.scala @@ -29,8 +29,8 @@ trait HasPeripheryUARTBundle { uarts.foreach { _.rxd := UInt(1) } } - def UARTtoGPIOPins(dummy: Int = 1): Seq[UARTGPIOPort] = uarts.map { u => - val pin = Module(new UARTGPIOPort) + def UARTtoGPIOPins(sync_stages: Int = 0): Seq[UARTGPIOPort] = uarts.map { u => + val pin = Module(new UARTGPIOPort(sync_stages)) pin.io.uart <> u pin } -- 2.30.2