X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmain%2Fscala%2Fdevices%2Fuart%2FUARTPeriphery.scala;h=105592d2042e7a6f19d265d37c45f3e5ff771c46;hb=06f0d2074237f3fa23275446f1ee74614e61f96e;hp=d94d5180941502ff3e3bc0f872d248f582c973d0;hpb=00086c26e6601fef104623af301caa3facd9b80c;p=sifive-blocks.git diff --git a/src/main/scala/devices/uart/UARTPeriphery.scala b/src/main/scala/devices/uart/UARTPeriphery.scala index d94d518..105592d 100644 --- a/src/main/scala/devices/uart/UARTPeriphery.scala +++ b/src/main/scala/devices/uart/UARTPeriphery.scala @@ -44,6 +44,9 @@ 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 fromUARTPort(uart: UARTPortIO, clock: Clock, reset: Bool, syncStages: Int = 0) { withClockAndReset(clock, reset) { txd.outputPin(uart.txd)