Skip to content

Commit 72e442f

Browse files
committed
improve ethernet tx debug to capture sent bytes.
1 parent 7cb5603 commit 72e442f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cpu_test.vhdl

+12
Original file line numberDiff line numberDiff line change
@@ -327,14 +327,26 @@ begin
327327
end process;
328328

329329
process
330+
variable txbyte : unsigned(7 downto 0) := x"00";
331+
variable txbits : integer range 0 to 7 := 0;
330332
begin
331333
for i in 1 to 200000000 loop
332334
if clock50mhz='1' then
333335
if eth_txen='1' then
334336
report "ETHTX: bits " & to_string(std_logic_vector(eth_txd));
337+
txbyte := txbyte(5 downto 0) & eth_txd;
338+
if txbits = 6 then
339+
txbits := 0;
340+
report "ETHTX: byte $" & to_hstring(txbyte);
341+
else
342+
txbits := txbits + 2;
343+
end if;
344+
else
345+
report "ETHTX: bits NO CARRIER";
335346
end if;
336347
end if;
337348
wait for 10 ns;
349+
338350
end loop;
339351
end process;
340352

0 commit comments

Comments
 (0)