Skip to content
Snippets Groups Projects
Commit 101f8af0 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

fixed IP checksum calculation

parent c3aaf0a4
No related branches found
No related tags found
1 merge request!106fixed IP checksum calculation
...@@ -150,7 +150,7 @@ BEGIN ...@@ -150,7 +150,7 @@ BEGIN
sum; sum;
-- Accumulate the last carry -- Accumulate the last carry
last_dat <= sum(c_halfword_w-1 DOWNTO 0) + sum_cin; last_dat <= sum(c_halfword_w-1 DOWNTO 0) + sum_cin + word_sum_cin; -- Also add word_sum_cin in the case that the last word has a carry.
-- Checksum is 1-complement of the sum -- Checksum is 1-complement of the sum
nxt_checksum <= NOT(STD_LOGIC_VECTOR(last_dat)) WHEN prev_in_eop_dly='1' ELSE i_checksum; nxt_checksum <= NOT(STD_LOGIC_VECTOR(last_dat)) WHEN prev_in_eop_dly='1' ELSE i_checksum;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment