Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: niu_cam_128x200.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 | /********************************************************** | |
37 | *********************************************************** | |
38 | ||
39 | Project : Niu | |
40 | ||
41 | File name : niu_cam_128x200.v | |
42 | ||
43 | Module(s) name : niu_cam_128x200 | |
44 | ||
45 | Parent modules : niu_rxc | |
46 | ||
47 | Child modules : n2_niu_tc_128x200s_cust | |
48 | ||
49 | Author's name : George Chu | |
50 | ||
51 | Date : April. 2004 | |
52 | ||
53 | Description : | |
54 | ||
55 | Synthesis Notes: | |
56 | ||
57 | Modification History: | |
58 | Date Description | |
59 | ---- ----------- | |
60 | ||
61 | ************************************************************ | |
62 | ***********************************************************/ | |
63 | ||
64 | `timescale 1ns/10ps | |
65 | ||
66 | module niu_cam_128x200 ( | |
67 | tcu_aclk, | |
68 | tcu_bclk, | |
69 | tcu_se_scancollar_in, | |
70 | tcu_se_scancollar_out, | |
71 | tcu_array_wr_inhibit, | |
72 | scan_in, | |
73 | scan_out, | |
74 | clk, | |
75 | mbi_wdata, | |
76 | mbi_rw_adr, | |
77 | mbi_pio_sel, | |
78 | mbi_wr_en, | |
79 | mbi_rd_en, | |
80 | mbi_compare, | |
81 | mbi_run, | |
82 | data_inp, | |
83 | cam_compare, | |
84 | pio_wt, | |
85 | pio_rd, | |
86 | pio_sel, | |
87 | cam_index, | |
88 | reset, | |
89 | cam_valid, | |
90 | cam_hit, | |
91 | cam_haddr, | |
92 | pio_rd_vld, | |
93 | msk_dat_out | |
94 | ); | |
95 | ||
96 | parameter DATA_WIDTH_MINUS1 = 199; | |
97 | parameter ADDR_WIDTH_MINUS1 = 6; | |
98 | ||
99 | input tcu_aclk; | |
100 | input tcu_bclk; | |
101 | input tcu_se_scancollar_in; | |
102 | input tcu_se_scancollar_out; | |
103 | input tcu_array_wr_inhibit; | |
104 | input scan_in; | |
105 | output scan_out; | |
106 | ||
107 | input clk; | |
108 | ||
109 | input [DATA_WIDTH_MINUS1:0] mbi_wdata; | |
110 | input [ADDR_WIDTH_MINUS1:0] mbi_rw_adr; | |
111 | input mbi_pio_sel; | |
112 | input mbi_wr_en; | |
113 | input mbi_rd_en; | |
114 | input mbi_compare; | |
115 | input mbi_run; | |
116 | ||
117 | input [DATA_WIDTH_MINUS1:0] data_inp; | |
118 | input cam_compare; | |
119 | input pio_wt; | |
120 | input pio_rd; | |
121 | input pio_sel; | |
122 | input [ADDR_WIDTH_MINUS1:0] cam_index; | |
123 | input reset; | |
124 | output cam_valid; | |
125 | output cam_hit; | |
126 | output [ADDR_WIDTH_MINUS1:0] cam_haddr; | |
127 | output pio_rd_vld; | |
128 | output [DATA_WIDTH_MINUS1:0] msk_dat_out; | |
129 | ||
130 | wire cam_valid; | |
131 | wire cam_hit; | |
132 | wire [ADDR_WIDTH_MINUS1:0] cam_haddr; | |
133 | wire pio_rd_vld; | |
134 | wire [DATA_WIDTH_MINUS1:0] msk_dat_out; | |
135 | wire scan_out; | |
136 | ||
137 | wire mux_pio_sel; | |
138 | wire mux_wr_en; | |
139 | wire [ADDR_WIDTH_MINUS1:0] mux_rw_adr; | |
140 | wire mux_rd_en; | |
141 | wire [DATA_WIDTH_MINUS1:0] mux_wdata; | |
142 | wire mux_compare; | |
143 | ||
144 | assign mux_wdata = mbi_run ? mbi_wdata : data_inp; | |
145 | assign mux_rw_adr = mbi_run ? mbi_rw_adr : cam_index; | |
146 | assign mux_pio_sel= mbi_run ? mbi_pio_sel: pio_sel; | |
147 | assign mux_wr_en = mbi_run ? mbi_wr_en : pio_wt; | |
148 | assign mux_rd_en = mbi_run ? mbi_rd_en : pio_rd; | |
149 | assign mux_compare= mbi_run ? mbi_compare: cam_compare; | |
150 | ||
151 | n2_niu_tc_128x200s_cust cam_128x200_0 ( | |
152 | .data_inp (mux_wdata), | |
153 | .cam_compare (mux_compare), | |
154 | .pio_wt (mux_wr_en), | |
155 | .pio_rd (mux_rd_en), | |
156 | .pio_sel (mux_pio_sel), | |
157 | .cam_index (mux_rw_adr[6:0]), | |
158 | .reset (reset), | |
159 | .clk (clk), | |
160 | .tcu_se_scancollar_in (tcu_se_scancollar_in), | |
161 | .tcu_se_scancollar_out (tcu_se_scancollar_out), | |
162 | .tcu_array_wr_inhibit (tcu_array_wr_inhibit), | |
163 | .tcu_aclk (tcu_aclk), | |
164 | .tcu_bclk (tcu_bclk), | |
165 | .tcu_pce_ov (1'h1), | |
166 | .pce (1'h1), | |
167 | .scan_in (scan_in), | |
168 | .scan_out (scan_out), | |
169 | .cam_valid (cam_valid), | |
170 | .cam_hit (cam_hit), | |
171 | .cam_haddr (cam_haddr[6:0]), | |
172 | .pio_rd_vld (pio_rd_vld), | |
173 | .msk_dat_out (msk_dat_out[199:0]) | |
174 | ); | |
175 | ||
176 | endmodule |