Skip to content
Snippets Groups Projects
Commit 119e5318 authored by Mathias Kreider's avatar Mathias Kreider
Browse files

No commit message

No commit message
parent 54a2d532
Branches
Tags
No related merge requests found
......@@ -381,15 +381,15 @@ begin
-- RX cycle line lowered before all words were transferred
if (s_EB_RX_byte_cnt < s_EB_packet_length
AND EB_RX_i.CYC = '0') then
report "EB: PACKET WAS ABORTED" severity note;
-- report "EB: PACKET WAS ABORTED" severity note;
-- ERROR: -- RX cycle line lowered before all words were transferred
s_state_RX <= IDLE;
s_state_TX <= IDLE;
-- s_state_RX <= IDLE;
-- s_state_TX <= IDLE;
--
elsif(s_EB_RX_byte_cnt > s_EB_packet_length AND NOT (s_EB_RX_byte_cnt < 16)) then
report "EB: PACKET TOO LONG" severity note;
s_state_RX <= IDLE;
s_state_TX <= IDLE;
-- report "EB: PACKET TOO LONG" severity note;
-- s_state_RX <= IDLE;
-- s_state_TX <= IDLE;
else
case s_state_RX is
......@@ -416,7 +416,7 @@ begin
s_state_RX <= CYC_HDR_REC;
s_state_TX <= EB_HDR_INIT;
else
report "EB: Waiting for buffer ..." severity note;
--report "EB: Waiting for buffer ..." severity note;
end if;
if(s_EB_RX_HDR.PROBE = '1') then -- no probe, prepare cycle reception
s_state_RX <= EB_HDR_PROBE_ID ;
......
......@@ -60,6 +60,8 @@ constant c_EB_PORT_SIZE_n : natural := 32;
constant c_EB_ADDR_SIZE_n : natural := 32;
constant c_ETH_FRAME_MIN_END : natural := 64 - 4 - 2;
constant c_ETH_HLEN : natural := 14;
constant c_ETH_Q_HLEN : natural := 18;
......
......@@ -240,7 +240,7 @@ snk_hdr_fsm.stall <= parser_wait or snk_hdr_fsm_stall; -- enable drivers in two
reply_MAC_o <= ETH_RX.SRC;
reply_IP_o <= IPV4_RX.SRC;
reply_PORT_o <= UDP_RX.SRC_PORT;
payload_len <= UDP_RX.MLEN;
payload_len <= UDP_RX.MLEN;
payload_len_o <= payload_len;
......@@ -392,7 +392,8 @@ begin
when UDP => if((byte_count = counter_comp + to_integer(unsigned(IPV4_RX.IHL)*4) + c_UDP_HLEN -2) AND snk_WR = '1') then report("RX: matched UDP len") severity note;
when UDP => if((byte_count = counter_comp + to_integer(unsigned(IPV4_RX.IHL)*4) + c_UDP_HLEN -2) AND snk_WR = '1') then
--report("RX: matched UDP len") severity note;
parser_wait <= '1';
parse <= UDP_FETCH_BUF;
end if;
......@@ -460,7 +461,7 @@ begin
end if;
when HEADER => if(parse = DONE) then
eop <= (counter_comp + to_integer(unsigned(IPV4_RX.IHL)*4) + to_integer(unsigned(UDP_RX.MLEN)));
eop <= (counter_comp + to_integer(unsigned(IPV4_RX.IHL)*4) + to_integer(unsigned(UDP_RX.MLEN)) -2);
state <= PAYLOAD;
--snk_hdr_fsm_STALL <= '1';
else
......@@ -470,7 +471,7 @@ begin
end if;
when PAYLOAD => if(byte_count < (64 - 4)) then
when PAYLOAD => if(byte_count < c_ETH_FRAME_MIN_END) then
if(snk_i.cyc = '0') then
......@@ -493,8 +494,8 @@ begin
end if;
when PADDING => if(snk_i.cyc = '0') then
if(byte_count = 64 - 4 ) then state <= DONE;
elsif(byte_count > eop) then
if(byte_count = c_ETH_FRAME_MIN_END) then state <= DONE;
elsif(byte_count > c_ETH_FRAME_MIN_END) then
report("RX: frame too long") severity warning; state <= ERRORS;
else
report("RX: frame cut short") severity warning; state <= ERRORS;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment