GPIO/SPI/I2C: Add sync stages in place of dummy variable since we need them and they...
authorMegan Wachs <megan@sifive.com>
Tue, 13 Jun 2017 00:53:08 +0000 (17:53 -0700)
committerMegan Wachs <megan@sifive.com>
Tue, 13 Jun 2017 00:53:08 +0000 (17:53 -0700)
src/main/scala/devices/spi/SPIPeriphery.scala
src/main/scala/devices/uart/UARTPeriphery.scala

index e5cdd4e8a42bdef874352fab290004bdce148b56..bd77259dad2577e205c3e13b371c0699f88c14c2 100644 (file)
@@ -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
   }
index a0e83ffffed8515b5ca546070a8ea3c18bc0db50..05c4a33890e13280f646b40cd5f242ad599f82b6 100644 (file)
@@ -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
   }