implemented

This commit is contained in:
Mario Hüttel 2018-04-13 21:35:44 +02:00
parent 763edd1900
commit ee5da6812c
1 changed files with 13 additions and 6 deletions

19
top.vhd
View File

@ -308,12 +308,19 @@ begin -- architecture RTL
dat_cnt_s <= dat_cnt_s +1;
end if;
if eof = '1' then
if crc_valid = '1' then -- or crc_valid = '0' then
recv_state <= WAITFORACK;
fifo_data_avail <= '1';
--led2 <= '0';
else
--led2 <= '1';
if crc_valid = '1' then
if pkg_type = PIPE_PKG then
-- Wait for further frames
-- This is also called with any
-- undefined TYPEFIELD
recv_state <= PRE;
elsif pkg_type = FIN_PKG then
fifo_data_avail <= '1';
recv_state <= WAITFORACK;
else
recv_state <= PRE;
end if;
else -- Eth Frame invalid. Discard
fifo_rst <= '1';
recv_state <= PRE;
end if;