liteeth/phy: only use clk_freq for LiteEthPHYGMIIMII in autodetect

This commit is contained in:
Florent Kermarrec 2015-08-19 01:07:41 +02:00
parent 6683485841
commit 3d3cd128d8
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ from misoclib.com.liteeth.common import *
def LiteEthPHY(clock_pads, pads, **kwargs): def LiteEthPHY(clock_pads, pads, **kwargs):
clk_freq = kwargs.pop("clk_freq")
# Autodetect PHY # Autodetect PHY
if hasattr(pads, "source_stb"): if hasattr(pads, "source_stb"):
# This is a simulation PHY # This is a simulation PHY
@ -11,7 +12,7 @@ def LiteEthPHY(clock_pads, pads, **kwargs):
if hasattr(clock_pads, "tx"): if hasattr(clock_pads, "tx"):
# This is a 10/100/1G PHY # This is a 10/100/1G PHY
from misoclib.com.liteeth.phy.gmii_mii import LiteEthPHYGMIIMII from misoclib.com.liteeth.phy.gmii_mii import LiteEthPHYGMIIMII
return LiteEthPHYGMIIMII(clock_pads, pads, **kwargs) return LiteEthPHYGMIIMII(clock_pads, pads, clk_freq=clk_freq, **kwargs)
else: else:
# This is a pure 1G PHY # This is a pure 1G PHY
from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMII from misoclib.com.liteeth.phy.gmii import LiteEthPHYGMII