Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: ncu_ccx_chkr.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 | module ncu_ccx_chkr(); | |
36 | ||
37 | wire por_reset_l = !`NCU.tcu_aclk; | |
38 | ||
39 | ||
40 | // 0in default_reset `NCU.tcu_aclk -module ncu_ccx_chkr | |
41 | ||
42 | `ifdef X_GUARD | |
43 | // 0in known_driven -var cpx_ncu_grant_cx -clock l2clk -name cpx_ncu_grant_cx_x_guard -active por_reset_l -module ncu | |
44 | // 0in known_driven -var ncu_cpx_req_cq -clock l2clk -name ncu_cpx_req_cq_x_guard -active por_reset_l -module ncu | |
45 | // 0in known_driven -var ncu_pcx_stall_pq -clock l2clk -name ncu_pcx_stall_pq_x_guard -active por_reset_l -module ncu | |
46 | // 0in known_driven -var pcx_ncu_data_rdy_px1 -clock l2clk -name pcx_ncu_data_rdy_px1_x_guard -active por_reset_l -module ncu | |
47 | ||
48 | `endif | |
49 | ||
50 | //**************************************** | |
51 | // checker for PCX interface | |
52 | //**************************************** | |
53 | ||
54 | ||
55 | //**************************************** | |
56 | // checker for CPX interface | |
57 | //**************************************** | |
58 | reg [4:0] outstanding_req_cnt0; | |
59 | reg [4:0] outstanding_req_cnt1; | |
60 | reg [4:0] outstanding_req_cnt2; | |
61 | reg [4:0] outstanding_req_cnt3; | |
62 | reg [4:0] outstanding_req_cnt4; | |
63 | reg [4:0] outstanding_req_cnt5; | |
64 | reg [4:0] outstanding_req_cnt6; | |
65 | reg [4:0] outstanding_req_cnt7; | |
66 | ||
67 | ||
68 | /* 0in bits_on | |
69 | -var ncu_cpx_req_cq | |
70 | -max 1 | |
71 | -message "ncu_cpx_req_cq is not one hot" | |
72 | -clock l2clk | |
73 | -module ncu | |
74 | */ | |
75 | ||
76 | ||
77 | ||
78 | /* 0in overflow | |
79 | -var outstanding_req_cnt0 | |
80 | -max 2 | |
81 | -name ncu_cpx_req_cq0 | |
82 | -clock l2clk | |
83 | -module ncu | |
84 | */ | |
85 | /* 0in overflow | |
86 | -var outstanding_req_cnt1 | |
87 | -max 2 | |
88 | -name ncu_cpx_req_cq1 | |
89 | -clock l2clk | |
90 | -module ncu | |
91 | */ | |
92 | /* 0in overflow | |
93 | -var outstanding_req_cnt2 | |
94 | -max 2 | |
95 | -name ncu_cpx_req_cq2 | |
96 | -clock l2clk | |
97 | -module ncu | |
98 | */ | |
99 | /* 0in overflow | |
100 | -var outstanding_req_cnt3 | |
101 | -max 2 | |
102 | -name ncu_cpx_req_cq3 | |
103 | -clock l2clk | |
104 | -module ncu | |
105 | */ | |
106 | /* 0in overflow | |
107 | -var outstanding_req_cnt4 | |
108 | -max 2 | |
109 | -name ncu_cpx_req_cq4 | |
110 | -clock l2clk | |
111 | -module ncu | |
112 | */ | |
113 | /* 0in overflow | |
114 | -var outstanding_req_cnt5 | |
115 | -max 2 | |
116 | -name ncu_cpx_req_cq5 | |
117 | -clock l2clk | |
118 | -module ncu | |
119 | */ | |
120 | /* 0in overflow | |
121 | -var outstanding_req_cnt6 | |
122 | -max 2 | |
123 | -name ncu_cpx_req_cq6 | |
124 | -clock l2clk | |
125 | -module ncu | |
126 | */ | |
127 | /* 0in overflow | |
128 | -var outstanding_req_cnt7 | |
129 | -max 2 | |
130 | -name ncu_cpx_req_cq7 | |
131 | -clock l2clk | |
132 | -module ncu | |
133 | */ | |
134 | ||
135 | always @(por_reset_l) begin | |
136 | if (!por_reset_l) begin | |
137 | outstanding_req_cnt0 = 0; | |
138 | end | |
139 | end | |
140 | always @(por_reset_l) begin | |
141 | if (!por_reset_l) begin | |
142 | outstanding_req_cnt1 = 0; | |
143 | end | |
144 | end | |
145 | always @(por_reset_l) begin | |
146 | if (!por_reset_l) begin | |
147 | outstanding_req_cnt2 = 0; | |
148 | end | |
149 | end | |
150 | always @(por_reset_l) begin | |
151 | if (!por_reset_l) begin | |
152 | outstanding_req_cnt3 = 0; | |
153 | end | |
154 | end | |
155 | always @(por_reset_l) begin | |
156 | if (!por_reset_l) begin | |
157 | outstanding_req_cnt4 = 0; | |
158 | end | |
159 | end | |
160 | always @(por_reset_l) begin | |
161 | if (!por_reset_l) begin | |
162 | outstanding_req_cnt5 = 0; | |
163 | end | |
164 | end | |
165 | always @(por_reset_l) begin | |
166 | if (!por_reset_l) begin | |
167 | outstanding_req_cnt6 = 0; | |
168 | end | |
169 | end | |
170 | always @(por_reset_l) begin | |
171 | if (!por_reset_l) begin | |
172 | outstanding_req_cnt7 = 0; | |
173 | end | |
174 | end | |
175 | ||
176 | ||
177 | always @(posedge `NCU.l2clk) begin | |
178 | if (`NCU.cpx_ncu_grant_cx[0]) begin | |
179 | if (outstanding_req_cnt0 <= 0)begin | |
180 | $display ("ERROR! %m outstanding_req_cnt0 will become negtive value") ; | |
181 | end | |
182 | outstanding_req_cnt0 = outstanding_req_cnt0 - 1; | |
183 | end | |
184 | if (`NCU.ncu_cpx_req_cq[0]) begin | |
185 | outstanding_req_cnt0 = outstanding_req_cnt0 + 1; | |
186 | end | |
187 | end | |
188 | always @(posedge `NCU.l2clk) begin | |
189 | if (`NCU.cpx_ncu_grant_cx[1]) begin | |
190 | if (outstanding_req_cnt1 <= 0)begin | |
191 | $display ("ERROR! %m outstanding_req_cnt1 will become negtive value") ; | |
192 | end | |
193 | outstanding_req_cnt1 = outstanding_req_cnt1 - 1; | |
194 | end | |
195 | if (`NCU.ncu_cpx_req_cq[1]) begin | |
196 | outstanding_req_cnt1 = outstanding_req_cnt1 + 1; | |
197 | end | |
198 | end | |
199 | always @(posedge `NCU.l2clk) begin | |
200 | if (`NCU.cpx_ncu_grant_cx[2]) begin | |
201 | if (outstanding_req_cnt2 <= 0)begin | |
202 | $display ("ERROR! %m outstanding_req_cnt2 will become negtive value") ; | |
203 | end | |
204 | outstanding_req_cnt2 = outstanding_req_cnt2 - 1; | |
205 | end | |
206 | if (`NCU.ncu_cpx_req_cq[2]) begin | |
207 | outstanding_req_cnt2 = outstanding_req_cnt2 + 1; | |
208 | end | |
209 | end | |
210 | always @(posedge `NCU.l2clk) begin | |
211 | if (`NCU.cpx_ncu_grant_cx[3]) begin | |
212 | if (outstanding_req_cnt3 <= 0)begin | |
213 | $display ("ERROR! %m outstanding_req_cnt3 will become negtive value") ; | |
214 | end | |
215 | outstanding_req_cnt3 = outstanding_req_cnt3 - 1; | |
216 | end | |
217 | if (`NCU.ncu_cpx_req_cq[3]) begin | |
218 | outstanding_req_cnt3 = outstanding_req_cnt3 + 1; | |
219 | end | |
220 | end | |
221 | always @(posedge `NCU.l2clk) begin | |
222 | if (`NCU.cpx_ncu_grant_cx[4]) begin | |
223 | if (outstanding_req_cnt4 <= 0)begin | |
224 | $display ("ERROR! %m outstanding_req_cnt4 will become negtive value") ; | |
225 | end | |
226 | outstanding_req_cnt4 = outstanding_req_cnt4 - 1; | |
227 | end | |
228 | if (`NCU.ncu_cpx_req_cq[4]) begin | |
229 | outstanding_req_cnt4 = outstanding_req_cnt4 + 1; | |
230 | end | |
231 | end | |
232 | always @(posedge `NCU.l2clk) begin | |
233 | if (`NCU.cpx_ncu_grant_cx[5]) begin | |
234 | if (outstanding_req_cnt5 <= 0)begin | |
235 | $display ("ERROR! %m outstanding_req_cnt5 will become negtive value") ; | |
236 | end | |
237 | outstanding_req_cnt5 = outstanding_req_cnt5 - 1; | |
238 | end | |
239 | if (`NCU.ncu_cpx_req_cq[5]) begin | |
240 | outstanding_req_cnt5 = outstanding_req_cnt5 + 1; | |
241 | end | |
242 | end | |
243 | always @(posedge `NCU.l2clk) begin | |
244 | if (`NCU.cpx_ncu_grant_cx[6]) begin | |
245 | if (outstanding_req_cnt6 <= 0)begin | |
246 | $display ("ERROR! %m outstanding_req_cnt6 will become negtive value") ; | |
247 | end | |
248 | outstanding_req_cnt6 = outstanding_req_cnt6 - 1; | |
249 | end | |
250 | if (`NCU.ncu_cpx_req_cq[6]) begin | |
251 | outstanding_req_cnt6 = outstanding_req_cnt6 + 1; | |
252 | end | |
253 | end | |
254 | always @(posedge `NCU.l2clk) begin | |
255 | if (`NCU.cpx_ncu_grant_cx[7]) begin | |
256 | if (outstanding_req_cnt7 <= 0)begin | |
257 | $display ("ERROR! %m outstanding_req_cnt7 will become negtive value") ; | |
258 | end | |
259 | outstanding_req_cnt7 = outstanding_req_cnt7 - 1; | |
260 | end | |
261 | if (`NCU.ncu_cpx_req_cq[7]) begin | |
262 | outstanding_req_cnt7 = outstanding_req_cnt7 + 1; | |
263 | end | |
264 | end | |
265 | ||
266 | endmodule |