Compare commits
4 Commits
7c49812bdf
...
3c1c14f953
Author | SHA1 | Date | |
---|---|---|---|
3c1c14f953 | |||
50b65bccec | |||
461c7ebce1 | |||
eab8783c6b |
@ -50,6 +50,7 @@ class MacDevReceiver():
|
|||||||
if len(r) < 60:
|
if len(r) < 60:
|
||||||
r += b'\x00' * (60 - len(r))
|
r += b'\x00' * (60 - len(r))
|
||||||
r += self.eth_fcs(r)
|
r += self.eth_fcs(r)
|
||||||
|
self.dut._log.debug("DUT RX: " + str(r))
|
||||||
await self.eth_tx.send(ETH_HEAD + r);
|
await self.eth_tx.send(ETH_HEAD + r);
|
||||||
except:
|
except:
|
||||||
await Timer(1, "us")
|
await Timer(1, "us")
|
||||||
@ -64,7 +65,7 @@ class MacDevReceiver():
|
|||||||
except:
|
except:
|
||||||
self.dut._log.debug("NLP / Invalid frame")
|
self.dut._log.debug("NLP / Invalid frame")
|
||||||
continue
|
continue
|
||||||
self.dut._log.info("RX Frame: " + str(frame))
|
self.dut._log.debug("DUT TX: " + str(frame))
|
||||||
self.macdev.send(frame)
|
self.macdev.send(frame)
|
||||||
|
|
||||||
async def start(self):
|
async def start(self):
|
||||||
|
@ -124,7 +124,7 @@ begin
|
|||||||
elsif rising_edge(clk) then
|
elsif rising_edge(clk) then
|
||||||
case state is
|
case state is
|
||||||
when IDLE =>
|
when IDLE =>
|
||||||
if mac_out.tx_active then
|
if not mac_out.tx_active then
|
||||||
if (ethernet_i_in.tx_en) then -- ETH I has priority
|
if (ethernet_i_in.tx_en) then -- ETH I has priority
|
||||||
sel <= SEL_ETH_I;
|
sel <= SEL_ETH_I;
|
||||||
state <= TXD;
|
state <= TXD;
|
||||||
@ -140,13 +140,18 @@ begin
|
|||||||
end if;
|
end if;
|
||||||
|
|
||||||
when TXD =>
|
when TXD =>
|
||||||
state <= IDLE when (mac_in.tx_mac_data_en or mac_out.tx_active);
|
state <= IDLE when (mac_in.tx_mac_data_en or not mac_out.tx_active);
|
||||||
end case;
|
end case;
|
||||||
end if;
|
end if;
|
||||||
end process arb;
|
end process arb;
|
||||||
|
|
||||||
mux : process(all) is
|
mux : process(all) is
|
||||||
begin
|
begin
|
||||||
|
-- Defaults to avoid latch
|
||||||
|
tx_data_ack_i <= '0';
|
||||||
|
tx_data_ack_ii <= (others => '0');
|
||||||
|
|
||||||
|
-- Actual MUX
|
||||||
if (sel = SEL_ETH_I) then
|
if (sel = SEL_ETH_I) then
|
||||||
mac_in.tx_mac_data_en <= ethernet_i_in.tx_en;
|
mac_in.tx_mac_data_en <= ethernet_i_in.tx_en;
|
||||||
mac_in.tx_mac_data <= ethernet_i_in.tx_data;
|
mac_in.tx_mac_data <= ethernet_i_in.tx_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user