liteeth/phy/__init__.py: add more comments
This commit is contained in:
parent
4abe8e1d9e
commit
bc81d9d639
|
@ -4,6 +4,7 @@ from misoclib.com.liteeth.generic import *
|
||||||
def LiteEthPHY(clock_pads, pads, **kwargs):
|
def LiteEthPHY(clock_pads, pads, **kwargs):
|
||||||
# Autodetect PHY
|
# Autodetect PHY
|
||||||
if hasattr(pads, "source_stb"):
|
if hasattr(pads, "source_stb"):
|
||||||
|
# This is a simulation PHY
|
||||||
from misoclib.com.liteeth.phy.sim import LiteEthPHYSim
|
from misoclib.com.liteeth.phy.sim import LiteEthPHYSim
|
||||||
return LiteEthPHYSim(pads)
|
return LiteEthPHYSim(pads)
|
||||||
elif hasattr(clock_pads, "gtx") and flen(pads.tx_data) == 8:
|
elif hasattr(clock_pads, "gtx") and flen(pads.tx_data) == 8:
|
||||||
|
@ -16,6 +17,7 @@ def LiteEthPHY(clock_pads, pads, **kwargs):
|
||||||
from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMII
|
from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMII
|
||||||
return LiteEthPHYGMII(clock_pads, pads, **kwargs)
|
return LiteEthPHYGMII(clock_pads, pads, **kwargs)
|
||||||
elif flen(pads.tx_data) == 4:
|
elif flen(pads.tx_data) == 4:
|
||||||
|
# This is a MII PHY
|
||||||
from misoclib.com.liteeth.phy.mii import LiteEthPHYMII
|
from misoclib.com.liteeth.phy.mii import LiteEthPHYMII
|
||||||
return LiteEthPHYMII(clock_pads, pads, **kwargs)
|
return LiteEthPHYMII(clock_pads, pads, **kwargs)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue