litex/misoclib/com/uart/phy/__init__.py

13 lines
411 B
Python
Raw Normal View History

2015-03-06 04:19:29 -05:00
from misoclib.com.liteeth.common import *
from misoclib.com.liteeth.generic import *
2015-04-13 10:47:22 -04:00
2015-03-06 04:19:29 -05:00
def UARTPHY(pads, *args, **kwargs):
# Autodetect PHY
if hasattr(pads, "source_stb"):
from misoclib.com.uart.phy.sim import UARTPHYSim
return UARTPHYSim(pads, *args, **kwargs)
else:
from misoclib.com.uart.phy.serial import UARTPHYSerial
return UARTPHYSerial(pads, *args, **kwargs)