liteeth/phy: fix autodetect (clk_freq not necessary passed in kwargs)
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 22 Aug 2015 10:08:49 +0000 (12:08 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 22 Aug 2015 10:08:49 +0000 (12:08 +0200)
misoclib/com/liteeth/phy/__init__.py

index 1482b3d665402174a8dd13041cfc322ecf803bed..2eccd54003cebac31202fd9f360c475cecf6a2b3 100644 (file)
@@ -2,7 +2,7 @@ from misoclib.com.liteeth.common import *
 
 
 def LiteEthPHY(clock_pads, pads, **kwargs):
-    clk_freq = kwargs.pop("clk_freq")
+    clk_freq = None if "clk_freq" not in kwargs else kwargs.pop("clk_freq")
     # Autodetect PHY
     if hasattr(pads, "source_stb"):
         # This is a simulation PHY