Line 1... |
Line 1... |
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
---- ----
|
--
|
---- Ethernet Switch on Configurable Logic IP Core ----
|
-- This VHDL file was generated by EASE/HDL 7.4 Revision 4 from HDL Works B.V.
|
---- ----
|
--
|
---- This file is part of the ESoCL project ----
|
-- Ease library : work
|
---- http://www.opencores.org/cores/esoc/ ----
|
-- HDL library : work
|
---- ----
|
-- Host name : S212065
|
---- Description: see design description ESoCL_dd_71022001.pdf ----
|
-- User name : df768
|
---- ----
|
-- Time stamp : Tue Aug 19 08:05:18 2014
|
---- To Do: see roadmap description ESoCL_dd_71022001.pdf ----
|
--
|
---- and/or release bulleting ESoCL_rb_71022001.pdf ----
|
-- Designed by : L.Maarsen
|
---- ----
|
-- Company : LogiXA
|
---- Author(s): L.Maarsen ----
|
-- Project info : eSoC
|
---- Bert Maarsen, lmaarsen@opencores.org ----
|
--
|
---- ----
|
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
---- ----
|
|
---- Copyright (C) 2009 Authors and OPENCORES.ORG ----
|
|
---- ----
|
|
---- This source file may be used and distributed without ----
|
|
---- restriction provided that this copyright statement is not ----
|
|
---- removed from the file and that any derivative work contains ----
|
|
---- the original copyright notice and the associated disclaimer. ----
|
|
---- ----
|
|
---- This source file is free software; you can redistribute it ----
|
|
---- and/or modify it under the terms of the GNU Lesser General ----
|
|
---- Public License as published by the Free Software Foundation; ----
|
|
---- either version 2.1 of the License, or (at your option) any ----
|
|
---- later version. ----
|
|
---- ----
|
|
---- This source is distributed in the hope that it will be ----
|
|
---- useful, but WITHOUT ANY WARRANTY; without even the implied ----
|
|
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ----
|
|
---- PURPOSE. See the GNU Lesser General Public License for more ----
|
|
---- details. ----
|
|
---- ----
|
|
---- You should have received a copy of the GNU Lesser General ----
|
|
---- Public License along with this source; if not, download it ----
|
|
---- from http://www.opencores.org/lgpl.shtml ----
|
|
---- ----
|
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
-- Object : Entity work.esoc_search_engine_sa
|
-- Object : Entity work.esoc_search_engine_sa
|
-- Last modified : Mon Apr 14 12:50:09 2014.
|
-- Last modified : Tue Aug 19 08:05:17 2014.
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
library ieee, std, work;
|
library ieee, std, work;
|
Line 71... |
Line 47... |
search_table_wren : out STD_LOGIC);
|
search_table_wren : out STD_LOGIC);
|
end entity esoc_search_engine_sa;
|
end entity esoc_search_engine_sa;
|
|
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
-- Object : Architecture work.esoc_search_engine_sa.esoc_search_engine_sa
|
-- Object : Architecture work.esoc_search_engine_sa.esoc_search_engine_sa
|
-- Last modified : Mon Apr 14 12:50:09 2014.
|
-- Last modified : Tue Aug 19 08:05:17 2014.
|
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
|
|
|
|
architecture esoc_search_engine_sa of esoc_search_engine_sa is
|
architecture esoc_search_engine_sa of esoc_search_engine_sa is
|
|
|
Line 169... |
Line 145... |
search_table_q(esoc_search_entry_mac+47 downto esoc_search_entry_mac) = search_key_i(esoc_search_entry_mac+47 downto esoc_search_entry_mac) and
|
search_table_q(esoc_search_entry_mac+47 downto esoc_search_entry_mac) = search_key_i(esoc_search_entry_mac+47 downto esoc_search_entry_mac) and
|
search_table_q(esoc_search_entry_valid) = '1' then
|
search_table_q(esoc_search_entry_valid) = '1' then
|
|
|
search_table_address_i <= std_logic_vector(to_unsigned(to_integer(unsigned(search_table_address_i))-1,search_table_address_i'length));
|
search_table_address_i <= std_logic_vector(to_unsigned(to_integer(unsigned(search_table_address_i))-1,search_table_address_i'length));
|
search_key_i(esoc_search_entry_valid) <= '1';
|
search_key_i(esoc_search_entry_valid) <= '1';
|
search_key_i(esoc_search_entry_update) <= '1';
|
search_key_i(esoc_search_entry_aging) <= '1';
|
search_table_wren <= '1';
|
search_table_wren <= '1';
|
search_state <= idle;
|
search_state <= idle;
|
|
|
-- there is no hit on SA and VID
|
-- there is no hit on SA and VID
|
else
|
else
|
Line 206... |
Line 182... |
else
|
else
|
search_sa_drop_cnt <= '1';
|
search_sa_drop_cnt <= '1';
|
end if;
|
end if;
|
|
|
search_key_i(esoc_search_entry_valid) <= '1';
|
search_key_i(esoc_search_entry_valid) <= '1';
|
search_key_i(esoc_search_entry_update) <= '1';
|
search_key_i(esoc_search_entry_aging) <= '1';
|
search_state <= idle;
|
search_state <= idle;
|
end if;
|
end if;
|
end if;
|
end if;
|
|
|
when others => search_state <= idle;
|
when others => search_state <= idle;
|
Line 255... |
Line 231... |
aging_state <= wait_empty;
|
aging_state <= wait_empty;
|
else
|
else
|
-- update the entry or even invalidate the entry
|
-- update the entry or even invalidate the entry
|
if search_table_q(esoc_search_entry_valid) = '1' then
|
if search_table_q(esoc_search_entry_valid) = '1' then
|
search_key_i <= search_table_q;
|
search_key_i <= search_table_q;
|
search_key_i(esoc_search_entry_valid) <= search_table_q(esoc_search_entry_update);
|
search_key_i(esoc_search_entry_valid) <= search_table_q(esoc_search_entry_aging);
|
search_key_i(esoc_search_entry_update) <= '0';
|
search_key_i(esoc_search_entry_aging) <= '0';
|
search_table_wren <= '1';
|
search_table_wren <= '1';
|
end if;
|
end if;
|
|
|
-- update address pointer to process next entry
|
-- update address pointer to process next entry
|
if aging_address = 2**search_table_address_i'length - 1 then
|
if aging_address = 2**search_table_address_i'length - 1 then
|