diff --git a/cocotb/cocotb_top_hwitl.vhd b/cocotb/cocotb_top_hwitl.vhd index 6b56add..11b71b0 100644 --- a/cocotb/cocotb_top_hwitl.vhd +++ b/cocotb/cocotb_top_hwitl.vhd @@ -72,6 +72,19 @@ begin tx_n => open ); - button_n <= (others => '1'); + test_seq : process is + begin + wait until bench_ready = '1'; + + button_n <= (others => '1'); + wait for 1 us; + + wait until rising_edge(clk); + button_n(0) <= '0'; + wait until rising_edge(clk); + button_n(0) <= '1'; + + wait; + end process test_seq; end architecture bench; diff --git a/design/top_hwitl.vhd b/design/top_hwitl.vhd index bfb2d16..9e03cd9 100644 --- a/design/top_hwitl.vhd +++ b/design/top_hwitl.vhd @@ -301,4 +301,22 @@ begin end if; end process receiver; + arp_request_test : process(clk, rst) is + begin + if rst then + arp_in.arp_ip <= (x"C0", x"A8", x"02", x"01"); + arp_in.arp_query_stb <= '0'; + + elsif rising_edge(clk) then + arp_in.arp_query_stb <= not button_n(0); + + if arp_out.arp_ok_stb then + report "Found MAC: " & mac_to_string(arp_out.arp_mac); + end if; + if arp_out.arp_fail_stb then + report "ARP failed"; + end if; + end if; + end process arp_request_test; + end architecture eth;