Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / fflp_pio_if.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: fflp_pio_if.v
4// Copyright (C) 1995-2007 Sun Microsystems, Inc. All Rights Reserved
5// 4150 Network Circle, Santa Clara, California 95054, U.S.A.
6//
7// * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; version 2 of the License.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program; if not, write to the Free Software
20// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21//
22// For the avoidance of doubt, and except that if any non-GPL license
23// choice is available it will apply instead, Sun elects to use only
24// the General Public License version 2 (GPLv2) at this time for any
25// software where a choice of GPL license versions is made
26// available with the language indicating that GPLv2 or any later version
27// may be used, or where a choice of which version of the GPL is applied is
28// otherwise unspecified.
29//
30// Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
31// CA 95054 USA or visit www.sun.com if you need additional information or
32// have any questions.
33//
34// ========== Copyright Header End ============================================
35/**********************************************************************/
36/*project name: NIU */
37/*module name: fflp_pio_if */
38/*description: pio registers for hdr matching and pio interface */
39/* control logic and data mux */
40/* */
41/*parent module in: fflp_pio_if.v */
42/*child modules in: none */
43/*interface modules: */
44/*author name: Jeanne Cai */
45/*date created: 03-18-04 */
46/* */
47/* Copyright (c) 2004, Sun Microsystems, Inc. */
48/* Sun Proprietary and Confidential */
49/* */
50/*modifications: */
51/* */
52/**********************************************************************/
53module fflp_pio_if(
54 cclk,
55 reset_l,
56 pio_fflp_wdata,
57 pio_fflp_rd,
58 pio_fflp_sel,
59 pio_fflp_addr,
60 pio_client_32b,
61 cam_key_reg0_dout,
62 cam_key_reg1_dout,
63 cam_key_reg2_dout,
64 cam_key_reg3_dout,
65 cam_key_mask_reg0_dout,
66 cam_key_mask_reg1_dout,
67 cam_key_mask_reg2_dout,
68 cam_key_mask_reg3_dout,
69 cam_cmd_stat_reg_dout,
70 vlan_tbl_din_reg_dout,
71 vlan_parity_err_log_en,
72 vlan_tag_id,
73 cpu_vlan_gnt_3,
74 cpu_fc_req_done_sync,
75 fc_rd_data_reg_dout,
76 fc_rd_ecc_err,
77 fflp_zcp_wr_p,
78 fc_err_status,
79 ecc_parity_status,
80 cpu_fio_req_done_sync,
81 cpu_fio_rd_data,
82 fio_cal_rd_latency,
83
84 reset_s,
85 pio_wen,
86 pio_addr,
87 pio_wr_data,
88 pio_32b_mode,
89 fflp_pio_rdata,
90 fflp_pio_ack,
91 fflp_pio_err,
92 fflp_pio_intr,
93 snap_en,
94 disable_chksum,
95 pio_disable_cam,
96 fflp_init_done,
97 fcram_driver_imp_ctrl,
98 fcram_qs_mode,
99 fcram_lookup_ratio,
100 pio_fio_latency,
101 cam_srch_ratio,
102 cam_srch_latency,
103 h1_init_value_reg_dout,
104 h2_init_value_reg_dout,
105 fcram_refresh_timer_reg_dout,
106 class2_hdr_byte_value,
107 class3_hdr_byte_value,
108 class4_hdr_byte_value,
109 class5_hdr_byte_value,
110 class6_hdr_byte_value,
111 class7_hdr_byte_value,
112 class_action_reg4_dout,
113 class_action_reg5_dout,
114 class_action_reg6_dout,
115 class_action_reg7_dout,
116 class_action_reg8_dout,
117 class_action_reg9_dout,
118 class_action_reg10_dout,
119 class_action_reg11_dout,
120 class_action_reg12_dout,
121 class_action_reg13_dout,
122 class_action_reg14_dout,
123 class_action_reg15_dout,
124 f_key_class_action_reg4_dout,
125 f_key_class_action_reg5_dout,
126 f_key_class_action_reg6_dout,
127 f_key_class_action_reg7_dout,
128 f_key_class_action_reg8_dout,
129 f_key_class_action_reg9_dout,
130 f_key_class_action_reg10_dout,
131 f_key_class_action_reg11_dout,
132 f_key_class_action_reg12_dout,
133 f_key_class_action_reg13_dout,
134 f_key_class_action_reg14_dout,
135 f_key_class_action_reg15_dout,
136 hdr_ctrl_bit_mask_reg_dout,
137 cpu_vlan_req,
138 cpu_vlan_rd,
139 cpu_vlan_wr,
140 cpu_vlan_addr,
141 vlan_tbl_wr_dout,
142 flow_part_sel_reg0_dout,
143 flow_part_sel_reg1_dout,
144 flow_part_sel_reg2_dout,
145 flow_part_sel_reg3_dout,
146 flow_part_sel_reg4_dout,
147 flow_part_sel_reg5_dout,
148 flow_part_sel_reg6_dout,
149 flow_part_sel_reg7_dout,
150 hash_tbl_addr_reg0_dout,
151 hash_tbl_addr_reg1_dout,
152 hash_tbl_addr_reg2_dout,
153 hash_tbl_addr_reg3_dout,
154 hash_tbl_addr_reg4_dout,
155 hash_tbl_addr_reg5_dout,
156 hash_tbl_addr_reg6_dout,
157 hash_tbl_addr_reg7_dout,
158 hash_tbl_data_reg0_dout,
159 hash_tbl_data_reg1_dout,
160 hash_tbl_data_reg2_dout,
161 hash_tbl_data_reg3_dout,
162 hash_tbl_data_reg4_dout,
163 hash_tbl_data_reg5_dout,
164 hash_tbl_data_reg6_dout,
165 hash_tbl_data_reg7_dout,
166 fcram_err_test_reg_dout,
167 cpu_req_part0_sel,
168 cpu_req_part1_sel,
169 cpu_req_part2_sel,
170 cpu_req_part3_sel,
171 cpu_req_part4_sel,
172 cpu_req_part5_sel,
173 cpu_req_part6_sel,
174 cpu_req_part7_sel,
175 pio_rd,
176 cpu_fcram_req,
177 cpu_fio_req,
178 pio_fio_cfg_reset,
179 fio_cfg_addr_reg_dout,
180 fflp_config_reg_wen_pulse,
181 debug_training_vector,
182 pio_debug_data_sel
183
184 );
185
186input cclk;
187input reset_l;
188input[63:0] pio_fflp_wdata;
189input pio_fflp_rd;
190input pio_fflp_sel;
191input[19:0] pio_fflp_addr;
192input pio_client_32b;
193input[7:0] cam_key_reg0_dout;
194input[63:0] cam_key_reg1_dout;
195input[63:0] cam_key_reg2_dout;
196input[63:0] cam_key_reg3_dout;
197input[7:0] cam_key_mask_reg0_dout;
198input[63:0] cam_key_mask_reg1_dout;
199input[63:0] cam_key_mask_reg2_dout;
200input[63:0] cam_key_mask_reg3_dout;
201input[20:0] cam_cmd_stat_reg_dout;
202input[17:0] vlan_tbl_din_reg_dout;
203input vlan_parity_err_log_en;
204input[11:0] vlan_tag_id;
205input cpu_vlan_gnt_3;
206input cpu_fc_req_done_sync;
207input[71:0] fc_rd_data_reg_dout;
208input fc_rd_ecc_err;
209input fflp_zcp_wr_p;
210input[33:0] fc_err_status;
211input[25:0] ecc_parity_status;
212input cpu_fio_req_done_sync;
213input[31:0] cpu_fio_rd_data;
214input[7:0] fio_cal_rd_latency;
215
216output reset_s;
217output pio_wen;
218output[19:0] pio_addr;
219output[63:0] pio_wr_data;
220output pio_32b_mode;
221output[63:0] fflp_pio_rdata;
222output fflp_pio_ack;
223output fflp_pio_err;
224output fflp_pio_intr;
225output snap_en;
226output disable_chksum;
227output pio_disable_cam;
228output fflp_init_done;
229output[3:0] fcram_driver_imp_ctrl;
230output fcram_qs_mode;
231output[3:0] fcram_lookup_ratio;
232output[1:0] pio_fio_latency;
233output[3:0] cam_srch_ratio;
234output[3:0] cam_srch_latency;
235output[31:0] h1_init_value_reg_dout;
236output[15:0] h2_init_value_reg_dout;
237output[31:0] fcram_refresh_timer_reg_dout;
238output[16:0] class2_hdr_byte_value;
239output[16:0] class3_hdr_byte_value;
240output[25:0] class4_hdr_byte_value;
241output[25:0] class5_hdr_byte_value;
242output[25:0] class6_hdr_byte_value;
243output[25:0] class7_hdr_byte_value;
244output[2:0] class_action_reg4_dout;
245output[2:0] class_action_reg5_dout;
246output[2:0] class_action_reg6_dout;
247output[2:0] class_action_reg7_dout;
248output[2:0] class_action_reg8_dout;
249output[2:0] class_action_reg9_dout;
250output[2:0] class_action_reg10_dout;
251output[2:0] class_action_reg11_dout;
252output[2:0] class_action_reg12_dout;
253output[2:0] class_action_reg13_dout;
254output[2:0] class_action_reg14_dout;
255output[2:0] class_action_reg15_dout;
256output[9:0] f_key_class_action_reg4_dout;
257output[9:0] f_key_class_action_reg5_dout;
258output[9:0] f_key_class_action_reg6_dout;
259output[9:0] f_key_class_action_reg7_dout;
260output[9:0] f_key_class_action_reg8_dout;
261output[9:0] f_key_class_action_reg9_dout;
262output[9:0] f_key_class_action_reg10_dout;
263output[9:0] f_key_class_action_reg11_dout;
264output[9:0] f_key_class_action_reg12_dout;
265output[9:0] f_key_class_action_reg13_dout;
266output[9:0] f_key_class_action_reg14_dout;
267output[9:0] f_key_class_action_reg15_dout;
268output[11:0] hdr_ctrl_bit_mask_reg_dout;
269output cpu_vlan_req;
270output cpu_vlan_rd;
271output cpu_vlan_wr;
272output[11:0] cpu_vlan_addr;
273output[17:0] vlan_tbl_wr_dout;
274output[10:0] flow_part_sel_reg0_dout;
275output[10:0] flow_part_sel_reg1_dout;
276output[10:0] flow_part_sel_reg2_dout;
277output[10:0] flow_part_sel_reg3_dout;
278output[10:0] flow_part_sel_reg4_dout;
279output[10:0] flow_part_sel_reg5_dout;
280output[10:0] flow_part_sel_reg6_dout;
281output[10:0] flow_part_sel_reg7_dout;
282output[23:0] hash_tbl_addr_reg0_dout;
283output[23:0] hash_tbl_addr_reg1_dout;
284output[23:0] hash_tbl_addr_reg2_dout;
285output[23:0] hash_tbl_addr_reg3_dout;
286output[23:0] hash_tbl_addr_reg4_dout;
287output[23:0] hash_tbl_addr_reg5_dout;
288output[23:0] hash_tbl_addr_reg6_dout;
289output[23:0] hash_tbl_addr_reg7_dout;
290output[63:0] hash_tbl_data_reg0_dout;
291output[63:0] hash_tbl_data_reg1_dout;
292output[63:0] hash_tbl_data_reg2_dout;
293output[63:0] hash_tbl_data_reg3_dout;
294output[63:0] hash_tbl_data_reg4_dout;
295output[63:0] hash_tbl_data_reg5_dout;
296output[63:0] hash_tbl_data_reg6_dout;
297output[63:0] hash_tbl_data_reg7_dout;
298output[71:0] fcram_err_test_reg_dout;
299output cpu_req_part0_sel;
300output cpu_req_part1_sel;
301output cpu_req_part2_sel;
302output cpu_req_part3_sel;
303output cpu_req_part4_sel;
304output cpu_req_part5_sel;
305output cpu_req_part6_sel;
306output cpu_req_part7_sel;
307output pio_rd;
308output cpu_fcram_req;
309output cpu_fio_req;
310output pio_fio_cfg_reset;
311output[7:0] fio_cfg_addr_reg_dout;
312output fflp_config_reg_wen_pulse;
313output[31:0] debug_training_vector;
314output[2:0] pio_debug_data_sel;
315
316
317wire fflp_pio_sel;
318wire pio_rd;
319wire[19:0] pio_addr;
320wire[63:0] pio_wr_data;
321wire pio_32b_mode;
322
323wire pio_selected;
324wire pio_sel_pulse_dly1;
325wire fflp_pio_ack_en;
326wire pio_addr_err_in;
327wire fflp_pio_ack;
328wire fflp_pio_err;
329wire fflp_pio_rdata_en;
330wire[63:0] fflp_pio_rdata_in;
331wire[63:0] fflp_pio_rdata;
332wire pio_wen_en;
333wire pio_wen;
334
335reg[63:0] pio_rd_data_tmp;
336reg pio_addr_err;
337
338wire cpu_vlan_req_en;
339wire cpu_vlan_req_in;
340wire cpu_vlan_req;
341
342wire[31:0] vlan_parity_err_log_tmp;
343wire[31:0] vlan_parity_err_log_mux;
344wire[31:0] vlan_parity_err_log_reg_dout;
345wire vlan_parity_err_log_wen;
346wire vlan_parity_err_log_pio_wen;
347
348wire cpu_vlan_rd;
349wire cpu_vlan_wr;
350wire is_vlan_addr;
351wire[11:0] cpu_vlan_addr;
352wire[17:0] vlan_tbl_wr_dout;
353wire[17:0] vlan_tbl_rd_data;
354
355wire cpu_fc_req_done_sync_d;
356wire cpu_fc_req_done_p;
357wire cpu_fc_req_done_p1;
358wire is_fcram_data_addr;
359wire is_ext_fcram;
360wire is_fcram_req;
361wire cpu_fcram_req_en;
362wire cpu_fcram_req_in;
363wire cpu_fcram_req;
364
365wire cpu_fio_req_done_sync_d;
366wire cpu_fio_req_done_p;
367wire is_fio_data_addr;
368wire is_ext_fio;
369wire cpu_fio_req_en;
370wire cpu_fio_req_in;
371wire cpu_fio_req;
372
373wire[16:0] class2_hdr_byte_value;
374wire[16:0] class3_hdr_byte_value;
375wire[25:0] class4_hdr_byte_value;
376wire[25:0] class5_hdr_byte_value;
377wire[25:0] class6_hdr_byte_value;
378wire[25:0] class7_hdr_byte_value;
379
380wire class2_hdr_byte_value_pio_wen;
381wire class3_hdr_byte_value_pio_wen;
382wire class4_hdr_byte_value_pio_wen;
383wire class5_hdr_byte_value_pio_wen;
384wire class6_hdr_byte_value_pio_wen;
385wire class7_hdr_byte_value_pio_wen;
386
387wire[2:0] class_action_reg4_dout;
388wire[2:0] class_action_reg5_dout;
389wire[2:0] class_action_reg6_dout;
390wire[2:0] class_action_reg7_dout;
391wire[2:0] class_action_reg8_dout;
392wire[2:0] class_action_reg9_dout;
393wire[2:0] class_action_reg10_dout;
394wire[2:0] class_action_reg11_dout;
395wire[2:0] class_action_reg12_dout;
396wire[2:0] class_action_reg13_dout;
397wire[2:0] class_action_reg14_dout;
398wire[2:0] class_action_reg15_dout;
399
400wire class_action_reg4_pio_wen;
401wire class_action_reg5_pio_wen;
402wire class_action_reg6_pio_wen;
403wire class_action_reg7_pio_wen;
404wire class_action_reg8_pio_wen;
405wire class_action_reg9_pio_wen;
406wire class_action_reg10_pio_wen;
407wire class_action_reg11_pio_wen;
408wire class_action_reg12_pio_wen;
409wire class_action_reg13_pio_wen;
410wire class_action_reg14_pio_wen;
411wire class_action_reg15_pio_wen;
412
413wire[9:0] f_key_class_action_reg4_dout;
414wire[9:0] f_key_class_action_reg5_dout;
415wire[9:0] f_key_class_action_reg6_dout;
416wire[9:0] f_key_class_action_reg7_dout;
417wire[9:0] f_key_class_action_reg8_dout;
418wire[9:0] f_key_class_action_reg9_dout;
419wire[9:0] f_key_class_action_reg10_dout;
420wire[9:0] f_key_class_action_reg11_dout;
421wire[9:0] f_key_class_action_reg12_dout;
422wire[9:0] f_key_class_action_reg13_dout;
423wire[9:0] f_key_class_action_reg14_dout;
424wire[9:0] f_key_class_action_reg15_dout;
425
426wire f_key_class_action_reg4_pio_wen;
427wire f_key_class_action_reg5_pio_wen;
428wire f_key_class_action_reg6_pio_wen;
429wire f_key_class_action_reg7_pio_wen;
430wire f_key_class_action_reg8_pio_wen;
431wire f_key_class_action_reg9_pio_wen;
432wire f_key_class_action_reg10_pio_wen;
433wire f_key_class_action_reg11_pio_wen;
434wire f_key_class_action_reg12_pio_wen;
435wire f_key_class_action_reg13_pio_wen;
436wire f_key_class_action_reg14_pio_wen;
437wire f_key_class_action_reg15_pio_wen;
438
439wire h1_init_value_reg_pio_wen;
440wire h2_init_value_reg_pio_wen;
441wire flow_part_sel_reg0_pio_wen;
442wire flow_part_sel_reg1_pio_wen;
443wire flow_part_sel_reg2_pio_wen;
444wire flow_part_sel_reg3_pio_wen;
445wire flow_part_sel_reg4_pio_wen;
446wire flow_part_sel_reg5_pio_wen;
447wire flow_part_sel_reg6_pio_wen;
448wire flow_part_sel_reg7_pio_wen;
449
450wire hash_tbl_addr_reg0_pio_wen;
451wire hash_tbl_addr_reg1_pio_wen;
452wire hash_tbl_addr_reg2_pio_wen;
453wire hash_tbl_addr_reg3_pio_wen;
454wire hash_tbl_addr_reg4_pio_wen;
455wire hash_tbl_addr_reg5_pio_wen;
456wire hash_tbl_addr_reg6_pio_wen;
457wire hash_tbl_addr_reg7_pio_wen;
458
459wire hash_tbl_addr_inc_wen0;
460wire hash_tbl_addr_inc_wen1;
461wire hash_tbl_addr_inc_wen2;
462wire hash_tbl_addr_inc_wen3;
463wire hash_tbl_addr_inc_wen4;
464wire hash_tbl_addr_inc_wen5;
465wire hash_tbl_addr_inc_wen6;
466wire hash_tbl_addr_inc_wen7;
467
468wire hash_tbl_addr_reg0_wen;
469wire hash_tbl_addr_reg1_wen;
470wire hash_tbl_addr_reg2_wen;
471wire hash_tbl_addr_reg3_wen;
472wire hash_tbl_addr_reg4_wen;
473wire hash_tbl_addr_reg5_wen;
474wire hash_tbl_addr_reg6_wen;
475wire hash_tbl_addr_reg7_wen;
476
477wire cpu_req_part0_sel;
478wire cpu_req_part1_sel;
479wire cpu_req_part2_sel;
480wire cpu_req_part3_sel;
481wire cpu_req_part4_sel;
482wire cpu_req_part5_sel;
483wire cpu_req_part6_sel;
484wire cpu_req_part7_sel;
485
486wire[22:0] curr_hash_tbl_addr;
487wire[22:0] next_hash_tbl_addr;
488wire[22:0] next_hash_tbl_addr_r;
489
490wire[23:0] hash_tbl_addr_reg0_mux;
491wire[23:0] hash_tbl_addr_reg1_mux;
492wire[23:0] hash_tbl_addr_reg2_mux;
493wire[23:0] hash_tbl_addr_reg3_mux;
494wire[23:0] hash_tbl_addr_reg4_mux;
495wire[23:0] hash_tbl_addr_reg5_mux;
496wire[23:0] hash_tbl_addr_reg6_mux;
497wire[23:0] hash_tbl_addr_reg7_mux;
498
499wire hash_tbl_data_reg0_pio_wen;
500wire hash_tbl_data_reg1_pio_wen;
501wire hash_tbl_data_reg2_pio_wen;
502wire hash_tbl_data_reg3_pio_wen;
503wire hash_tbl_data_reg4_pio_wen;
504wire hash_tbl_data_reg5_pio_wen;
505wire hash_tbl_data_reg6_pio_wen;
506wire hash_tbl_data_reg7_pio_wen;
507
508wire hash_tbl_data_reg0_h_pio_wen;
509wire hash_tbl_data_reg1_h_pio_wen;
510wire hash_tbl_data_reg2_h_pio_wen;
511wire hash_tbl_data_reg3_h_pio_wen;
512wire hash_tbl_data_reg4_h_pio_wen;
513wire hash_tbl_data_reg5_h_pio_wen;
514wire hash_tbl_data_reg6_h_pio_wen;
515wire hash_tbl_data_reg7_h_pio_wen;
516
517wire hash_tbl_data_reg0_wen;
518wire hash_tbl_data_reg1_wen;
519wire hash_tbl_data_reg2_wen;
520wire hash_tbl_data_reg3_wen;
521wire hash_tbl_data_reg4_wen;
522wire hash_tbl_data_reg5_wen;
523wire hash_tbl_data_reg6_wen;
524wire hash_tbl_data_reg7_wen;
525
526wire hash_tbl_data_reg0_h_wen;
527wire hash_tbl_data_reg1_h_wen;
528wire hash_tbl_data_reg2_h_wen;
529wire hash_tbl_data_reg3_h_wen;
530wire hash_tbl_data_reg4_h_wen;
531wire hash_tbl_data_reg5_h_wen;
532wire hash_tbl_data_reg6_h_wen;
533wire hash_tbl_data_reg7_h_wen;
534
535wire hash_tbl_ecc_log_reg0_pio_wen;
536wire hash_tbl_ecc_log_reg1_pio_wen;
537wire hash_tbl_ecc_log_reg2_pio_wen;
538wire hash_tbl_ecc_log_reg3_pio_wen;
539wire hash_tbl_ecc_log_reg4_pio_wen;
540wire hash_tbl_ecc_log_reg5_pio_wen;
541wire hash_tbl_ecc_log_reg6_pio_wen;
542wire hash_tbl_ecc_log_reg7_pio_wen;
543
544wire hash_tbl_ecc_log_reg0_wen;
545wire hash_tbl_ecc_log_reg1_wen;
546wire hash_tbl_ecc_log_reg2_wen;
547wire hash_tbl_ecc_log_reg3_wen;
548wire hash_tbl_ecc_log_reg4_wen;
549wire hash_tbl_ecc_log_reg5_wen;
550wire hash_tbl_ecc_log_reg6_wen;
551wire hash_tbl_ecc_log_reg7_wen;
552
553wire fcram_err_test_reg0_pio_wen;
554wire fcram_err_test_reg1_pio_wen;
555wire fcram_err_test_reg2_pio_wen;
556
557wire[7:0] fcram_err_test_reg0_dout;
558wire[31:0] fcram_err_test_reg1_dout;
559wire[31:0] fcram_err_test_reg2_dout;
560wire[71:0] fcram_err_test_reg_dout;
561
562wire[31:0] hash_tbl_data_reg_mux;
563wire[31:0] hash_tbl_data_reg_h_mux;
564wire[31:0] hash_tbl_ecc_log_reg_mux;
565
566wire[31:0] h1_init_value_reg_dout;
567wire[15:0] h2_init_value_reg_dout;
568
569wire[10:0] flow_part_sel_reg0_dout;
570wire[10:0] flow_part_sel_reg1_dout;
571wire[10:0] flow_part_sel_reg2_dout;
572wire[10:0] flow_part_sel_reg3_dout;
573wire[10:0] flow_part_sel_reg4_dout;
574wire[10:0] flow_part_sel_reg5_dout;
575wire[10:0] flow_part_sel_reg6_dout;
576wire[10:0] flow_part_sel_reg7_dout;
577
578wire[23:0] hash_tbl_addr_reg0_dout;
579wire[23:0] hash_tbl_addr_reg1_dout;
580wire[23:0] hash_tbl_addr_reg2_dout;
581wire[23:0] hash_tbl_addr_reg3_dout;
582wire[23:0] hash_tbl_addr_reg4_dout;
583wire[23:0] hash_tbl_addr_reg5_dout;
584wire[23:0] hash_tbl_addr_reg6_dout;
585wire[23:0] hash_tbl_addr_reg7_dout;
586
587wire[63:0] hash_tbl_data_reg0_dout;
588wire[63:0] hash_tbl_data_reg1_dout;
589wire[63:0] hash_tbl_data_reg2_dout;
590wire[63:0] hash_tbl_data_reg3_dout;
591wire[63:0] hash_tbl_data_reg4_dout;
592wire[63:0] hash_tbl_data_reg5_dout;
593wire[63:0] hash_tbl_data_reg6_dout;
594wire[63:0] hash_tbl_data_reg7_dout;
595
596wire[31:0] hash_tbl_ecc_log_reg0_dout;
597wire[31:0] hash_tbl_ecc_log_reg1_dout;
598wire[31:0] hash_tbl_ecc_log_reg2_dout;
599wire[31:0] hash_tbl_ecc_log_reg3_dout;
600wire[31:0] hash_tbl_ecc_log_reg4_dout;
601wire[31:0] hash_tbl_ecc_log_reg5_dout;
602wire[31:0] hash_tbl_ecc_log_reg6_dout;
603wire[31:0] hash_tbl_ecc_log_reg7_dout;
604
605wire hash_lookup_log_reg0_pio_wen;
606wire hash_lookup_log_reg1_pio_wen;
607wire hash_lookup_log_reg0_en;
608wire hash_lookup_log_reg1_en;
609wire hash_lookup_log_reg0_wen;
610wire hash_lookup_log_reg1_wen;
611wire hash_lookup_log_reg0_din_bit1;
612wire hash_lookup_log_reg0_din_bit0;
613wire hash_lookup_log_reg0_din_bit2;
614wire[3:0] hash_lookup_log_reg0_din;
615wire[3:0] hash_lookup_log_reg0_mux;
616wire[30:0] hash_lookup_log_reg1_mux;
617wire[3:0] hash_lookup_log_reg0_dout;
618wire[30:0] hash_lookup_log_reg1_dout;
619
620wire cam_ecc_log_reg_pio_wen;
621wire cam_ecc_log_reg_wen;
622wire[26:0] cam_ecc_log_reg_din;
623wire[26:0] cam_ecc_log_reg_mux;
624wire[26:0] cam_ecc_log_reg_dout;
625
626wire fflp_config_reg_pio_wen;
627wire hdr_ctrl_bit_mask_reg_pio_wen;
628wire fcram_refresh_timer_reg_pio_wen;
629wire fio_cfg_addr_reg_pio_wen;
630wire debug_training_vector_pio_wen;
631
632wire snap_en;
633wire fflp_init_done;
634wire disable_chksum;
635wire pio_disable_cam;
636wire[3:0] fcram_driver_imp_ctrl;
637wire fcram_qs_mode;
638wire[3:0] fcram_lookup_ratio_i;
639wire[3:0] fcram_lookup_ratio;
640wire[3:0] cam_srch_ratio_i;
641wire[3:0] cam_srch_ratio;
642wire[3:0] cam_srch_latency_i;
643wire[3:0] cam_srch_latency;
644wire[1:0] pio_fio_latency;
645wire pio_fio_cfg_reset;
646wire[2:0] pio_debug_data_sel;
647wire[26:0] fflp_config_reg_dout;
648wire[11:0] hdr_ctrl_bit_mask_reg_dout;
649wire[31:0] fcram_refresh_timer_reg_dout;
650wire[7:0] fio_cfg_addr_reg_dout;
651wire[31:0] debug_training_vector;
652wire pio_sel_pulse;
653wire fflp_config_reg_wen_pulse_in;
654wire fflp_config_reg_wen_pulse;
655
656wire fflp_err_intr_mask_wen;
657wire[10:0] fflp_err_intr_bits;
658wire fflp_pio_intr_in;
659wire fflp_pio_intr;
660reg[10:0] fflp_err_intr_mask_reg_dout;
661
662
663wire reset_s;
664wire reset_in = !reset_l;
665
666niu_dff #(1) reset_s_reg (cclk, reset_in, reset_s);
667
668
669/**************************/
670//pio ack logic
671/**************************/
672assign pio_sel_pulse = fflp_pio_sel & !pio_selected;
673
674dffr #(1) fflp_pio_sel_reg (cclk, reset_s, pio_fflp_sel, fflp_pio_sel);
675dffr #(1) pio_rd_reg (cclk, reset_s, pio_fflp_rd, pio_rd);
676dffr #(20) pio_addr_reg (cclk, reset_s, pio_fflp_addr, pio_addr);
677dffr #(64) pio_wr_data_reg (cclk, reset_s, pio_fflp_wdata, pio_wr_data);
678dffr #(1) pio_selected_reg (cclk, reset_s, fflp_pio_sel, pio_selected);
679dffr #(1) pio_sel_pulse_dly1_reg (cclk, reset_s, pio_sel_pulse, pio_sel_pulse_dly1);
680dffr #(1) pio_32b_mode_reg (cclk, reset_s, pio_client_32b, pio_32b_mode);
681
682assign fflp_pio_ack_en = pio_sel_pulse_dly1 & !(cpu_fcram_req | cpu_vlan_req | cpu_fio_req) |
683 cpu_vlan_req & cpu_vlan_gnt_3 | cpu_fcram_req & cpu_fc_req_done_p1 |
684 cpu_fio_req & cpu_fio_req_done_p;
685assign pio_addr_err_in = pio_sel_pulse_dly1 & pio_addr_err & pio_rd;
686
687dffr #(1) fflp_pio_ack_reg (cclk, reset_s, fflp_pio_ack_en, fflp_pio_ack);
688dffr #(1) fflp_pio_err_reg (cclk, reset_s, pio_addr_err_in, fflp_pio_err);
689
690assign fflp_pio_rdata_en = fflp_pio_ack_en & pio_rd;
691assign fflp_pio_rdata_in = pio_addr_err_in ? 64'b0 : pio_rd_data_tmp;
692
693dffre #(64) fflp_pio_rdata_reg (cclk, reset_s, fflp_pio_rdata_en, fflp_pio_rdata_in, fflp_pio_rdata);
694
695/*
696always @ (posedge cclk)
697if (reset_s)
698 fflp_pio_rdata <= 64'b0;
699else if (pio_sel_pulse_dly1 & pio_rd & pio_addr_err)
700 fflp_pio_rdata <= 64'b0;
701else if ((pio_sel_pulse_dly1 & !cpu_vlan_req | cpu_vlan_req & cpu_vlan_gnt_3) & pio_rd)
702 fflp_pio_rdata <= pio_rd_data_tmp;
703else
704 fflp_pio_rdata <= fflp_pio_rdata;
705*/
706
707//pio read enable for ACR and write enable logic
708//read pio data is 2 mult-cycles
709
710assign pio_wen_en = pio_sel_pulse & !pio_rd;
711
712dffr #(1) pio_wen_reg (cclk, reset_s, pio_wen_en, pio_wen);
713dffr #(1) fflp_config_reg_wen_pulse_reg (cclk, reset_s, fflp_config_reg_wen_pulse_in, fflp_config_reg_wen_pulse);
714
715
716assign fflp_config_reg_wen_pulse_in = (pio_sel_pulse | pio_sel_pulse_dly1) & !pio_rd & (pio_addr == 20'ha0100);
717
718assign fflp_config_reg_pio_wen = pio_wen & (pio_addr == 20'ha0100);
719assign hdr_ctrl_bit_mask_reg_pio_wen = pio_wen & (pio_addr == 20'ha0108);
720assign fcram_refresh_timer_reg_pio_wen = pio_wen & (pio_addr == 20'ha0110);
721assign fio_cfg_addr_reg_pio_wen = pio_wen & (pio_addr == 20'ha0118);
722
723assign fcram_err_test_reg0_pio_wen = pio_wen & (pio_addr == 20'ha0128);
724assign fcram_err_test_reg1_pio_wen = pio_wen & (pio_addr == 20'ha0130);
725assign fcram_err_test_reg2_pio_wen = pio_wen & (pio_addr == 20'ha0138);
726assign debug_training_vector_pio_wen = pio_wen & (pio_addr == 20'ha0148);
727
728assign class2_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0000);
729assign class3_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0008);
730assign class4_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0010);
731assign class5_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0018);
732assign class6_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0020);
733assign class7_hdr_byte_value_pio_wen = pio_wen & (pio_addr == 20'ha0028);
734
735assign class_action_reg4_pio_wen = pio_wen & (pio_addr == 20'ha0030);
736assign class_action_reg5_pio_wen = pio_wen & (pio_addr == 20'ha0038);
737assign class_action_reg6_pio_wen = pio_wen & (pio_addr == 20'ha0040);
738assign class_action_reg7_pio_wen = pio_wen & (pio_addr == 20'ha0048);
739assign class_action_reg8_pio_wen = pio_wen & (pio_addr == 20'ha0050);
740assign class_action_reg9_pio_wen = pio_wen & (pio_addr == 20'ha0058);
741assign class_action_reg10_pio_wen = pio_wen & (pio_addr == 20'ha0060);
742assign class_action_reg11_pio_wen = pio_wen & (pio_addr == 20'ha0068);
743assign class_action_reg12_pio_wen = pio_wen & (pio_addr == 20'ha0070);
744assign class_action_reg13_pio_wen = pio_wen & (pio_addr == 20'ha0078);
745assign class_action_reg14_pio_wen = pio_wen & (pio_addr == 20'ha0080);
746assign class_action_reg15_pio_wen = pio_wen & (pio_addr == 20'ha0088);
747
748assign f_key_class_action_reg4_pio_wen = pio_wen & (pio_addr == 20'hc0000);
749assign f_key_class_action_reg5_pio_wen = pio_wen & (pio_addr == 20'hc0008);
750assign f_key_class_action_reg6_pio_wen = pio_wen & (pio_addr == 20'hc0010);
751assign f_key_class_action_reg7_pio_wen = pio_wen & (pio_addr == 20'hc0018);
752assign f_key_class_action_reg8_pio_wen = pio_wen & (pio_addr == 20'hc0020);
753assign f_key_class_action_reg9_pio_wen = pio_wen & (pio_addr == 20'hc0028);
754assign f_key_class_action_reg10_pio_wen = pio_wen & (pio_addr == 20'hc0030);
755assign f_key_class_action_reg11_pio_wen = pio_wen & (pio_addr == 20'hc0038);
756assign f_key_class_action_reg12_pio_wen = pio_wen & (pio_addr == 20'hc0040);
757assign f_key_class_action_reg13_pio_wen = pio_wen & (pio_addr == 20'hc0048);
758assign f_key_class_action_reg14_pio_wen = pio_wen & (pio_addr == 20'hc0050);
759assign f_key_class_action_reg15_pio_wen = pio_wen & (pio_addr == 20'hc0058);
760
761assign h1_init_value_reg_pio_wen = pio_wen & (pio_addr == 20'hc0060);
762assign h2_init_value_reg_pio_wen = pio_wen & (pio_addr == 20'hc0068);
763
764assign flow_part_sel_reg0_pio_wen = pio_wen & (pio_addr == 20'hc0070);
765assign flow_part_sel_reg1_pio_wen = pio_wen & (pio_addr == 20'hc0078);
766assign flow_part_sel_reg2_pio_wen = pio_wen & (pio_addr == 20'hc0080);
767assign flow_part_sel_reg3_pio_wen = pio_wen & (pio_addr == 20'hc0088);
768assign flow_part_sel_reg4_pio_wen = pio_wen & (pio_addr == 20'hc0090);
769assign flow_part_sel_reg5_pio_wen = pio_wen & (pio_addr == 20'hc0098);
770assign flow_part_sel_reg6_pio_wen = pio_wen & (pio_addr == 20'hc00a0);
771assign flow_part_sel_reg7_pio_wen = pio_wen & (pio_addr == 20'hc00a8);
772
773assign hash_tbl_addr_reg0_pio_wen = pio_wen & (pio_addr == 20'h00000);
774assign hash_tbl_addr_reg1_pio_wen = pio_wen & (pio_addr == 20'h02000);
775assign hash_tbl_addr_reg2_pio_wen = pio_wen & (pio_addr == 20'h04000);
776assign hash_tbl_addr_reg3_pio_wen = pio_wen & (pio_addr == 20'h06000);
777assign hash_tbl_addr_reg4_pio_wen = pio_wen & (pio_addr == 20'h08000);
778assign hash_tbl_addr_reg5_pio_wen = pio_wen & (pio_addr == 20'h0a000);
779assign hash_tbl_addr_reg6_pio_wen = pio_wen & (pio_addr == 20'h0c000);
780assign hash_tbl_addr_reg7_pio_wen = pio_wen & (pio_addr == 20'h0e000);
781
782assign hash_tbl_addr_inc_wen0 = (pio_addr[15:13] == 3'd0) & hash_tbl_addr_reg0_dout[23] & cpu_fc_req_done_p;
783assign hash_tbl_addr_inc_wen1 = (pio_addr[15:13] == 3'd1) & hash_tbl_addr_reg1_dout[23] & cpu_fc_req_done_p;
784assign hash_tbl_addr_inc_wen2 = (pio_addr[15:13] == 3'd2) & hash_tbl_addr_reg2_dout[23] & cpu_fc_req_done_p;
785assign hash_tbl_addr_inc_wen3 = (pio_addr[15:13] == 3'd3) & hash_tbl_addr_reg3_dout[23] & cpu_fc_req_done_p;
786assign hash_tbl_addr_inc_wen4 = (pio_addr[15:13] == 3'd4) & hash_tbl_addr_reg4_dout[23] & cpu_fc_req_done_p;
787assign hash_tbl_addr_inc_wen5 = (pio_addr[15:13] == 3'd5) & hash_tbl_addr_reg5_dout[23] & cpu_fc_req_done_p;
788assign hash_tbl_addr_inc_wen6 = (pio_addr[15:13] == 3'd6) & hash_tbl_addr_reg6_dout[23] & cpu_fc_req_done_p;
789assign hash_tbl_addr_inc_wen7 = (pio_addr[15:13] == 3'd7) & hash_tbl_addr_reg7_dout[23] & cpu_fc_req_done_p;
790
791assign hash_tbl_addr_reg0_wen = hash_tbl_addr_reg0_pio_wen | hash_tbl_addr_inc_wen0;
792assign hash_tbl_addr_reg1_wen = hash_tbl_addr_reg1_pio_wen | hash_tbl_addr_inc_wen1;
793assign hash_tbl_addr_reg2_wen = hash_tbl_addr_reg2_pio_wen | hash_tbl_addr_inc_wen2;
794assign hash_tbl_addr_reg3_wen = hash_tbl_addr_reg3_pio_wen | hash_tbl_addr_inc_wen3;
795assign hash_tbl_addr_reg4_wen = hash_tbl_addr_reg4_pio_wen | hash_tbl_addr_inc_wen4;
796assign hash_tbl_addr_reg5_wen = hash_tbl_addr_reg5_pio_wen | hash_tbl_addr_inc_wen5;
797assign hash_tbl_addr_reg6_wen = hash_tbl_addr_reg6_pio_wen | hash_tbl_addr_inc_wen6;
798assign hash_tbl_addr_reg7_wen = hash_tbl_addr_reg7_pio_wen | hash_tbl_addr_inc_wen7;
799
800assign cpu_req_part0_sel = (pio_addr[15:13] == 3'd0);
801assign cpu_req_part1_sel = (pio_addr[15:13] == 3'd1);
802assign cpu_req_part2_sel = (pio_addr[15:13] == 3'd2);
803assign cpu_req_part3_sel = (pio_addr[15:13] == 3'd3);
804assign cpu_req_part4_sel = (pio_addr[15:13] == 3'd4);
805assign cpu_req_part5_sel = (pio_addr[15:13] == 3'd5);
806assign cpu_req_part6_sel = (pio_addr[15:13] == 3'd6);
807assign cpu_req_part7_sel = (pio_addr[15:13] == 3'd7);
808
809
810assign curr_hash_tbl_addr = {23{cpu_req_part0_sel}} & hash_tbl_addr_reg0_dout[22:0] |
811 {23{cpu_req_part1_sel}} & hash_tbl_addr_reg1_dout[22:0] |
812 {23{cpu_req_part2_sel}} & hash_tbl_addr_reg2_dout[22:0] |
813 {23{cpu_req_part3_sel}} & hash_tbl_addr_reg3_dout[22:0] |
814 {23{cpu_req_part4_sel}} & hash_tbl_addr_reg4_dout[22:0] |
815 {23{cpu_req_part5_sel}} & hash_tbl_addr_reg5_dout[22:0] |
816 {23{cpu_req_part6_sel}} & hash_tbl_addr_reg6_dout[22:0] |
817 {23{cpu_req_part7_sel}} & hash_tbl_addr_reg7_dout[22:0];
818
819assign next_hash_tbl_addr = curr_hash_tbl_addr[22:0] + 23'd1;
820
821dffr #(23) next_hash_tbl_addr_reg (cclk, reset_s, next_hash_tbl_addr, next_hash_tbl_addr_r);
822
823assign hash_tbl_addr_reg0_mux = hash_tbl_addr_inc_wen0 ? {hash_tbl_addr_reg0_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
824assign hash_tbl_addr_reg1_mux = hash_tbl_addr_inc_wen1 ? {hash_tbl_addr_reg1_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
825assign hash_tbl_addr_reg2_mux = hash_tbl_addr_inc_wen2 ? {hash_tbl_addr_reg2_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
826assign hash_tbl_addr_reg3_mux = hash_tbl_addr_inc_wen3 ? {hash_tbl_addr_reg3_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
827assign hash_tbl_addr_reg4_mux = hash_tbl_addr_inc_wen4 ? {hash_tbl_addr_reg4_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
828assign hash_tbl_addr_reg5_mux = hash_tbl_addr_inc_wen5 ? {hash_tbl_addr_reg5_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
829assign hash_tbl_addr_reg6_mux = hash_tbl_addr_inc_wen6 ? {hash_tbl_addr_reg6_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
830assign hash_tbl_addr_reg7_mux = hash_tbl_addr_inc_wen7 ? {hash_tbl_addr_reg7_dout[23], next_hash_tbl_addr_r[22:0]} : pio_wr_data[23:0];
831
832assign hash_tbl_data_reg0_pio_wen = pio_wen & (pio_addr == 20'h00008);
833assign hash_tbl_data_reg1_pio_wen = pio_wen & (pio_addr == 20'h02008);
834assign hash_tbl_data_reg2_pio_wen = pio_wen & (pio_addr == 20'h04008);
835assign hash_tbl_data_reg3_pio_wen = pio_wen & (pio_addr == 20'h06008);
836assign hash_tbl_data_reg4_pio_wen = pio_wen & (pio_addr == 20'h08008);
837assign hash_tbl_data_reg5_pio_wen = pio_wen & (pio_addr == 20'h0a008);
838assign hash_tbl_data_reg6_pio_wen = pio_wen & (pio_addr == 20'h0c008);
839assign hash_tbl_data_reg7_pio_wen = pio_wen & (pio_addr == 20'h0e008);
840
841assign hash_tbl_data_reg0_h_pio_wen = pio_wen & ((pio_addr == 20'h00008) & !pio_32b_mode | (pio_addr == 20'h0000c) & pio_32b_mode);
842assign hash_tbl_data_reg1_h_pio_wen = pio_wen & ((pio_addr == 20'h02008) & !pio_32b_mode | (pio_addr == 20'h0200c) & pio_32b_mode);
843assign hash_tbl_data_reg2_h_pio_wen = pio_wen & ((pio_addr == 20'h04008) & !pio_32b_mode | (pio_addr == 20'h0400c) & pio_32b_mode);
844assign hash_tbl_data_reg3_h_pio_wen = pio_wen & ((pio_addr == 20'h06008) & !pio_32b_mode | (pio_addr == 20'h0600c) & pio_32b_mode);
845assign hash_tbl_data_reg4_h_pio_wen = pio_wen & ((pio_addr == 20'h08008) & !pio_32b_mode | (pio_addr == 20'h0800c) & pio_32b_mode);
846assign hash_tbl_data_reg5_h_pio_wen = pio_wen & ((pio_addr == 20'h0a008) & !pio_32b_mode | (pio_addr == 20'h0a00c) & pio_32b_mode);
847assign hash_tbl_data_reg6_h_pio_wen = pio_wen & ((pio_addr == 20'h0c008) & !pio_32b_mode | (pio_addr == 20'h0c00c) & pio_32b_mode);
848assign hash_tbl_data_reg7_h_pio_wen = pio_wen & ((pio_addr == 20'h0e008) & !pio_32b_mode | (pio_addr == 20'h0e00c) & pio_32b_mode);
849
850assign hash_tbl_ecc_log_reg0_pio_wen = pio_wen & (pio_addr == 20'h00010);
851assign hash_tbl_ecc_log_reg1_pio_wen = pio_wen & (pio_addr == 20'h02010);
852assign hash_tbl_ecc_log_reg2_pio_wen = pio_wen & (pio_addr == 20'h04010);
853assign hash_tbl_ecc_log_reg3_pio_wen = pio_wen & (pio_addr == 20'h06010);
854assign hash_tbl_ecc_log_reg4_pio_wen = pio_wen & (pio_addr == 20'h08010);
855assign hash_tbl_ecc_log_reg5_pio_wen = pio_wen & (pio_addr == 20'h0a010);
856assign hash_tbl_ecc_log_reg6_pio_wen = pio_wen & (pio_addr == 20'h0c010);
857assign hash_tbl_ecc_log_reg7_pio_wen = pio_wen & (pio_addr == 20'h0e010);
858
859assign hash_tbl_data_reg0_wen = hash_tbl_data_reg0_pio_wen | cpu_req_part0_sel & cpu_fc_req_done_p & pio_rd;
860assign hash_tbl_data_reg1_wen = hash_tbl_data_reg1_pio_wen | cpu_req_part1_sel & cpu_fc_req_done_p & pio_rd;
861assign hash_tbl_data_reg2_wen = hash_tbl_data_reg2_pio_wen | cpu_req_part2_sel & cpu_fc_req_done_p & pio_rd;
862assign hash_tbl_data_reg3_wen = hash_tbl_data_reg3_pio_wen | cpu_req_part3_sel & cpu_fc_req_done_p & pio_rd;
863assign hash_tbl_data_reg4_wen = hash_tbl_data_reg4_pio_wen | cpu_req_part4_sel & cpu_fc_req_done_p & pio_rd;
864assign hash_tbl_data_reg5_wen = hash_tbl_data_reg5_pio_wen | cpu_req_part5_sel & cpu_fc_req_done_p & pio_rd;
865assign hash_tbl_data_reg6_wen = hash_tbl_data_reg6_pio_wen | cpu_req_part6_sel & cpu_fc_req_done_p & pio_rd;
866assign hash_tbl_data_reg7_wen = hash_tbl_data_reg7_pio_wen | cpu_req_part7_sel & cpu_fc_req_done_p & pio_rd;
867
868assign hash_tbl_data_reg0_h_wen = hash_tbl_data_reg0_h_pio_wen | cpu_req_part0_sel & cpu_fc_req_done_p & pio_rd;
869assign hash_tbl_data_reg1_h_wen = hash_tbl_data_reg1_h_pio_wen | cpu_req_part1_sel & cpu_fc_req_done_p & pio_rd;
870assign hash_tbl_data_reg2_h_wen = hash_tbl_data_reg2_h_pio_wen | cpu_req_part2_sel & cpu_fc_req_done_p & pio_rd;
871assign hash_tbl_data_reg3_h_wen = hash_tbl_data_reg3_h_pio_wen | cpu_req_part3_sel & cpu_fc_req_done_p & pio_rd;
872assign hash_tbl_data_reg4_h_wen = hash_tbl_data_reg4_h_pio_wen | cpu_req_part4_sel & cpu_fc_req_done_p & pio_rd;
873assign hash_tbl_data_reg5_h_wen = hash_tbl_data_reg5_h_pio_wen | cpu_req_part5_sel & cpu_fc_req_done_p & pio_rd;
874assign hash_tbl_data_reg6_h_wen = hash_tbl_data_reg6_h_pio_wen | cpu_req_part6_sel & cpu_fc_req_done_p & pio_rd;
875assign hash_tbl_data_reg7_h_wen = hash_tbl_data_reg7_h_pio_wen | cpu_req_part7_sel & cpu_fc_req_done_p & pio_rd;
876
877assign hash_tbl_ecc_log_reg0_wen = hash_tbl_ecc_log_reg0_pio_wen | cpu_req_part0_sel & cpu_fc_req_done_p & pio_rd;
878assign hash_tbl_ecc_log_reg1_wen = hash_tbl_ecc_log_reg1_pio_wen | cpu_req_part1_sel & cpu_fc_req_done_p & pio_rd;
879assign hash_tbl_ecc_log_reg2_wen = hash_tbl_ecc_log_reg2_pio_wen | cpu_req_part2_sel & cpu_fc_req_done_p & pio_rd;
880assign hash_tbl_ecc_log_reg3_wen = hash_tbl_ecc_log_reg3_pio_wen | cpu_req_part3_sel & cpu_fc_req_done_p & pio_rd;
881assign hash_tbl_ecc_log_reg4_wen = hash_tbl_ecc_log_reg4_pio_wen | cpu_req_part4_sel & cpu_fc_req_done_p & pio_rd;
882assign hash_tbl_ecc_log_reg5_wen = hash_tbl_ecc_log_reg5_pio_wen | cpu_req_part5_sel & cpu_fc_req_done_p & pio_rd;
883assign hash_tbl_ecc_log_reg6_wen = hash_tbl_ecc_log_reg6_pio_wen | cpu_req_part6_sel & cpu_fc_req_done_p & pio_rd;
884assign hash_tbl_ecc_log_reg7_wen = hash_tbl_ecc_log_reg7_pio_wen | cpu_req_part7_sel & cpu_fc_req_done_p & pio_rd;
885
886assign hash_tbl_data_reg_mux = cpu_fc_req_done_p ? fc_rd_data_reg_dout[31:0] : pio_wr_data[31:0];
887assign hash_tbl_data_reg_h_mux = cpu_fc_req_done_p ? fc_rd_data_reg_dout[63:32] : pio_wr_data[63:32];
888assign hash_tbl_ecc_log_reg_mux = cpu_fc_req_done_p ? {fc_rd_ecc_err, curr_hash_tbl_addr[22:0], fc_rd_data_reg_dout[71:64]} :
889 pio_wr_data[31:0];
890
891assign cam_ecc_log_reg_pio_wen = pio_wen & (pio_addr == 20'ha00d8);
892assign cam_ecc_log_reg_wen = cam_ecc_log_reg_pio_wen | ecc_parity_status[25];
893assign cam_ecc_log_reg_din = cam_ecc_log_reg_dout[26] ? {cam_ecc_log_reg_dout[26:25], 1'b1, cam_ecc_log_reg_dout[23:0]} :
894 {ecc_parity_status[25:24], 1'b0, ecc_parity_status[23:0]};
895assign cam_ecc_log_reg_mux = ecc_parity_status[25] ? cam_ecc_log_reg_din[26:0] : {pio_wr_data[31:29], pio_wr_data[23:0]};
896
897assign hash_lookup_log_reg0_pio_wen = pio_wen & (pio_addr == 20'ha00e0);
898assign hash_lookup_log_reg1_pio_wen = pio_wen & (pio_addr == 20'ha00e8);
899
900assign hash_lookup_log_reg0_en = fflp_zcp_wr_p & fc_err_status[33];
901assign hash_lookup_log_reg1_en = fflp_zcp_wr_p & fc_err_status[33] & !hash_lookup_log_reg0_dout[3];
902assign hash_lookup_log_reg0_wen = hash_lookup_log_reg0_pio_wen | hash_lookup_log_reg0_en;
903assign hash_lookup_log_reg1_wen = hash_lookup_log_reg1_pio_wen | hash_lookup_log_reg1_en;
904
905assign hash_lookup_log_reg0_din_bit2 = hash_lookup_log_reg0_dout[3] ? 1'b1 : 1'b0;
906assign hash_lookup_log_reg0_din_bit1 = hash_lookup_log_reg0_dout[3] ? hash_lookup_log_reg0_dout[1] : fc_err_status[32];
907assign hash_lookup_log_reg0_din_bit0 = hash_lookup_log_reg0_dout[3] ? hash_lookup_log_reg0_dout[0] : fc_err_status[31];
908assign hash_lookup_log_reg0_din = {fc_err_status[33], hash_lookup_log_reg0_din_bit2, hash_lookup_log_reg0_din_bit1,
909 hash_lookup_log_reg0_din_bit0};
910assign hash_lookup_log_reg0_mux = hash_lookup_log_reg0_en ? hash_lookup_log_reg0_din[3:0] : pio_wr_data[3:0];
911
912assign hash_lookup_log_reg1_mux = hash_lookup_log_reg1_en ? fc_err_status[30:0] : pio_wr_data[30:0];
913
914
915dffre #(12) hdr_ctrl_bit_mask_reg (cclk, reset_s, hdr_ctrl_bit_mask_reg_pio_wen, pio_wr_data[11:0], hdr_ctrl_bit_mask_reg_dout[11:0]);
916dffre #(27) fflp_config_reg (cclk, reset_s, fflp_config_reg_pio_wen, pio_wr_data[26:0], fflp_config_reg_dout[26:0]);
917dffre #(32) fcram_refresh_timer_reg (cclk, reset_s, fcram_refresh_timer_reg_pio_wen, pio_wr_data[31:0], fcram_refresh_timer_reg_dout);
918dffre #(8) fio_cfg_addr_reg (cclk, reset_s, fio_cfg_addr_reg_pio_wen, pio_wr_data[7:0], fio_cfg_addr_reg_dout);
919
920assign snap_en = fflp_config_reg_dout[0];
921assign fflp_init_done = fflp_config_reg_dout[1];
922assign disable_chksum = fflp_config_reg_dout[2];
923assign fcram_qs_mode = fflp_config_reg_dout[3]; // set 1 to free running QS mode
924assign fcram_driver_imp_ctrl = fflp_config_reg_dout[7:4]; // 4'b0 for normal output drive
925assign fcram_lookup_ratio_i = fflp_config_reg_dout[11:8];
926assign cam_srch_ratio_i = fflp_config_reg_dout[15:12];
927assign cam_srch_latency_i = fflp_config_reg_dout[19:16];
928assign pio_fio_latency = fflp_config_reg_dout[21:20];
929assign pio_fio_cfg_reset = fflp_config_reg_dout[22];
930assign pio_debug_data_sel = fflp_config_reg_dout[25:23];
931assign pio_disable_cam = fflp_config_reg_dout[26];
932
933assign fcram_lookup_ratio = (fcram_lookup_ratio_i == 4'b0) ? 4'd1 : fcram_lookup_ratio_i;
934assign cam_srch_ratio = (cam_srch_ratio_i == 4'b0) ? 4'd1 : cam_srch_ratio_i;
935assign cam_srch_latency = (cam_srch_latency_i[3:2] == 2'b0) ? 4'd3 : cam_srch_latency_i;
936
937
938dffre #(17) class2_hdr_byte_value_reg (cclk, reset_s, class2_hdr_byte_value_pio_wen, pio_wr_data[16:0], class2_hdr_byte_value[16:0]);
939dffre #(17) class3_hdr_byte_value_reg (cclk, reset_s, class3_hdr_byte_value_pio_wen, pio_wr_data[16:0], class3_hdr_byte_value[16:0]);
940dffre #(26) class4_hdr_byte_value_reg (cclk, reset_s, class4_hdr_byte_value_pio_wen, pio_wr_data[25:0], class4_hdr_byte_value[25:0]);
941dffre #(26) class5_hdr_byte_value_reg (cclk, reset_s, class5_hdr_byte_value_pio_wen, pio_wr_data[25:0], class5_hdr_byte_value[25:0]);
942dffre #(26) class6_hdr_byte_value_reg (cclk, reset_s, class6_hdr_byte_value_pio_wen, pio_wr_data[25:0], class6_hdr_byte_value[25:0]);
943dffre #(26) class7_hdr_byte_value_reg (cclk, reset_s, class7_hdr_byte_value_pio_wen, pio_wr_data[25:0], class7_hdr_byte_value[25:0]);
944
945//def class action register per l3 class
946dffre #(3) class_action_reg4 (cclk, reset_s, class_action_reg4_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg4_dout[2:0]);
947dffre #(3) class_action_reg5 (cclk, reset_s, class_action_reg5_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg5_dout[2:0]);
948dffre #(3) class_action_reg6 (cclk, reset_s, class_action_reg6_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg6_dout[2:0]);
949dffre #(3) class_action_reg7 (cclk, reset_s, class_action_reg7_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg7_dout[2:0]);
950dffre #(3) class_action_reg8 (cclk, reset_s, class_action_reg8_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg8_dout[2:0]);
951dffre #(3) class_action_reg9 (cclk, reset_s, class_action_reg9_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg9_dout[2:0]);
952dffre #(3) class_action_reg10 (cclk, reset_s, class_action_reg10_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg10_dout[2:0]);
953dffre #(3) class_action_reg11 (cclk, reset_s, class_action_reg11_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg11_dout[2:0]);
954dffre #(3) class_action_reg12 (cclk, reset_s, class_action_reg12_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg12_dout[2:0]);
955dffre #(3) class_action_reg13 (cclk, reset_s, class_action_reg13_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg13_dout[2:0]);
956dffre #(3) class_action_reg14 (cclk, reset_s, class_action_reg14_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg14_dout[2:0]);
957dffre #(3) class_action_reg15 (cclk, reset_s, class_action_reg15_pio_wen, {pio_wr_data[3:2], pio_wr_data[0]}, class_action_reg15_dout[2:0]);
958
959dffre #(10) f_key_class_action_reg4 (cclk, reset_s, f_key_class_action_reg4_pio_wen, pio_wr_data[9:0], f_key_class_action_reg4_dout[9:0]);
960dffre #(10) f_key_class_action_reg5 (cclk, reset_s, f_key_class_action_reg5_pio_wen, pio_wr_data[9:0], f_key_class_action_reg5_dout[9:0]);
961dffre #(10) f_key_class_action_reg6 (cclk, reset_s, f_key_class_action_reg6_pio_wen, pio_wr_data[9:0], f_key_class_action_reg6_dout[9:0]);
962dffre #(10) f_key_class_action_reg7 (cclk, reset_s, f_key_class_action_reg7_pio_wen, pio_wr_data[9:0], f_key_class_action_reg7_dout[9:0]);
963dffre #(10) f_key_class_action_reg8 (cclk, reset_s, f_key_class_action_reg8_pio_wen, pio_wr_data[9:0], f_key_class_action_reg8_dout[9:0]);
964dffre #(10) f_key_class_action_reg9 (cclk, reset_s, f_key_class_action_reg9_pio_wen, pio_wr_data[9:0], f_key_class_action_reg9_dout[9:0]);
965dffre #(10) f_key_class_action_reg10 (cclk, reset_s, f_key_class_action_reg10_pio_wen, pio_wr_data[9:0], f_key_class_action_reg10_dout[9:0]);
966dffre #(10) f_key_class_action_reg11 (cclk, reset_s, f_key_class_action_reg11_pio_wen, pio_wr_data[9:0], f_key_class_action_reg11_dout[9:0]);
967dffre #(10) f_key_class_action_reg12 (cclk, reset_s, f_key_class_action_reg12_pio_wen, pio_wr_data[9:0], f_key_class_action_reg12_dout[9:0]);
968dffre #(10) f_key_class_action_reg13 (cclk, reset_s, f_key_class_action_reg13_pio_wen, pio_wr_data[9:0], f_key_class_action_reg13_dout[9:0]);
969dffre #(10) f_key_class_action_reg14 (cclk, reset_s, f_key_class_action_reg14_pio_wen, pio_wr_data[9:0], f_key_class_action_reg14_dout[9:0]);
970dffre #(10) f_key_class_action_reg15 (cclk, reset_s, f_key_class_action_reg15_pio_wen, pio_wr_data[9:0], f_key_class_action_reg15_dout[9:0]);
971
972dffre #(32) h1_poly_init_value_reg (cclk, reset_s, h1_init_value_reg_pio_wen, pio_wr_data[31:0], h1_init_value_reg_dout);
973dffre #(16) h2_poly_init_value_reg (cclk, reset_s, h2_init_value_reg_pio_wen, pio_wr_data[15:0], h2_init_value_reg_dout);
974
975wire[10:0] flow_part_pio_wr_data = {pio_wr_data[16], pio_wr_data[12:8], pio_wr_data[4:0]};
976
977dffre #(11) flow_part_sel_reg0 (cclk, reset_s, flow_part_sel_reg0_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg0_dout);
978dffre #(11) flow_part_sel_reg1 (cclk, reset_s, flow_part_sel_reg1_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg1_dout);
979dffre #(11) flow_part_sel_reg2 (cclk, reset_s, flow_part_sel_reg2_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg2_dout);
980dffre #(11) flow_part_sel_reg3 (cclk, reset_s, flow_part_sel_reg3_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg3_dout);
981dffre #(11) flow_part_sel_reg4 (cclk, reset_s, flow_part_sel_reg4_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg4_dout);
982dffre #(11) flow_part_sel_reg5 (cclk, reset_s, flow_part_sel_reg5_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg5_dout);
983dffre #(11) flow_part_sel_reg6 (cclk, reset_s, flow_part_sel_reg6_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg6_dout);
984dffre #(11) flow_part_sel_reg7 (cclk, reset_s, flow_part_sel_reg7_pio_wen, flow_part_pio_wr_data[10:0], flow_part_sel_reg7_dout);
985
986dffre #(24) hash_tbl_addr_reg0 (cclk, reset_s, hash_tbl_addr_reg0_wen, hash_tbl_addr_reg0_mux[23:0], hash_tbl_addr_reg0_dout);
987dffre #(24) hash_tbl_addr_reg1 (cclk, reset_s, hash_tbl_addr_reg1_wen, hash_tbl_addr_reg1_mux[23:0], hash_tbl_addr_reg1_dout);
988dffre #(24) hash_tbl_addr_reg2 (cclk, reset_s, hash_tbl_addr_reg2_wen, hash_tbl_addr_reg2_mux[23:0], hash_tbl_addr_reg2_dout);
989dffre #(24) hash_tbl_addr_reg3 (cclk, reset_s, hash_tbl_addr_reg3_wen, hash_tbl_addr_reg3_mux[23:0], hash_tbl_addr_reg3_dout);
990dffre #(24) hash_tbl_addr_reg4 (cclk, reset_s, hash_tbl_addr_reg4_wen, hash_tbl_addr_reg4_mux[23:0], hash_tbl_addr_reg4_dout);
991dffre #(24) hash_tbl_addr_reg5 (cclk, reset_s, hash_tbl_addr_reg5_wen, hash_tbl_addr_reg5_mux[23:0], hash_tbl_addr_reg5_dout);
992dffre #(24) hash_tbl_addr_reg6 (cclk, reset_s, hash_tbl_addr_reg6_wen, hash_tbl_addr_reg6_mux[23:0], hash_tbl_addr_reg6_dout);
993dffre #(24) hash_tbl_addr_reg7 (cclk, reset_s, hash_tbl_addr_reg7_wen, hash_tbl_addr_reg7_mux[23:0], hash_tbl_addr_reg7_dout);
994
995dffre #(32) hash_tbl_data_reg0_l (cclk, reset_s, hash_tbl_data_reg0_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg0_dout[31:0]);
996dffre #(32) hash_tbl_data_reg1_l (cclk, reset_s, hash_tbl_data_reg1_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg1_dout[31:0]);
997dffre #(32) hash_tbl_data_reg2_l (cclk, reset_s, hash_tbl_data_reg2_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg2_dout[31:0]);
998dffre #(32) hash_tbl_data_reg3_l (cclk, reset_s, hash_tbl_data_reg3_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg3_dout[31:0]);
999dffre #(32) hash_tbl_data_reg4_l (cclk, reset_s, hash_tbl_data_reg4_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg4_dout[31:0]);
1000dffre #(32) hash_tbl_data_reg5_l (cclk, reset_s, hash_tbl_data_reg5_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg5_dout[31:0]);
1001dffre #(32) hash_tbl_data_reg6_l (cclk, reset_s, hash_tbl_data_reg6_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg6_dout[31:0]);
1002dffre #(32) hash_tbl_data_reg7_l (cclk, reset_s, hash_tbl_data_reg7_wen, hash_tbl_data_reg_mux[31:0], hash_tbl_data_reg7_dout[31:0]);
1003
1004dffre #(32) hash_tbl_data_reg0_h (cclk, reset_s, hash_tbl_data_reg0_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg0_dout[63:32]);
1005dffre #(32) hash_tbl_data_reg1_h (cclk, reset_s, hash_tbl_data_reg1_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg1_dout[63:32]);
1006dffre #(32) hash_tbl_data_reg2_h (cclk, reset_s, hash_tbl_data_reg2_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg2_dout[63:32]);
1007dffre #(32) hash_tbl_data_reg3_h (cclk, reset_s, hash_tbl_data_reg3_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg3_dout[63:32]);
1008dffre #(32) hash_tbl_data_reg4_h (cclk, reset_s, hash_tbl_data_reg4_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg4_dout[63:32]);
1009dffre #(32) hash_tbl_data_reg5_h (cclk, reset_s, hash_tbl_data_reg5_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg5_dout[63:32]);
1010dffre #(32) hash_tbl_data_reg6_h (cclk, reset_s, hash_tbl_data_reg6_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg6_dout[63:32]);
1011dffre #(32) hash_tbl_data_reg7_h (cclk, reset_s, hash_tbl_data_reg7_h_wen, hash_tbl_data_reg_h_mux[31:0], hash_tbl_data_reg7_dout[63:32]);
1012
1013dffre #(32) hash_tbl_ecc_log_reg0 (cclk, reset_s, hash_tbl_ecc_log_reg0_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg0_dout);
1014dffre #(32) hash_tbl_ecc_log_reg1 (cclk, reset_s, hash_tbl_ecc_log_reg1_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg1_dout);
1015dffre #(32) hash_tbl_ecc_log_reg2 (cclk, reset_s, hash_tbl_ecc_log_reg2_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg2_dout);
1016dffre #(32) hash_tbl_ecc_log_reg3 (cclk, reset_s, hash_tbl_ecc_log_reg3_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg3_dout);
1017dffre #(32) hash_tbl_ecc_log_reg4 (cclk, reset_s, hash_tbl_ecc_log_reg4_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg4_dout);
1018dffre #(32) hash_tbl_ecc_log_reg5 (cclk, reset_s, hash_tbl_ecc_log_reg5_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg5_dout);
1019dffre #(32) hash_tbl_ecc_log_reg6 (cclk, reset_s, hash_tbl_ecc_log_reg6_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg6_dout);
1020dffre #(32) hash_tbl_ecc_log_reg7 (cclk, reset_s, hash_tbl_ecc_log_reg7_wen, hash_tbl_ecc_log_reg_mux, hash_tbl_ecc_log_reg7_dout);
1021
1022dffre #(27) cam_ecc_log_reg (cclk, reset_s, cam_ecc_log_reg_wen, cam_ecc_log_reg_mux, cam_ecc_log_reg_dout);
1023dffre #(4) hash_lookup_log_reg0 (cclk, reset_s, hash_lookup_log_reg0_wen, hash_lookup_log_reg0_mux, hash_lookup_log_reg0_dout);
1024dffre #(31) hash_lookup_log_reg1 (cclk, reset_s, hash_lookup_log_reg1_wen, hash_lookup_log_reg1_mux, hash_lookup_log_reg1_dout);
1025
1026dffre #(8) fcram_err_test_reg0 (cclk, reset_s, fcram_err_test_reg0_pio_wen, pio_wr_data[7:0], fcram_err_test_reg0_dout);
1027dffre #(32) fcram_err_test_reg1 (cclk, reset_s, fcram_err_test_reg1_pio_wen, pio_wr_data[31:0], fcram_err_test_reg1_dout);
1028dffre #(32) fcram_err_test_reg2 (cclk, reset_s, fcram_err_test_reg2_pio_wen, pio_wr_data[31:0], fcram_err_test_reg2_dout);
1029
1030dffre #(32) debug_tran_vector_reg (cclk, reset_s, debug_training_vector_pio_wen, pio_wr_data[31:0], debug_training_vector);
1031
1032/************************/
1033//CPU Vlan table access
1034/************************/
1035assign cpu_vlan_rd = pio_rd & (pio_addr[16:15] == 2'b00) & (!pio_32b_mode | pio_32b_mode & !pio_addr[2]);
1036assign cpu_vlan_wr = !pio_rd & (pio_addr[16:15] == 2'b00) & (!pio_32b_mode | pio_32b_mode & !pio_addr[2]);
1037
1038assign is_vlan_addr = (pio_addr[19:17] == 3'b100);
1039assign cpu_vlan_addr = pio_addr[14:3];
1040assign vlan_tbl_wr_dout = {pio_wr_data[17], pio_wr_data[15:8], pio_wr_data[16], pio_wr_data[7:0]};
1041assign vlan_tbl_rd_data = {18{cpu_vlan_gnt_3}} & vlan_tbl_din_reg_dout[17:0];
1042
1043assign cpu_vlan_req_en = pio_sel_pulse & is_vlan_addr | cpu_vlan_gnt_3;
1044assign cpu_vlan_req_in = pio_sel_pulse & is_vlan_addr ? 1'b1 : 1'b0;
1045
1046dffre #(1) cpu_vlan_req_reg (cclk, reset_s, cpu_vlan_req_en, cpu_vlan_req_in, cpu_vlan_req);
1047
1048assign vlan_parity_err_log_tmp = vlan_parity_err_log_reg_dout[31] ? {2'b11, vlan_parity_err_log_reg_dout[29:0]} :
1049 {2'b10, vlan_tag_id[11:0], vlan_tbl_din_reg_dout[17:0]};
1050assign vlan_parity_err_log_mux = vlan_parity_err_log_en ? vlan_parity_err_log_tmp[31:0] : pio_wr_data[31:0];
1051
1052assign vlan_parity_err_log_pio_wen = pio_wen & (pio_addr == 20'h88000);
1053assign vlan_parity_err_log_wen = vlan_parity_err_log_pio_wen | vlan_parity_err_log_en;
1054
1055dffre #(32) vlan_parity_err_log_reg (cclk, reset_s, vlan_parity_err_log_wen, vlan_parity_err_log_mux, vlan_parity_err_log_reg_dout);
1056
1057/************************/
1058//CPU access FCRAM
1059/************************/
1060assign fcram_err_test_reg_dout = {fcram_err_test_reg0_dout, fcram_err_test_reg1_dout, fcram_err_test_reg2_dout};
1061assign cpu_fc_req_done_p = cpu_fc_req_done_sync & !cpu_fc_req_done_sync_d;
1062assign is_fcram_data_addr = (pio_addr[12:0] == 13'd8) & (pio_addr[19:16] == 4'b0) & !pio_32b_mode |
1063 (pio_addr[12:0] == 13'd12) & (pio_addr[19:16] == 4'b0) & pio_32b_mode;
1064assign is_ext_fcram = ((pio_addr[15:13] == 3'd0) & flow_part_sel_reg0_dout[10] |
1065 (pio_addr[15:13] == 3'd1) & flow_part_sel_reg1_dout[10] |
1066 (pio_addr[15:13] == 3'd2) & flow_part_sel_reg2_dout[10] |
1067 (pio_addr[15:13] == 3'd3) & flow_part_sel_reg3_dout[10] |
1068 (pio_addr[15:13] == 3'd4) & flow_part_sel_reg4_dout[10] |
1069 (pio_addr[15:13] == 3'd5) & flow_part_sel_reg5_dout[10] |
1070 (pio_addr[15:13] == 3'd6) & flow_part_sel_reg6_dout[10] |
1071 (pio_addr[15:13] == 3'd7) & flow_part_sel_reg7_dout[10]);
1072assign is_fcram_req = pio_sel_pulse & is_fcram_data_addr & is_ext_fcram;
1073assign cpu_fcram_req_en = is_fcram_req | cpu_fc_req_done_p1;
1074assign cpu_fcram_req_in = is_fcram_req ? 1'b1 : 1'b0;
1075
1076dffr #(1) cpu_fc_req_done_d_reg (cclk, reset_s, cpu_fc_req_done_sync, cpu_fc_req_done_sync_d);
1077dffr #(1) cpu_fc_req_done_p1_reg (cclk, reset_s, cpu_fc_req_done_p, cpu_fc_req_done_p1);
1078
1079dffre #(1) cpu_fcram_req_reg (cclk, reset_s, cpu_fcram_req_en, cpu_fcram_req_in, cpu_fcram_req);
1080
1081
1082/************************/
1083//CPU access FIO
1084/************************/
1085assign cpu_fio_req_done_p = cpu_fio_req_done_sync & !cpu_fio_req_done_sync_d;
1086assign is_fio_data_addr = (pio_addr == 20'ha0120);
1087assign is_ext_fio = flow_part_sel_reg0_dout[10] | flow_part_sel_reg1_dout[10] |
1088 flow_part_sel_reg2_dout[10] | flow_part_sel_reg3_dout[10] |
1089 flow_part_sel_reg4_dout[10] | flow_part_sel_reg5_dout[10] |
1090 flow_part_sel_reg6_dout[10] | flow_part_sel_reg7_dout[10];
1091assign cpu_fio_req_en = pio_sel_pulse & is_fio_data_addr & is_ext_fio | cpu_fio_req_done_p;
1092assign cpu_fio_req_in = pio_sel_pulse & is_fio_data_addr & is_ext_fio ? 1'b1 : 1'b0;
1093
1094dffr #(1) cpu_fio_req_done_d_reg (cclk, reset_s, cpu_fio_req_done_sync, cpu_fio_req_done_sync_d);
1095dffre #(1) cpu_fio_req_reg (cclk, reset_s, cpu_fio_req_en, cpu_fio_req_in, cpu_fio_req);
1096
1097/************************/
1098//Interrupt
1099/************************/
1100assign fflp_err_intr_mask_wen = pio_wen & (pio_addr == 20'ha0140);
1101assign fflp_err_intr_bits = { hash_tbl_ecc_log_reg7_dout[31],
1102 hash_tbl_ecc_log_reg6_dout[31],
1103 hash_tbl_ecc_log_reg5_dout[31],
1104 hash_tbl_ecc_log_reg4_dout[31],
1105 hash_tbl_ecc_log_reg3_dout[31],
1106 hash_tbl_ecc_log_reg2_dout[31],
1107 hash_tbl_ecc_log_reg1_dout[31],
1108 hash_tbl_ecc_log_reg0_dout[31],
1109 hash_lookup_log_reg0_dout[3],
1110 cam_ecc_log_reg_dout[26],
1111 vlan_parity_err_log_reg_dout[31] };
1112
1113assign fflp_pio_intr_in = |(fflp_err_intr_bits[10:0] & (~fflp_err_intr_mask_reg_dout[10:0]));
1114
1115dffr #(1) fflp_err_intr_reg (cclk, reset_s, fflp_pio_intr_in, fflp_pio_intr);
1116
1117always @ (posedge cclk)
1118if (reset_s)
1119 fflp_err_intr_mask_reg_dout <= 11'h7ff;
1120else if (fflp_err_intr_mask_wen)
1121 fflp_err_intr_mask_reg_dout <= pio_wr_data[10:0];
1122else
1123 fflp_err_intr_mask_reg_dout <= fflp_err_intr_mask_reg_dout;
1124
1125
1126
1127always @ (pio_addr or pio_32b_mode or fflp_config_reg_dout or
1128hdr_ctrl_bit_mask_reg_dout or fcram_refresh_timer_reg_dout or
1129class2_hdr_byte_value or class3_hdr_byte_value or
1130class4_hdr_byte_value or class5_hdr_byte_value or
1131class6_hdr_byte_value or class7_hdr_byte_value or
1132class_action_reg4_dout or class_action_reg5_dout or
1133class_action_reg6_dout or class_action_reg7_dout or
1134class_action_reg8_dout or class_action_reg9_dout or
1135class_action_reg10_dout or class_action_reg11_dout or
1136class_action_reg12_dout or class_action_reg13_dout or
1137class_action_reg14_dout or class_action_reg15_dout or
1138f_key_class_action_reg4_dout or f_key_class_action_reg5_dout or
1139f_key_class_action_reg6_dout or f_key_class_action_reg7_dout or
1140f_key_class_action_reg8_dout or f_key_class_action_reg9_dout or
1141f_key_class_action_reg10_dout or f_key_class_action_reg11_dout or
1142f_key_class_action_reg12_dout or f_key_class_action_reg13_dout or
1143f_key_class_action_reg14_dout or f_key_class_action_reg15_dout or
1144cam_key_reg0_dout or cam_key_reg1_dout or
1145cam_key_reg2_dout or cam_key_reg3_dout or
1146cam_key_mask_reg0_dout or cam_key_mask_reg1_dout or
1147cam_key_mask_reg2_dout or cam_key_mask_reg3_dout or
1148cam_cmd_stat_reg_dout or vlan_tbl_rd_data or
1149vlan_parity_err_log_reg_dout or
1150h1_init_value_reg_dout or h2_init_value_reg_dout or
1151flow_part_sel_reg0_dout or flow_part_sel_reg1_dout or
1152flow_part_sel_reg2_dout or flow_part_sel_reg3_dout or
1153flow_part_sel_reg4_dout or flow_part_sel_reg5_dout or
1154flow_part_sel_reg6_dout or flow_part_sel_reg7_dout or
1155hash_tbl_addr_reg0_dout or hash_tbl_addr_reg1_dout or
1156hash_tbl_addr_reg2_dout or hash_tbl_addr_reg3_dout or
1157hash_tbl_addr_reg4_dout or hash_tbl_addr_reg5_dout or
1158hash_tbl_addr_reg6_dout or hash_tbl_addr_reg7_dout or
1159hash_tbl_data_reg0_dout or hash_tbl_data_reg1_dout or
1160hash_tbl_data_reg2_dout or hash_tbl_data_reg3_dout or
1161hash_tbl_data_reg4_dout or hash_tbl_data_reg5_dout or
1162hash_tbl_data_reg6_dout or hash_tbl_data_reg7_dout or
1163hash_tbl_ecc_log_reg0_dout or hash_tbl_ecc_log_reg1_dout or
1164hash_tbl_ecc_log_reg2_dout or hash_tbl_ecc_log_reg3_dout or
1165hash_tbl_ecc_log_reg4_dout or hash_tbl_ecc_log_reg5_dout or
1166hash_tbl_ecc_log_reg6_dout or hash_tbl_ecc_log_reg7_dout or
1167fcram_err_test_reg0_dout or fcram_err_test_reg1_dout or fcram_err_test_reg2_dout or
1168hash_lookup_log_reg0_dout or hash_lookup_log_reg1_dout or
1169cam_ecc_log_reg_dout or cpu_fio_rd_data or fio_cfg_addr_reg_dout or
1170fflp_err_intr_mask_reg_dout or debug_training_vector or fio_cal_rd_latency)
1171
1172begin
1173
1174pio_addr_err = 1'b0;
1175
1176casex (pio_addr[19:2]) //synopsys parallel_case full_case
1177// 0in < case -full -parallel -message "0in ERROR: case check in fflp_pio_if:pio_addr"
1178
117918'h00000: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg0_dout[23:0]};
118018'h00001: pio_rd_data_tmp = 64'b0;
118118'h00800: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg1_dout[23:0]};
118218'h00801: pio_rd_data_tmp = 64'b0;
118318'h01000: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg2_dout[23:0]};
118418'h01001: pio_rd_data_tmp = 64'b0;
118518'h01800: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg3_dout[23:0]};
118618'h01801: pio_rd_data_tmp = 64'b0;
118718'h02000: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg4_dout[23:0]};
118818'h02001: pio_rd_data_tmp = 64'b0;
118918'h02800: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg5_dout[23:0]};
119018'h02801: pio_rd_data_tmp = 64'b0;
119118'h03000: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg6_dout[23:0]};
119218'h03001: pio_rd_data_tmp = 64'b0;
119318'h03800: pio_rd_data_tmp = {40'b0, hash_tbl_addr_reg7_dout[23:0]};
119418'h03801: pio_rd_data_tmp = 64'b0;
1195
119618'h00002, 18'h00802, 18'h01002, 18'h01802, 18'h02002, 18'h02802, 18'h03002, 18'h03802:
1197 begin
1198 if (pio_32b_mode)
1199 begin
1200 case (pio_addr[13:11])
1201 // 0in < case -full -parallel -message "0in ERROR: case check in fflp_pio_if:pio_addr0"
1202
1203 3'h0: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg0_dout[31:0]};
1204 3'h1: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg1_dout[31:0]};
1205 3'h2: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg2_dout[31:0]};
1206 3'h3: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg3_dout[31:0]};
1207 3'h4: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg4_dout[31:0]};
1208 3'h5: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg5_dout[31:0]};
1209 3'h6: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg6_dout[31:0]};
1210 3'h7: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg7_dout[31:0]};
1211
1212 endcase
1213 end
1214 else
1215 begin
1216 case (pio_addr[15:13])
1217 // 0in < case -full -parallel -message "0in ERROR: case check in fflp_pio_if:pio_addr1"
1218
1219 3'h0: pio_rd_data_tmp = hash_tbl_data_reg0_dout[63:0];
1220 3'h1: pio_rd_data_tmp = hash_tbl_data_reg1_dout[63:0];
1221 3'h2: pio_rd_data_tmp = hash_tbl_data_reg2_dout[63:0];
1222 3'h3: pio_rd_data_tmp = hash_tbl_data_reg3_dout[63:0];
1223 3'h4: pio_rd_data_tmp = hash_tbl_data_reg4_dout[63:0];
1224 3'h5: pio_rd_data_tmp = hash_tbl_data_reg5_dout[63:0];
1225 3'h6: pio_rd_data_tmp = hash_tbl_data_reg6_dout[63:0];
1226 3'h7: pio_rd_data_tmp = hash_tbl_data_reg7_dout[63:0];
1227
1228 endcase
1229 end
1230 end
1231
123218'h00003, 18'h00803, 18'h01003, 18'h01803, 18'h02003, 18'h02803, 18'h03003, 18'h03803:
1233 begin
1234 if (pio_32b_mode)
1235 begin
1236 case (pio_addr[15:13])
1237 // 0in < case -full -parallel -message "0in ERROR: case check in fflp_pio_if:pio_addr2"
1238
1239 3'h0: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg0_dout[63:32]};
1240 3'h1: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg1_dout[63:32]};
1241 3'h2: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg2_dout[63:32]};
1242 3'h3: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg3_dout[63:32]};
1243 3'h4: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg4_dout[63:32]};
1244 3'h5: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg5_dout[63:32]};
1245 3'h6: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg6_dout[63:32]};
1246 3'h7: pio_rd_data_tmp = {32'b0, hash_tbl_data_reg7_dout[63:32]};
1247
1248 endcase
1249 end
1250 else
1251 begin
1252 pio_addr_err = 1'b0;
1253 pio_rd_data_tmp = 64'b0;
1254 end
1255 end
1256
125718'h00004: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg0_dout[31:0]};
125818'h00005: pio_rd_data_tmp = 64'b0;
125918'h00804: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg1_dout[31:0]};
126018'h00805: pio_rd_data_tmp = 64'b0;
126118'h01004: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg2_dout[31:0]};
126218'h01005: pio_rd_data_tmp = 64'b0;
126318'h01804: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg3_dout[31:0]};
126418'h01805: pio_rd_data_tmp = 64'b0;
126518'h02004: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg4_dout[31:0]};
126618'h02005: pio_rd_data_tmp = 64'b0;
126718'h02804: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg5_dout[31:0]};
126818'h02805: pio_rd_data_tmp = 64'b0;
126918'h03004: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg6_dout[31:0]};
127018'h03005: pio_rd_data_tmp = 64'b0;
127118'h03804: pio_rd_data_tmp = {32'b0, hash_tbl_ecc_log_reg7_dout[31:0]};
127218'h03805: pio_rd_data_tmp = 64'b0;
1273
127418'h20xxx, 18'h21xxx:
1275begin
1276 if (pio_32b_mode & pio_addr[2])
1277 pio_rd_data_tmp = 64'b0;
1278 else
1279 pio_rd_data_tmp = {46'b0,
1280 vlan_tbl_rd_data[17], vlan_tbl_rd_data[8], vlan_tbl_rd_data[16:9], vlan_tbl_rd_data[7:0]};
1281end
1282
128318'h22000: pio_rd_data_tmp = {32'b0, vlan_parity_err_log_reg_dout[31:0]};
128418'h22001: pio_rd_data_tmp = 64'b0;
1285
128618'h28000: pio_rd_data_tmp = {47'b0, class2_hdr_byte_value[16:0]};
128718'h28001: pio_rd_data_tmp = 64'b0;
128818'h28002: pio_rd_data_tmp = {47'b0, class3_hdr_byte_value[16:0]};
128918'h28003: pio_rd_data_tmp = 64'b0;
129018'h28004: pio_rd_data_tmp = {38'b0, class4_hdr_byte_value[25:0]};
129118'h28005: pio_rd_data_tmp = 64'b0;
129218'h28006: pio_rd_data_tmp = {38'b0, class5_hdr_byte_value[25:0]};
129318'h28007: pio_rd_data_tmp = 64'b0;
129418'h28008: pio_rd_data_tmp = {38'b0, class6_hdr_byte_value[25:0]};
129518'h28009: pio_rd_data_tmp = 64'b0;
129618'h2800a: pio_rd_data_tmp = {38'b0, class7_hdr_byte_value[25:0]};
129718'h2800b: pio_rd_data_tmp = 64'b0;
129818'h2800c: pio_rd_data_tmp = {60'b0, class_action_reg4_dout[2:1], 1'b0, class_action_reg4_dout[0]};
129918'h2800d: pio_rd_data_tmp = 64'b0;
130018'h2800e: pio_rd_data_tmp = {60'b0, class_action_reg5_dout[2:1], 1'b0, class_action_reg5_dout[0]};
130118'h2800f: pio_rd_data_tmp = 64'b0;
130218'h28010: pio_rd_data_tmp = {60'b0, class_action_reg6_dout[2:1], 1'b0, class_action_reg6_dout[0]};
130318'h28011: pio_rd_data_tmp = 64'b0;
130418'h28012: pio_rd_data_tmp = {60'b0, class_action_reg7_dout[2:1], 1'b0, class_action_reg7_dout[0]};
130518'h28013: pio_rd_data_tmp = 64'b0;
130618'h28014: pio_rd_data_tmp = {60'b0, class_action_reg8_dout[2:1], 1'b0, class_action_reg8_dout[0]};
130718'h28015: pio_rd_data_tmp = 64'b0;
130818'h28016: pio_rd_data_tmp = {60'b0, class_action_reg9_dout[2:1], 1'b0, class_action_reg9_dout[0]};
130918'h28017: pio_rd_data_tmp = 64'b0;
131018'h28018: pio_rd_data_tmp = {60'b0, class_action_reg10_dout[2:1], 1'b0, class_action_reg10_dout[0]};
131118'h28019: pio_rd_data_tmp = 64'b0;
131218'h2801a: pio_rd_data_tmp = {60'b0, class_action_reg11_dout[2:1], 1'b0, class_action_reg11_dout[0]};
131318'h2801b: pio_rd_data_tmp = 64'b0;
131418'h2801c: pio_rd_data_tmp = {60'b0, class_action_reg12_dout[2:1], 1'b0, class_action_reg12_dout[0]};
131518'h2801d: pio_rd_data_tmp = 64'b0;
131618'h2801e: pio_rd_data_tmp = {60'b0, class_action_reg13_dout[2:1], 1'b0, class_action_reg13_dout[0]};
131718'h2801f: pio_rd_data_tmp = 64'b0;
131818'h28020: pio_rd_data_tmp = {60'b0, class_action_reg14_dout[2:1], 1'b0, class_action_reg14_dout[0]};
131918'h28021: pio_rd_data_tmp = 64'b0;
132018'h28022: pio_rd_data_tmp = {60'b0, class_action_reg15_dout[2:1], 1'b0, class_action_reg15_dout[0]};
132118'h28023: pio_rd_data_tmp = 64'b0;
132218'h28024: pio_rd_data_tmp = {56'b0, cam_key_reg0_dout[7:0]};
132318'h28025: pio_rd_data_tmp = 64'b0;
1324
132518'h28026: begin
1326 if (pio_32b_mode)
1327 pio_rd_data_tmp = {32'b0, cam_key_reg1_dout[31:0]};
1328 else
1329 pio_rd_data_tmp = cam_key_reg1_dout[63:0];
1330 end
1331
133218'h28027: begin
1333 if (pio_32b_mode)
1334 pio_rd_data_tmp = {32'b0, cam_key_reg1_dout[63:32]};
1335 else
1336 begin
1337 pio_addr_err = 1'b0;
1338 pio_rd_data_tmp = 64'b0;
1339 end
1340 end
1341
134218'h28028: begin
1343 if (pio_32b_mode)
1344 pio_rd_data_tmp = {32'b0, cam_key_reg2_dout[31:0]};
1345 else
1346 pio_rd_data_tmp = cam_key_reg2_dout[63:0];
1347 end
1348
134918'h28029: begin
1350 if (pio_32b_mode)
1351 pio_rd_data_tmp = {32'b0, cam_key_reg2_dout[63:32]};
1352 else
1353 begin
1354 pio_addr_err = 1'b0;
1355 pio_rd_data_tmp = 64'b0;
1356 end
1357 end
1358
135918'h2802a: begin
1360 if (pio_32b_mode)
1361 pio_rd_data_tmp = {32'b0, cam_key_reg3_dout[31:0]};
1362 else
1363 pio_rd_data_tmp = cam_key_reg3_dout[63:0];
1364 end
1365
136618'h2802b: begin
1367 if (pio_32b_mode)
1368 pio_rd_data_tmp = {32'b0, cam_key_reg3_dout[63:32]};
1369 else
1370 begin
1371 pio_addr_err = 1'b0;
1372 pio_rd_data_tmp = 64'b0;
1373 end
1374 end
1375
137618'h2802c: pio_rd_data_tmp = {56'b0, cam_key_mask_reg0_dout[7:0]};
1377
137818'h2802d: pio_rd_data_tmp = 64'b0;
1379
138018'h2802e: begin
1381 if (pio_32b_mode)
1382 pio_rd_data_tmp = {32'b0, cam_key_mask_reg1_dout[31:0]};
1383 else
1384 pio_rd_data_tmp = cam_key_mask_reg1_dout[63:0];
1385 end
1386
138718'h2802f: begin
1388 if (pio_32b_mode)
1389 pio_rd_data_tmp = {32'b0, cam_key_mask_reg1_dout[63:32]};
1390 else
1391 begin
1392 pio_addr_err = 1'b0;
1393 pio_rd_data_tmp = 64'b0;
1394 end
1395 end
1396
139718'h28030: begin
1398 if (pio_32b_mode)
1399 pio_rd_data_tmp = {32'b0, cam_key_mask_reg2_dout[31:0]};
1400 else
1401 pio_rd_data_tmp = cam_key_mask_reg2_dout[63:0];
1402 end
1403
140418'h28031: begin
1405 if (pio_32b_mode)
1406 pio_rd_data_tmp = {32'b0, cam_key_mask_reg2_dout[63:32]};
1407 else
1408 begin
1409 pio_addr_err = 1'b0;
1410 pio_rd_data_tmp = 64'b0;
1411 end
1412 end
1413
141418'h28032: begin
1415 if (pio_32b_mode)
1416 pio_rd_data_tmp = {32'b0, cam_key_mask_reg3_dout[31:0]};
1417 else
1418 pio_rd_data_tmp = cam_key_mask_reg3_dout[63:0];
1419 end
1420
142118'h28033: begin
1422 if (pio_32b_mode)
1423 pio_rd_data_tmp = {32'b0, cam_key_mask_reg3_dout[63:32]};
1424 else
1425 begin
1426 pio_addr_err = 1'b0;
1427 pio_rd_data_tmp = 64'b0;
1428 end
1429 end
1430
143118'h28034: pio_rd_data_tmp = {43'b0, cam_cmd_stat_reg_dout[20:0]};
143218'h28035: pio_rd_data_tmp = 64'b0;
143318'h28036: pio_rd_data_tmp = {32'b0, cam_ecc_log_reg_dout[26:24], 5'b0, cam_ecc_log_reg_dout[23:0]};
143418'h28037: pio_rd_data_tmp = 64'b0;
143518'h28038: pio_rd_data_tmp = {60'b0, hash_lookup_log_reg0_dout[3:0]};
143618'h28039: pio_rd_data_tmp = 64'b0;
143718'h2803a: pio_rd_data_tmp = {33'b0, hash_lookup_log_reg1_dout[30:0]};
143818'h2803b: pio_rd_data_tmp = 64'b0;
1439
144018'h28040: pio_rd_data_tmp = {37'b0, fflp_config_reg_dout[26:0]};
144118'h28041: pio_rd_data_tmp = 64'b0;
144218'h28042: pio_rd_data_tmp = {52'b0, hdr_ctrl_bit_mask_reg_dout[11:0]};
144318'h28043: pio_rd_data_tmp = 64'b0;
144418'h28044: pio_rd_data_tmp = {32'b0, fcram_refresh_timer_reg_dout};
144518'h28045: pio_rd_data_tmp = 64'b0;
144618'h28046: pio_rd_data_tmp = {56'b0, fio_cfg_addr_reg_dout[7:0]};
144718'h28047: pio_rd_data_tmp = 64'b0;
144818'h28048: pio_rd_data_tmp = {32'b0, cpu_fio_rd_data[31:0]};
144918'h28049: pio_rd_data_tmp = 64'b0;
145018'h2804a: pio_rd_data_tmp = {56'b0, fcram_err_test_reg0_dout[7:0]};
145118'h2804b: pio_rd_data_tmp = 64'b0;
145218'h2804c: pio_rd_data_tmp = {32'b0, fcram_err_test_reg1_dout[31:0]};
145318'h2804d: pio_rd_data_tmp = 64'b0;
145418'h2804e: pio_rd_data_tmp = {32'b0, fcram_err_test_reg2_dout[31:0]};
145518'h2804f: pio_rd_data_tmp = 64'b0;
1456
145718'h28050: pio_rd_data_tmp = {32'b0, 21'b0, fflp_err_intr_mask_reg_dout[10:0]};
145818'h28051: pio_rd_data_tmp = 64'b0;
145918'h28052: pio_rd_data_tmp = {32'b0, debug_training_vector[31:0]};
146018'h28053: pio_rd_data_tmp = 64'b0;
1461
146218'h28054: pio_rd_data_tmp = {56'b0, fio_cal_rd_latency[7:0]};
146318'h28055: pio_rd_data_tmp = 64'b0;
1464
146518'h30000: pio_rd_data_tmp = {54'b0, f_key_class_action_reg4_dout[9:0]};
146618'h30001: pio_rd_data_tmp = 64'b0;
146718'h30002: pio_rd_data_tmp = {54'b0, f_key_class_action_reg5_dout[9:0]};
146818'h30003: pio_rd_data_tmp = 64'b0;
146918'h30004: pio_rd_data_tmp = {54'b0, f_key_class_action_reg6_dout[9:0]};
147018'h30005: pio_rd_data_tmp = 64'b0;
147118'h30006: pio_rd_data_tmp = {54'b0, f_key_class_action_reg7_dout[9:0]};
147218'h30007: pio_rd_data_tmp = 64'b0;
147318'h30008: pio_rd_data_tmp = {54'b0, f_key_class_action_reg8_dout[9:0]};
147418'h30009: pio_rd_data_tmp = 64'b0;
147518'h3000a: pio_rd_data_tmp = {54'b0, f_key_class_action_reg9_dout[9:0]};
147618'h3000b: pio_rd_data_tmp = 64'b0;
147718'h3000c: pio_rd_data_tmp = {54'b0, f_key_class_action_reg10_dout[9:0]};
147818'h3000d: pio_rd_data_tmp = 64'b0;
147918'h3000e: pio_rd_data_tmp = {54'b0, f_key_class_action_reg11_dout[9:0]};
148018'h3000f: pio_rd_data_tmp = 64'b0;
148118'h30010: pio_rd_data_tmp = {54'b0, f_key_class_action_reg12_dout[9:0]};
148218'h30011: pio_rd_data_tmp = 64'b0;
148318'h30012: pio_rd_data_tmp = {54'b0, f_key_class_action_reg13_dout[9:0]};
148418'h30013: pio_rd_data_tmp = 64'b0;
148518'h30014: pio_rd_data_tmp = {54'b0, f_key_class_action_reg14_dout[9:0]};
148618'h30015: pio_rd_data_tmp = 64'b0;
148718'h30016: pio_rd_data_tmp = {54'b0, f_key_class_action_reg15_dout[9:0]};
148818'h30017: pio_rd_data_tmp = 64'b0;
148918'h30018: pio_rd_data_tmp = {32'b0, h1_init_value_reg_dout[31:0]};
149018'h30019: pio_rd_data_tmp = 64'b0;
149118'h3001a: pio_rd_data_tmp = {48'b0, h2_init_value_reg_dout[15:0]};
149218'h3001b: pio_rd_data_tmp = 64'b0;
149318'h3001c: pio_rd_data_tmp = {47'b0, flow_part_sel_reg0_dout[10], 3'b0, flow_part_sel_reg0_dout[9:5], 3'b0, flow_part_sel_reg0_dout[4:0]};
149418'h3001d: pio_rd_data_tmp = 64'b0;
149518'h3001e: pio_rd_data_tmp = {47'b0, flow_part_sel_reg1_dout[10], 3'b0, flow_part_sel_reg1_dout[9:5], 3'b0, flow_part_sel_reg1_dout[4:0]};
149618'h3001f: pio_rd_data_tmp = 64'b0;
149718'h30020: pio_rd_data_tmp = {47'b0, flow_part_sel_reg2_dout[10], 3'b0, flow_part_sel_reg2_dout[9:5], 3'b0, flow_part_sel_reg2_dout[4:0]};
149818'h30021: pio_rd_data_tmp = 64'b0;
149918'h30022: pio_rd_data_tmp = {47'b0, flow_part_sel_reg3_dout[10], 3'b0, flow_part_sel_reg3_dout[9:5], 3'b0, flow_part_sel_reg3_dout[4:0]};
150018'h30023: pio_rd_data_tmp = 64'b0;
150118'h30024: pio_rd_data_tmp = {47'b0, flow_part_sel_reg4_dout[10], 3'b0, flow_part_sel_reg4_dout[9:5], 3'b0, flow_part_sel_reg4_dout[4:0]};
150218'h30025: pio_rd_data_tmp = 64'b0;
150318'h30026: pio_rd_data_tmp = {47'b0, flow_part_sel_reg5_dout[10], 3'b0, flow_part_sel_reg5_dout[9:5], 3'b0, flow_part_sel_reg5_dout[4:0]};
150418'h30027: pio_rd_data_tmp = 64'b0;
150518'h30028: pio_rd_data_tmp = {47'b0, flow_part_sel_reg6_dout[10], 3'b0, flow_part_sel_reg6_dout[9:5], 3'b0, flow_part_sel_reg6_dout[4:0]};
150618'h30029: pio_rd_data_tmp = 64'b0;
150718'h3002a: pio_rd_data_tmp = {47'b0, flow_part_sel_reg7_dout[10], 3'b0, flow_part_sel_reg7_dout[9:5], 3'b0, flow_part_sel_reg7_dout[4:0]};
150818'h3002b: pio_rd_data_tmp = 64'b0;
1509
1510default: begin
1511 pio_rd_data_tmp = 64'hdeadbeefdeadbeef;
1512 pio_addr_err = 1'b1;
1513 end
1514endcase
1515
1516end
1517
1518
1519endmodule