X-Git-Url: https://git.libre-soc.org/?p=sifive-blocks.git;a=blobdiff_plain;f=src%2Fmain%2Fscala%2Fdevices%2Fuart%2FUARTPeriphery.scala;h=95d0c3b4bdb7d7d65345f3990c1e65d9893dd723;hp=de4392c8860ed9d2e07f40dea243fbb91ccb9a83;hb=38f537c438224418356c1ef6979c482841a0da4c;hpb=6a13639cf3e64acf4a672daa0c895e4919d4a6dc diff --git a/src/main/scala/devices/uart/UARTPeriphery.scala b/src/main/scala/devices/uart/UARTPeriphery.scala index de4392c..95d0c3b 100644 --- a/src/main/scala/devices/uart/UARTPeriphery.scala +++ b/src/main/scala/devices/uart/UARTPeriphery.scala @@ -4,10 +4,8 @@ package sifive.blocks.devices.uart import Chisel._ import chisel3.experimental.{withClockAndReset} import freechips.rocketchip.config.Field -import freechips.rocketchip.util.SyncResetSynchronizerShiftReg import freechips.rocketchip.coreplex.{HasPeripheryBus, PeripheryBusKey, HasInterruptBus} import freechips.rocketchip.diplomacy.{LazyModule, LazyMultiIOModuleImp} -import sifive.blocks.devices.pinctrl.{Pin} case object PeripheryUARTKey extends Field[Seq[UARTParams]] @@ -39,20 +37,3 @@ trait HasPeripheryUARTModuleImp extends LazyMultiIOModuleImp with HasPeripheryUA io <> device.module.io.port } } - -class UARTPins[T <: Pin] (pingen: () => T) extends Bundle { - val rxd = pingen() - val txd = pingen() - - override def cloneType: this.type = - this.getClass.getConstructors.head.newInstance(pingen).asInstanceOf[this.type] - - def fromPort(uart: UARTPortIO, clock: Clock, reset: Bool, syncStages: Int = 0) { - withClockAndReset(clock, reset) { - txd.outputPin(uart.txd) - val rxd_t = rxd.inputPin() - uart.rxd := SyncResetSynchronizerShiftReg(rxd_t, syncStages, init = Bool(true), name = Some("uart_rxd_sync")) - } - } -} -