bench: Test ARP requests in HWITL

This commit is contained in:
Markus Koch 2022-10-28 18:55:04 +02:00
parent 4804674d8e
commit 651b6bb11e
2 changed files with 32 additions and 1 deletions

View File

@ -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;

View File

@ -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;