phy/efinix: Directly exclude IOs when primitive is used, avoid having to do it in user design.
This commit is contained in:
parent
f0c876ca77
commit
b201aeb083
|
@ -52,6 +52,7 @@ class LiteEthPHYRGMIITX(LiteXModule):
|
||||||
"drive_strength" : 4 # FIXME: Get it from constraints.
|
"drive_strength" : 4 # FIXME: Get it from constraints.
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(pads.tx_data)
|
||||||
|
|
||||||
# TX Ctl IOs.
|
# TX Ctl IOs.
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -76,6 +77,7 @@ class LiteEthPHYRGMIITX(LiteXModule):
|
||||||
"drive_strength" : 4 # FIXME: Get it from constraints.
|
"drive_strength" : 4 # FIXME: Get it from constraints.
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(pads.tx_ctl)
|
||||||
|
|
||||||
# Logic.
|
# Logic.
|
||||||
# ------
|
# ------
|
||||||
|
@ -123,6 +125,7 @@ class LiteEthPHYRGMIIRX(LiteXModule):
|
||||||
"is_inclk_inverted" : False
|
"is_inclk_inverted" : False
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(pads.rx_data)
|
||||||
|
|
||||||
# RX Ctl IOs.
|
# RX Ctl IOs.
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -168,6 +171,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
|
||||||
"mode" : "INPUT_CLK"
|
"mode" : "INPUT_CLK"
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(clock_pads.rx)
|
||||||
self.comb += self.cd_eth_rx.clk.eq(eth_rx_clk)
|
self.comb += self.cd_eth_rx.clk.eq(eth_rx_clk)
|
||||||
|
|
||||||
cmd = "create_clock -period {} auto_eth_rx_clk".format(1e9/125e6)
|
cmd = "create_clock -period {} auto_eth_rx_clk".format(1e9/125e6)
|
||||||
|
@ -184,6 +188,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
|
||||||
"mode" : "OUTPUT_CLK"
|
"mode" : "OUTPUT_CLK"
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(clock_pads.tx)
|
||||||
|
|
||||||
# TX PLL.
|
# TX PLL.
|
||||||
# -------
|
# -------
|
||||||
|
|
|
@ -31,27 +31,28 @@ class LiteEthPHYRGMIITX(LiteXModule):
|
||||||
tx_data_h = []
|
tx_data_h = []
|
||||||
tx_data_l = []
|
tx_data_l = []
|
||||||
for n in range(4):
|
for n in range(4):
|
||||||
name = platform.get_pin_name(pads.tx_data[n])
|
name = platform.get_pin_name(pads.tx_data[n])
|
||||||
pad = platform.get_pin_location(pads.tx_data[n])
|
pad = platform.get_pin_location(pads.tx_data[n])
|
||||||
io_prop = platform.get_pin_properties(pads.tx_data[n])
|
io_prop = platform.get_pin_properties(pads.tx_data[n])
|
||||||
name = f"auto_{name}"
|
name = f"auto_{name}"
|
||||||
|
|
||||||
tx_data_h.append(platform.add_iface_io(name + "_HI"))
|
tx_data_h.append(platform.add_iface_io(name + "_HI"))
|
||||||
tx_data_l.append(platform.add_iface_io(name + "_LO"))
|
tx_data_l.append(platform.add_iface_io(name + "_LO"))
|
||||||
|
|
||||||
block = {
|
block = {
|
||||||
"type" : "GPIO",
|
"type" : "GPIO",
|
||||||
"mode" : "OUTPUT",
|
"mode" : "OUTPUT",
|
||||||
"name" : name,
|
"name" : name,
|
||||||
"location" : pad,
|
"location" : pad,
|
||||||
"properties" : io_prop,
|
"properties" : io_prop,
|
||||||
"size" : 1,
|
"size" : 1,
|
||||||
"out_reg" : "DDIO_RESYNC",
|
"out_reg" : "DDIO_RESYNC",
|
||||||
"out_clk_pin" : "auto_eth_tx_clk",
|
"out_clk_pin" : "auto_eth_tx_clk",
|
||||||
"is_inclk_inverted" : False,
|
"is_inclk_inverted" : False,
|
||||||
"drive_strength" : 4 # FIXME: Get it from constraints.
|
"drive_strength" : 4 # FIXME: Get it from constraints.
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(pads.tx_data)
|
||||||
|
|
||||||
# TX Ctl IOs.
|
# TX Ctl IOs.
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -99,6 +100,7 @@ class LiteEthPHYRGMIIRX(LiteXModule):
|
||||||
"is_inclk_inverted" : False
|
"is_inclk_inverted" : False
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(pads.rx_data)
|
||||||
|
|
||||||
# RX Ctl IOs.
|
# RX Ctl IOs.
|
||||||
# -----------
|
# -----------
|
||||||
|
@ -144,6 +146,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
|
||||||
"mode" : "INPUT_CLK"
|
"mode" : "INPUT_CLK"
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(clock_pads.rx)
|
||||||
self.comb += self.cd_eth_rx.clk.eq(eth_rx_clk)
|
self.comb += self.cd_eth_rx.clk.eq(eth_rx_clk)
|
||||||
|
|
||||||
cmd = "create_clock -period {} auto_eth_rx_clk".format(1e9/125e6)
|
cmd = "create_clock -period {} auto_eth_rx_clk".format(1e9/125e6)
|
||||||
|
@ -160,6 +163,7 @@ class LiteEthPHYRGMIICRG(LiteXModule):
|
||||||
"mode" : "OUTPUT_CLK"
|
"mode" : "OUTPUT_CLK"
|
||||||
}
|
}
|
||||||
platform.toolchain.ifacewriter.blocks.append(block)
|
platform.toolchain.ifacewriter.blocks.append(block)
|
||||||
|
platform.toolchain.excluded_ios.append(clock_pads.tx)
|
||||||
|
|
||||||
# TX PLL.
|
# TX PLL.
|
||||||
# -------
|
# -------
|
||||||
|
|
Loading…
Reference in New Issue