1 |
9 |
eejlny |
--This library is free software; you can redistribute it and/or
|
2 |
|
|
--modify it under the terms of the GNU Lesser General Public
|
3 |
|
|
--License as published by the Free Software Foundation; either
|
4 |
|
|
--version 2.1 of the License, or (at your option) any later version.
|
5 |
|
|
|
6 |
|
|
--This library is distributed in the hope that it will be useful,
|
7 |
|
|
--but WITHOUT ANY WARRANTY; without even the implied warranty of
|
8 |
|
|
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
9 |
|
|
--Lesser General Public License for more details.
|
10 |
|
|
|
11 |
|
|
--You should have received a copy of the GNU Lesser General Public
|
12 |
|
|
--License along with this library; if not, write to the Free Software
|
13 |
|
|
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
14 |
|
|
|
15 |
|
|
-- e_mail : j.l.nunez-yanez@byacom.co.uk
|
16 |
|
|
|
17 |
|
|
--------------------------------------
|
18 |
|
|
-- ENTITY = PIPELINE_RO --
|
19 |
|
|
-- version = 1.0 --
|
20 |
|
|
-- last update = 1/08/99 --
|
21 |
|
|
-- author = Jose Nunez --
|
22 |
|
|
--------------------------------------
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
-- FUNCTION
|
26 |
|
|
-- pipeline RO is situated between the two parts of best match
|
27 |
|
|
-- decision logic.
|
28 |
|
|
|
29 |
|
|
-- PIN LIST
|
30 |
|
|
-- DOWN_PRIORITY_6_IN : Priority 6
|
31 |
|
|
-- DOWN_PRIORITY_5_IN : Priority 5
|
32 |
|
|
-- DOWN_PRIORITY_4_IN : Priority 4
|
33 |
|
|
-- DOWN_PRIORITY_3_IN : Priority 3
|
34 |
|
|
-- DOWN_PRIORITY_2_IN : Priority 2
|
35 |
|
|
-- DOWN_PRIORITY_1_IN : Priority 1 ( lowest priority)
|
36 |
|
|
-- SAME_LENGTH : same length detected
|
37 |
|
|
-- MATCH_TYPE_A_IN : Type A ( most significant )
|
38 |
|
|
-- MATCH_TYPE_B_IN : Type B
|
39 |
|
|
-- MATCH_TYPE_C_IN : Type C
|
40 |
|
|
-- MATCH_TYPE_D_IN : Type D ( less significant )
|
41 |
|
|
-- SEARCH_STRING_IN : literals
|
42 |
|
|
-- MASK_IN : 5 bit corresponding to the mask
|
43 |
|
|
-- COLUMN_OR_IN : priority 5 or
|
44 |
|
|
-- FLUSH_IN : pipeline signal from csm
|
45 |
|
|
-- COMP_IN : pipeline signal from csm
|
46 |
|
|
-- CLK : master clk
|
47 |
|
|
-- CLEAR : asyncronous clear
|
48 |
|
|
-- DOWN_PRIORITY_6_OUT
|
49 |
|
|
-- DOWN_PRIORITY_5_OUT
|
50 |
|
|
-- DOWN_PRIORITY_4_OUT
|
51 |
|
|
-- DOWN_PRIORITY_3_OUT
|
52 |
|
|
-- DOWN_PRIORITY_2_OUT
|
53 |
|
|
-- DOWN_PRIORITY_1_OUT
|
54 |
|
|
-- MATCH_TYPE_A_OUT
|
55 |
|
|
-- MATCH_TYPE_B_OUT
|
56 |
|
|
-- MATCH_TYPE_C_OUT
|
57 |
|
|
-- MATCH_TYPE_D_OUT
|
58 |
|
|
-- SEARCH_STRING_OUT
|
59 |
|
|
-- COLUMN_OR_OUT
|
60 |
|
|
-- MASK_OUT
|
61 |
|
|
-- FLUSH_OUT
|
62 |
|
|
-- COMP_OUT
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
library IEEE;
|
66 |
|
|
use IEEE.std_logic_1164.all;
|
67 |
|
|
|
68 |
|
|
entity PIPELINE_R0 is
|
69 |
|
|
port(
|
70 |
|
|
DOWN_PRIORITY_6_IN : in bit_vector(15 downto 0);
|
71 |
|
|
DOWN_PRIORITY_5_IN : in bit_vector(15 downto 0);
|
72 |
|
|
DOWN_PRIORITY_4_IN : in bit_vector(15 downto 0);
|
73 |
|
|
DOWN_PRIORITY_3_IN : in bit_vector(15 downto 0);
|
74 |
|
|
DOWN_PRIORITY_2_IN : in bit_vector(15 downto 0);
|
75 |
|
|
DOWN_PRIORITY_1_IN : in bit_vector(15 downto 0);
|
76 |
|
|
SAME_LENGTH_IN_2 : in bit_vector(15 downto 0);
|
77 |
|
|
SAME_LENGTH_IN_3 : in bit_vector(15 downto 0);
|
78 |
|
|
SAME_LENGTH_IN_4 : in bit_vector(15 downto 0);
|
79 |
|
|
MATCH_TYPE_A_IN : in bit_vector(15 downto 0);
|
80 |
|
|
MATCH_TYPE_B_IN : in bit_vector(15 downto 0);
|
81 |
|
|
MATCH_TYPE_C_IN : in bit_vector(15 downto 0);
|
82 |
|
|
MATCH_TYPE_D_IN : in bit_vector(15 downto 0);
|
83 |
|
|
SEARCH_STRING_IN : in bit_vector(31 downto 0);
|
84 |
|
|
MASK_IN : in bit_vector(4 downto 0);
|
85 |
|
|
COLUMN_OR_IN : in bit_vector(6 downto 1);
|
86 |
|
|
FLUSH_IN : in bit;
|
87 |
|
|
COMP_IN : in bit;
|
88 |
|
|
MOVE_ENABLE_IN : in bit;
|
89 |
|
|
INC_CAM_IN : in bit;
|
90 |
|
|
CLK : in bit;
|
91 |
|
|
CLEAR : in bit;
|
92 |
|
|
RESET : in bit;
|
93 |
|
|
DOWN_PRIORITY_6_OUT : out bit_vector(15 downto 0);
|
94 |
|
|
DOWN_PRIORITY_5_OUT : out bit_vector(15 downto 0);
|
95 |
|
|
DOWN_PRIORITY_4_OUT : out bit_vector(15 downto 0);
|
96 |
|
|
DOWN_PRIORITY_3_OUT : out bit_vector(15 downto 0);
|
97 |
|
|
DOWN_PRIORITY_2_OUT : out bit_vector(15 downto 0);
|
98 |
|
|
DOWN_PRIORITY_1_OUT : out bit_vector(15 downto 0);
|
99 |
|
|
SAME_LENGTH_OUT_2 : out bit_vector(15 downto 0);
|
100 |
|
|
SAME_LENGTH_OUT_3 : out bit_vector(15 downto 0);
|
101 |
|
|
SAME_LENGTH_OUT_4 : out bit_vector(15 downto 0);
|
102 |
|
|
MATCH_TYPE_A_OUT : out bit_vector(15 downto 0);
|
103 |
|
|
MATCH_TYPE_B_OUT : out bit_vector(15 downto 0);
|
104 |
|
|
MATCH_TYPE_C_OUT : out bit_vector(15 downto 0);
|
105 |
|
|
MATCH_TYPE_D_OUT : out bit_vector(15 downto 0);
|
106 |
|
|
SEARCH_STRING_OUT : out bit_vector(31 downto 0);
|
107 |
|
|
MASK_OUT : out bit_vector(4 downto 0);
|
108 |
|
|
COLUMN_OR_OUT : out bit_vector(6 downto 1);
|
109 |
|
|
FLUSH_OUT : out bit;
|
110 |
|
|
COMP_OUT : out bit;
|
111 |
|
|
MOVE_ENABLE_OUT : out bit;
|
112 |
|
|
INC_CAM_OUT : out bit
|
113 |
|
|
|
114 |
|
|
);
|
115 |
|
|
end PIPELINE_R0;
|
116 |
|
|
|
117 |
|
|
architecture STRUCTURAL of PIPELINE_R0 is
|
118 |
|
|
|
119 |
|
|
signal DOWN_PRIORITY_6_OUT_aux : bit_vector(15 downto 0);
|
120 |
|
|
signal DOWN_PRIORITY_5_OUT_aux : bit_vector(15 downto 0);
|
121 |
|
|
signal DOWN_PRIORITY_4_OUT_aux : bit_vector(15 downto 0);
|
122 |
|
|
signal DOWN_PRIORITY_3_OUT_aux : bit_vector(15 downto 0);
|
123 |
|
|
signal DOWN_PRIORITY_2_OUT_aux : bit_vector(15 downto 0);
|
124 |
|
|
signal DOWN_PRIORITY_1_OUT_aux : bit_vector(15 downto 0);
|
125 |
|
|
signal SAME_LENGTH_2_OUT_aux : bit_vector(15 downto 0);
|
126 |
|
|
signal SAME_LENGTH_3_OUT_aux : bit_vector(15 downto 0);
|
127 |
|
|
signal SAME_LENGTH_4_OUT_aux : bit_vector(15 downto 0);
|
128 |
|
|
signal MATCH_TYPE_A_OUT_aux : bit_vector(15 downto 0);
|
129 |
|
|
signal MATCH_TYPE_B_OUT_aux : bit_vector(15 downto 0);
|
130 |
|
|
signal MATCH_TYPE_C_OUT_aux : bit_vector(15 downto 0);
|
131 |
|
|
signal MATCH_TYPE_D_OUT_aux : bit_vector(15 downto 0);
|
132 |
|
|
signal SEARCH_STRING_OUT_aux : bit_vector(31 downto 0);
|
133 |
|
|
signal MASK_OUT_aux : bit_vector(4 downto 0);
|
134 |
|
|
signal COLUMN_OR_OUT_aux : bit_vector(6 downto 1);
|
135 |
|
|
signal FLUSH_OUT_aux: bit;
|
136 |
|
|
signal COMP_OUT_aux: bit;
|
137 |
|
|
signal INC_CAM_OUT_aux:bit;
|
138 |
|
|
signal MOVE_ENABLE_OUT_aux: bit;
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
begin
|
142 |
|
|
|
143 |
|
|
process(CLK,CLEAR)
|
144 |
|
|
begin
|
145 |
|
|
if (CLEAR='0') then
|
146 |
|
|
MASK_OUT_aux <= "00000";
|
147 |
|
|
DOWN_PRIORITY_6_OUT_aux <=x"0000";
|
148 |
|
|
DOWN_PRIORITY_5_OUT_aux <=x"0000";
|
149 |
|
|
DOWN_PRIORITY_4_OUT_aux <=x"0000";
|
150 |
|
|
DOWN_PRIORITY_3_OUT_aux <=x"0000";
|
151 |
|
|
DOWN_PRIORITY_2_OUT_aux <=x"0000";
|
152 |
|
|
DOWN_PRIORITY_1_OUT_aux <=x"0000";
|
153 |
|
|
SAME_LENGTH_2_OUT_aux <= x"0000";
|
154 |
|
|
SAME_LENGTH_3_OUT_aux <= x"0000";
|
155 |
|
|
SAME_LENGTH_4_OUT_aux <= x"0000";
|
156 |
|
|
MATCH_TYPE_A_OUT_aux <=x"FFFF";
|
157 |
|
|
MATCH_TYPE_B_OUT_aux <=x"FFFF";
|
158 |
|
|
MATCH_TYPE_C_OUT_aux <=x"FFFF";
|
159 |
|
|
MATCH_TYPE_D_OUT_aux <=x"FFFF";
|
160 |
|
|
SEARCH_STRING_OUT_aux <= x"00000000";
|
161 |
|
|
COLUMN_OR_OUT_aux <= "000000";
|
162 |
|
|
FLUSH_OUT_aux <= '1';
|
163 |
|
|
COMP_OUT_aux <= '1';
|
164 |
|
|
INC_CAM_OUT_aux<='0';
|
165 |
|
|
MOVE_ENABLE_OUT_aux<='1';
|
166 |
|
|
elsif ((CLK'event) and (CLK='1')) then
|
167 |
|
|
if (RESET='0') then
|
168 |
|
|
MASK_OUT_aux <= "00000";
|
169 |
|
|
DOWN_PRIORITY_6_OUT_aux <=x"0000";
|
170 |
|
|
DOWN_PRIORITY_5_OUT_aux <=x"0000";
|
171 |
|
|
DOWN_PRIORITY_4_OUT_aux <=x"0000";
|
172 |
|
|
DOWN_PRIORITY_3_OUT_aux <=x"0000";
|
173 |
|
|
DOWN_PRIORITY_2_OUT_aux <=x"0000";
|
174 |
|
|
DOWN_PRIORITY_1_OUT_aux <=x"0000";
|
175 |
|
|
SAME_LENGTH_2_OUT_aux <= x"0000";
|
176 |
|
|
SAME_LENGTH_3_OUT_aux <= x"0000";
|
177 |
|
|
SAME_LENGTH_4_OUT_aux <= x"0000";
|
178 |
|
|
MATCH_TYPE_A_OUT_aux <=x"FFFF";
|
179 |
|
|
MATCH_TYPE_B_OUT_aux <=x"FFFF";
|
180 |
|
|
MATCH_TYPE_C_OUT_aux <=x"FFFF";
|
181 |
|
|
MATCH_TYPE_D_OUT_aux <=x"FFFF";
|
182 |
|
|
SEARCH_STRING_OUT_aux <= x"00000000";
|
183 |
|
|
COLUMN_OR_OUT_aux <= "000000";
|
184 |
|
|
FLUSH_OUT_aux <= '1';
|
185 |
|
|
COMP_OUT_aux <= '1';
|
186 |
|
|
INC_CAM_OUT_aux<='0';
|
187 |
|
|
MOVE_ENABLE_OUT_aux<='1';
|
188 |
|
|
else
|
189 |
|
|
MASK_OUT_aux <= MASK_IN;
|
190 |
|
|
DOWN_PRIORITY_6_OUT_aux <= DOWN_PRIORITY_6_IN;
|
191 |
|
|
DOWN_PRIORITY_5_OUT_aux <= DOWN_PRIORITY_5_IN;
|
192 |
|
|
DOWN_PRIORITY_4_OUT_aux <= DOWN_PRIORITY_4_IN;
|
193 |
|
|
DOWN_PRIORITY_3_OUT_aux <= DOWN_PRIORITY_3_IN;
|
194 |
|
|
DOWN_PRIORITY_2_OUT_aux <= DOWN_PRIORITY_2_IN;
|
195 |
|
|
DOWN_PRIORITY_1_OUT_aux <= DOWN_PRIORITY_1_IN;
|
196 |
|
|
SAME_LENGTH_2_OUT_aux <= SAME_LENGTH_IN_2;
|
197 |
|
|
SAME_LENGTH_3_OUT_aux <= SAME_LENGTH_IN_3;
|
198 |
|
|
SAME_LENGTH_4_OUT_aux <= SAME_LENGTH_IN_4;
|
199 |
|
|
MATCH_TYPE_A_OUT_aux <= MATCH_TYPE_A_IN;
|
200 |
|
|
SEARCH_STRING_OUT_aux <= SEARCH_STRING_IN;
|
201 |
|
|
MATCH_TYPE_B_OUT_aux <= MATCH_TYPE_B_IN;
|
202 |
|
|
MATCH_TYPE_C_OUT_aux <= MATCH_TYPE_C_IN;
|
203 |
|
|
MATCH_TYPE_D_OUT_aux <= MATCH_TYPE_D_IN;
|
204 |
|
|
COLUMN_OR_OUT_aux <= COLUMN_OR_IN;
|
205 |
|
|
FLUSH_OUT_aux <= FLUSH_IN;
|
206 |
|
|
COMP_OUT_aux <= COMP_IN;
|
207 |
|
|
INC_CAM_OUT_aux<=INC_CAM_IN;
|
208 |
|
|
MOVE_ENABLE_OUT_aux<=MOVE_ENABLE_IN;
|
209 |
|
|
end if;
|
210 |
|
|
end if;
|
211 |
|
|
end process;
|
212 |
|
|
|
213 |
|
|
MASK_OUT <= MASK_OUT_aux;
|
214 |
|
|
DOWN_PRIORITY_6_OUT <= DOWN_PRIORITY_6_OUT_aux;
|
215 |
|
|
DOWN_PRIORITY_5_OUT <= DOWN_PRIORITY_5_OUT_aux;
|
216 |
|
|
DOWN_PRIORITY_4_OUT <= DOWN_PRIORITY_4_OUT_aux;
|
217 |
|
|
DOWN_PRIORITY_3_OUT <= DOWN_PRIORITY_3_OUT_aux;
|
218 |
|
|
DOWN_PRIORITY_2_OUT <= DOWN_PRIORITY_2_OUT_aux;
|
219 |
|
|
DOWN_PRIORITY_1_OUT <= DOWN_PRIORITY_1_OUT_aux;
|
220 |
|
|
SAME_LENGTH_OUT_2 <= SAME_LENGTH_2_OUT_aux;
|
221 |
|
|
SAME_LENGTH_OUT_3 <= SAME_LENGTH_3_OUT_aux;
|
222 |
|
|
SAME_LENGTH_OUT_4 <= SAME_LENGTH_4_OUT_aux;
|
223 |
|
|
MATCH_TYPE_A_OUT <= MATCH_TYPE_A_OUT_aux;
|
224 |
|
|
MATCH_TYPE_B_OUT <= MATCH_TYPE_B_OUT_aux;
|
225 |
|
|
MATCH_TYPE_C_OUT <= MATCH_TYPE_C_OUT_aux;
|
226 |
|
|
MATCH_TYPE_D_OUT <= MATCH_TYPE_D_OUT_aux;
|
227 |
|
|
COLUMN_OR_OUT <= COLUMN_OR_OUT_aux;
|
228 |
|
|
FLUSH_OUT <= FLUSH_OUT_aux;
|
229 |
|
|
COMP_OUT <= COMP_OUT_aux;
|
230 |
|
|
SEARCH_STRING_OUT <= SEARCH_STRING_OUT_aux;
|
231 |
|
|
INC_CAM_OUT <= INC_CAM_OUT_aux;
|
232 |
|
|
MOVE_ENABLE_OUT<=MOVE_ENABLE_OUT_aux;
|
233 |
|
|
|
234 |
|
|
-- DOWN_PRIORITY_5_OUT <= DOWN_PRIORITY_5_IN;
|
235 |
|
|
-- DOWN_PRIORITY_4_OUT <= DOWN_PRIORITY_4_IN;
|
236 |
|
|
-- DOWN_PRIORITY_3_OUT <= DOWN_PRIORITY_3_IN;
|
237 |
|
|
-- DOWN_PRIORITY_2_OUT <= DOWN_PRIORITY_2_IN;
|
238 |
|
|
-- DOWN_PRIORITY_1_OUT <= DOWN_PRIORITY_1_IN;
|
239 |
|
|
-- MATCH_TYPE_A_OUT <= MATCH_TYPE_A_IN;
|
240 |
|
|
-- MATCH_TYPE_B_OUT <= MATCH_TYPE_B_IN;
|
241 |
|
|
-- MATCH_TYPE_C_OUT <= MATCH_TYPE_C_IN;
|
242 |
|
|
-- MATCH_TYPE_D_OUT <= MATCH_TYPE_D_IN;
|
243 |
|
|
-- COLUMN_OR_OUT <= COLUMN_OR_IN;
|
244 |
|
|
-- FLUSH_OUT <= FLUSH_IN;
|
245 |
|
|
-- COMP_OUT <= COMP_IN;
|
246 |
|
|
-- SEARCH_STRING_OUT <= SEARCH_STRING_IN;
|
247 |
|
|
|
248 |
|
|
end structural;
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
|
254 |
|
|
|