liteeth: Review TX/RX CDC changes (cosmetic cleanups).
This commit is contained in:
parent
322d8625b5
commit
8ae7649d03
|
@ -22,7 +22,8 @@ class LiteEthIPCore(Module, AutoCSR):
|
|||
tx_cdc_depth = 32,
|
||||
tx_cdc_buffered = False,
|
||||
rx_cdc_depth = 32,
|
||||
rx_cdc_buffered = False):
|
||||
rx_cdc_buffered = False,
|
||||
):
|
||||
# Parameters.
|
||||
# -----------
|
||||
ip_address = convert_ip(ip_address)
|
||||
|
@ -80,7 +81,8 @@ class LiteEthUDPIPCore(LiteEthIPCore):
|
|||
tx_cdc_depth = 32,
|
||||
tx_cdc_buffered = False,
|
||||
rx_cdc_depth = 32,
|
||||
rx_cdc_buffered = False):
|
||||
rx_cdc_buffered = False,
|
||||
):
|
||||
# Parameters.
|
||||
# -----------
|
||||
ip_address = convert_ip(ip_address)
|
||||
|
@ -99,7 +101,7 @@ class LiteEthUDPIPCore(LiteEthIPCore):
|
|||
tx_cdc_depth = tx_cdc_depth,
|
||||
tx_cdc_buffered = tx_cdc_buffered,
|
||||
rx_cdc_depth = rx_cdc_depth,
|
||||
rx_cdc_buffered = rx_cdc_buffered
|
||||
rx_cdc_buffered = rx_cdc_buffered,
|
||||
)
|
||||
# UDP.
|
||||
# ----
|
||||
|
|
|
@ -303,10 +303,10 @@ class MACCore(PHYCore):
|
|||
nrxslots = nrxslots,
|
||||
ntxslots = ntxslots,
|
||||
full_memory_we = core_config.get("full_memory_we", False),
|
||||
tx_cdc_depth = tx_cdc_depth
|
||||
tx_cdc_buffered = tx_cdc_buffered
|
||||
rx_cdc_depth = rx_cdc_depth
|
||||
rx_cdc_buffered = rx_cdc_buffered
|
||||
tx_cdc_depth = tx_cdc_depth,
|
||||
tx_cdc_buffered = tx_cdc_buffered,
|
||||
rx_cdc_depth = rx_cdc_depth,
|
||||
rx_cdc_buffered = rx_cdc_buffered,
|
||||
)
|
||||
|
||||
if bus_standard == "wishbone":
|
||||
|
@ -369,11 +369,10 @@ class UDPCore(PHYCore):
|
|||
clk_freq = core_config["clk_freq"],
|
||||
dw = data_width,
|
||||
with_sys_datapath = (data_width == 32),
|
||||
tx_cdc_depth = tx_cdc_depth
|
||||
tx_cdc_buffered = tx_cdc_buffered
|
||||
rx_cdc_depth = rx_cdc_depth
|
||||
rx_cdc_buffered = rx_cdc_buffered
|
||||
|
||||
tx_cdc_depth = tx_cdc_depth,
|
||||
tx_cdc_buffered = tx_cdc_buffered,
|
||||
rx_cdc_depth = rx_cdc_depth,
|
||||
rx_cdc_buffered = rx_cdc_buffered,
|
||||
)
|
||||
|
||||
# DHCP -------------------------------------------------------------------------------------
|
||||
|
|
|
@ -17,8 +17,10 @@ class LiteEthMAC(Module, AutoCSR):
|
|||
interface = "crossbar",
|
||||
endianness = "big",
|
||||
with_preamble_crc = True,
|
||||
nrxslots = 2, rxslots_read_only = True,
|
||||
ntxslots = 2, txslots_write_only = False,
|
||||
nrxslots = 2,
|
||||
rxslots_read_only = True,
|
||||
ntxslots = 2,
|
||||
txslots_write_only = False,
|
||||
hw_mac = None,
|
||||
timestamp = None,
|
||||
full_memory_we = False,
|
||||
|
@ -26,8 +28,8 @@ class LiteEthMAC(Module, AutoCSR):
|
|||
tx_cdc_depth = 32,
|
||||
tx_cdc_buffered = False,
|
||||
rx_cdc_depth = 32,
|
||||
rx_cdc_buffered = False):
|
||||
|
||||
rx_cdc_buffered = False,
|
||||
):
|
||||
assert dw%8 == 0
|
||||
assert interface in ["crossbar", "wishbone", "hybrid"]
|
||||
assert endianness in ["big", "little"]
|
||||
|
@ -40,7 +42,7 @@ class LiteEthMAC(Module, AutoCSR):
|
|||
tx_cdc_depth = tx_cdc_depth,
|
||||
tx_cdc_buffered = tx_cdc_buffered,
|
||||
rx_cdc_depth = rx_cdc_depth,
|
||||
rx_cdc_buffered = rx_cdc_buffered
|
||||
rx_cdc_buffered = rx_cdc_buffered,
|
||||
)
|
||||
self.csrs = []
|
||||
if interface == "crossbar":
|
||||
|
|
|
@ -64,7 +64,7 @@ class LiteEthMACCore(Module, AutoCSR):
|
|||
cd_from = "sys",
|
||||
cd_to = "eth_tx",
|
||||
depth = tx_cdc_depth,
|
||||
buffered = tx_cdc_buffered
|
||||
buffered = tx_cdc_buffered,
|
||||
)
|
||||
self.submodules += tx_cdc
|
||||
self.pipeline.append(tx_cdc)
|
||||
|
@ -132,7 +132,7 @@ class LiteEthMACCore(Module, AutoCSR):
|
|||
tx_datapath.add_converter()
|
||||
if core_dw != 8:
|
||||
tx_datapath.add_last_be()
|
||||
# Gap insertion has to occurr in phy tx domain to ensure gap is correctly maintained
|
||||
# Gap insertion has to occurr in phy tx domain to ensure gap is correctly maintained.
|
||||
if not getattr(phy, "integrated_ifg_inserter", False):
|
||||
tx_datapath.add_gap()
|
||||
tx_datapath.pipeline.append(phy)
|
||||
|
@ -195,7 +195,7 @@ class LiteEthMACCore(Module, AutoCSR):
|
|||
cd_from = "eth_rx",
|
||||
cd_to = "sys",
|
||||
depth = rx_cdc_depth,
|
||||
buffered = rx_cdc_buffered
|
||||
buffered = rx_cdc_buffered,
|
||||
)
|
||||
self.submodules += rx_cdc
|
||||
self.pipeline.append(rx_cdc)
|
||||
|
|
Loading…
Reference in New Issue