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