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) or (saved_dest_mac = x"ffffffffffff") then
+ if (saved_dest_mac = g_MY_MAC) then --or (saved_dest_mac = x"ffffffffffff") then
filter_next_state <= REMOVE_SRC;
else
filter_next_state <= DECIDE;
signal too_much_data : std_logic;
signal divide_ctr : std_logic_vector(7 downto 0);
+signal divide_temp_ctr : std_logic_vector(15 downto 0);
begin
DIVIDE_CTR_PROC : process(CLK)
begin
- if (RESET = '1') or (dissect_current_state = IDLE) then
- divide_ctr <= (others => '0');
- elsif (dissect_current_state = SAVE_RESPONSE) and (tx_data_ctr(10 downto 0) = b"101_0111_1000") then
- divide_ctr <= divide_ctr + x"1";
+ if rising_edge(CLK) then
+ if (RESET = '1') or (dissect_current_state = IDLE) then
+ divide_ctr <= (others => '0');
+ elsif (dissect_current_state = SAVE_RESPONSE) and (divide_temp_ctr = b"101_0111_1000") then
+ divide_ctr <= divide_ctr + x"1";
+ end if;
end if;
end process DIVIDE_CTR_PROC;
+DIVIDE_TEMP_CTR_PROC : process(CLK)
+begin
+ if rising_edge(CLK) then
+ if (RESET = '1') or (dissect_current_state = IDLE) then
+ divide_temp_ctr <= (others => '0');
+ elsif (tx_fifo_wr = '1') and (divide_temp_ctr /= b"101_0111_1000") then
+ divide_temp_ctr(15 downto 1) <= divide_temp_ctr(15 downto 1) + x"1";
+ elsif (tx_fifo_wr = '1') and (divide_temp_ctr = b"101_0111_1000") then
+ divide_temp_ctr <= x"0002";
+ end if;
+ end if;
+end process DIVIDE_TEMP_CTR_PROC;
+
-- total counter of data transported to frame constructor
TX_LOADED_CTR_PROC : process(CLK)
begin
end if;
end process FRAME_SIZE_PROC;
-TC_UDP_SIZE_OUT <= tx_data_ctr - divide_ctr(7 downto 1);
+TC_UDP_SIZE_OUT <= tx_data_ctr - divide_ctr;
TC_FLAGS_OFFSET_OUT(15 downto 14) <= "00";
if (MC_FRAME_TYPE_IN = x"0008") then -- in case of ip
FC_IP_SIZE_OUT <= MC_IP_SIZE_IN;
- if (MC_UDP_SIZE_IN > g_MAX_FRAME_SIZE) then
- FC_UDP_SIZE_OUT <= MC_UDP_SIZE_IN; -- - x"1";
- else
+ --if (MC_UDP_SIZE_IN > g_MAX_FRAME_SIZE) then
+ -- FC_UDP_SIZE_OUT <= MC_UDP_SIZE_IN; -- - x"1";
+ --else
FC_UDP_SIZE_OUT <= MC_UDP_SIZE_IN;
- end if;
+ --end if;
else
FC_IP_SIZE_OUT <= temp_frame_size; --MC_FRAME_SIZE_IN;
FC_UDP_SIZE_OUT <= temp_frame_size; --MC_FRAME_SIZE_IN;