state <= x"3";
if (remove_ctr = x"03") then -- counter starts with a delay that's why only 3
-- destination MAC address filtering here
- if (saved_dest_mac = g_MY_MAC) then --or (saved_dest_mac = x"ffffffffffff") then
+ if (saved_dest_mac = g_MY_MAC) or (saved_dest_mac = x"ffffffffffff") then -- must accept broadcasts for ARP
filter_next_state <= REMOVE_SRC;
else
filter_next_state <= DECIDE;
if (PCS_AN_COMPLETE_IN = '0') then
link_next_state <= INACTIVE;
else
- if (wait_ctr = x"0000_ca00") then
+ if (wait_ctr = x"1000_ca00") then
link_next_state <= GET_ADDRESS;
else
link_next_state <= WAIT_FOR_BOOT;
if rising_edge(CLK) then
if (RESET = '1' or dissect_current_state = IDLE or dissect_current_state = WAIT_FOR_HUB) then
tx_loaded_ctr <= (others => '0');
- elsif (dissect_current_state = LOAD_FRAME and TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1') then
+ elsif (dissect_current_state = LOAD_FRAME and TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1' and (tx_frame_loaded /= g_MAX_FRAME_SIZE)) then
tx_loaded_ctr <= tx_loaded_ctr + x"1";
elsif (dissect_current_state = LOAD_ACK and TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1') then
tx_loaded_ctr <= tx_loaded_ctr + x"1";
end if;
end process FRAME_SIZE_PROC;
-TC_UDP_SIZE_OUT <= tx_data_ctr - divide_ctr;
+TC_UDP_SIZE_OUT <= tx_data_ctr;
TC_FLAGS_OFFSET_OUT(15 downto 14) <= "00";
size_left <= (others => '0');
elsif (dissect_current_state = WAIT_FOR_LOAD) then
size_left <= tx_data_ctr;
- elsif (dissect_current_state = LOAD_FRAME and TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1') then
+ elsif (dissect_current_state = LOAD_FRAME and TC_RD_EN_IN = '1' and PS_SELECTED_IN = '1' and (tx_frame_loaded /= g_MAX_FRAME_SIZE)) then
size_left <= size_left - x"1";
end if;
end if;