mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
litex/soc: support model-version of GMII PHY in add_ether{net,bone}
This not only tests for the precise PHY model, but also whether there is a model attribute in the ethphy instance and whether that is set to True. Signed-off-by: Leon Schuermann <leon@is.currently.online>
This commit is contained in:
parent
2852e80eae
commit
339fabf615
1 changed files with 2 additions and 2 deletions
|
@ -1433,7 +1433,7 @@ class LiteXSoC(SoC):
|
||||||
# Timing constraints
|
# Timing constraints
|
||||||
eth_rx_clk = getattr(phy, "crg", phy).cd_eth_rx.clk
|
eth_rx_clk = getattr(phy, "crg", phy).cd_eth_rx.clk
|
||||||
eth_tx_clk = getattr(phy, "crg", phy).cd_eth_tx.clk
|
eth_tx_clk = getattr(phy, "crg", phy).cd_eth_tx.clk
|
||||||
if not isinstance(phy, LiteEthPHYModel):
|
if not isinstance(phy, LiteEthPHYModel) and not getattr(phy, "model", False):
|
||||||
self.platform.add_period_constraint(eth_rx_clk, 1e9/phy.rx_clk_freq)
|
self.platform.add_period_constraint(eth_rx_clk, 1e9/phy.rx_clk_freq)
|
||||||
self.platform.add_period_constraint(eth_tx_clk, 1e9/phy.tx_clk_freq)
|
self.platform.add_period_constraint(eth_tx_clk, 1e9/phy.tx_clk_freq)
|
||||||
self.platform.add_false_path_constraints(self.crg.cd_sys.clk, eth_rx_clk, eth_tx_clk)
|
self.platform.add_false_path_constraints(self.crg.cd_sys.clk, eth_rx_clk, eth_tx_clk)
|
||||||
|
@ -1485,7 +1485,7 @@ class LiteXSoC(SoC):
|
||||||
# Timing constraints
|
# Timing constraints
|
||||||
eth_rx_clk = getattr(phy, "crg", phy).cd_eth_rx.clk
|
eth_rx_clk = getattr(phy, "crg", phy).cd_eth_rx.clk
|
||||||
eth_tx_clk = getattr(phy, "crg", phy).cd_eth_tx.clk
|
eth_tx_clk = getattr(phy, "crg", phy).cd_eth_tx.clk
|
||||||
if not isinstance(phy, LiteEthPHYModel):
|
if not isinstance(phy, LiteEthPHYModel) and not getattr(phy, "model", False):
|
||||||
self.platform.add_period_constraint(eth_rx_clk, 1e9/phy.rx_clk_freq)
|
self.platform.add_period_constraint(eth_rx_clk, 1e9/phy.rx_clk_freq)
|
||||||
self.platform.add_period_constraint(eth_tx_clk, 1e9/phy.tx_clk_freq)
|
self.platform.add_period_constraint(eth_tx_clk, 1e9/phy.tx_clk_freq)
|
||||||
self.platform.add_false_path_constraints(self.crg.cd_sys.clk, eth_rx_clk, eth_tx_clk)
|
self.platform.add_false_path_constraints(self.crg.cd_sys.clk, eth_rx_clk, eth_tx_clk)
|
||||||
|
|
Loading…
Reference in a new issue