2015-03-06 04:19:29 -05:00
|
|
|
from misoclib.com.liteeth.common import *
|
|
|
|
from misoclib.com.liteeth.generic import *
|
|
|
|
|
|
|
|
def UARTPHY(pads, *args, **kwargs):
|
2015-04-13 10:19:55 -04:00
|
|
|
# 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)
|