Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | // ========== Copyright Header Begin ========================================== |
2 | // | |
3 | // OpenSPARC T2 Processor File: ncu_siu_ras_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 | `ifdef SIU | |
36 | `define TOP siu_top | |
37 | `define TB_RST siu_top.reset | |
38 | `else | |
39 | `define TOP tb_top | |
40 | `define TB_RST tb_top.reset | |
41 | `endif | |
42 | ||
43 | ||
44 | module ncu_siu_ras_chkr(); | |
45 | ||
46 | reg no_siuncu_ras_chk ; | |
47 | initial begin // { | |
48 | @(posedge `TOP.cpu.sii.iol2clk) ; | |
49 | if ($test$plusargs("ios_0in_ras_chk_off")) | |
50 | no_siuncu_ras_chk <= 1; | |
51 | else | |
52 | no_siuncu_ras_chk <= 0; | |
53 | end //} | |
54 | ||
55 | // 0in disable_checker no_siuncu_ras_chk -name cpu.sii_ncu_ctag* | |
56 | ||
57 | `ifdef X_GUARD | |
58 | // 0in known_driven -var sii_ncu_req -name sii_ncu_req_x_guard -module cpu | |
59 | // 0in known_driven -var sii_ncu_data -name ncu_sii_data_x_guard -module cpu | |
60 | ||
61 | // 0in known_driven -var ncu_sii_gnt -name ncu_sii_gnt_x_guard -module cpu | |
62 | ||
63 | // 0in known_driven -var ncu_sii_pm -name ncu_sii_pm_x_guard -module cpu | |
64 | // 0in known_driven -var ncu_sii_ba01 -name ncu_sii_ba01_x_guard -module cpu | |
65 | // 0in known_driven -var ncu_sii_ba23 -name ncu_sii_ba23_x_guard -module cpu | |
66 | // 0in known_driven -var ncu_sii_ba45 -name ncu_sii_ba45_x_guard -module cpu | |
67 | // 0in known_driven -var ncu_sii_ba67 -name ncu_sii_ba67_x_guard -module cpu | |
68 | ||
69 | // 0in known_driven -var ncu_sii_l2_idx_hash_en -name ncu_sii_l2_idx_hash_en_x_guard -module cpu | |
70 | `endif | |
71 | ||
72 | ||
73 | /************************************************************************* | |
74 | * | |
75 | * Check for ctag ecc | |
76 | * | |
77 | **************************************************************************/ | |
78 | ||
79 | wire p0 = (`TOP.cpu.sii_ncu_data[0] ^ `TOP.cpu.sii_ncu_data[1] ^ `TOP.cpu.sii_ncu_data[3] ^ `TOP.cpu.sii_ncu_data[4] ^ `TOP.cpu.sii_ncu_data[6] ^ `TOP.cpu.sii_ncu_data[8] ^ `TOP.cpu.sii_ncu_data[10] ^ `TOP.cpu.sii_ncu_data[11] ^ `TOP.cpu.sii_ncu_data[13] ^ `TOP.cpu.sii_ncu_data[15]); | |
80 | ||
81 | /* 0in custom | |
82 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p0 == sii_ncu_data[16])) | |
83 | -message "ctag error for sii_ncu: p0 does not equal c0" | |
84 | -clock `TOP.cpu.sii.iol2clk | |
85 | -module cpu | |
86 | -reset `TB_RST | |
87 | -name sii_ncu_ctag_ecc_p0 | |
88 | */ | |
89 | ||
90 | wire p1 = (`TOP.cpu.sii_ncu_data[0] ^ `TOP.cpu.sii_ncu_data[2] ^ `TOP.cpu.sii_ncu_data[3] ^ `TOP.cpu.sii_ncu_data[5] ^ `TOP.cpu.sii_ncu_data[6] ^ `TOP.cpu.sii_ncu_data[9] ^ `TOP.cpu.sii_ncu_data[10] ^ `TOP.cpu.sii_ncu_data[12] ^ `TOP.cpu.sii_ncu_data[13]); | |
91 | ||
92 | /* 0in custom | |
93 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p1 == sii_ncu_data[17])) | |
94 | -message "ctag error for sii_ncu: p1 does not equal c1" | |
95 | -clock `TOP.cpu.sii.iol2clk | |
96 | -module cpu | |
97 | -reset `TB_RST | |
98 | -name sii_ncu_ctag_ecc_p1 | |
99 | */ | |
100 | ||
101 | wire p2 = (`TOP.cpu.sii_ncu_data[1] ^ `TOP.cpu.sii_ncu_data[2] ^ `TOP.cpu.sii_ncu_data[3] ^ `TOP.cpu.sii_ncu_data[7] ^ `TOP.cpu.sii_ncu_data[8] ^ `TOP.cpu.sii_ncu_data[9] ^ `TOP.cpu.sii_ncu_data[10] ^ `TOP.cpu.sii_ncu_data[14] ^ `TOP.cpu.sii_ncu_data[15]); | |
102 | ||
103 | /* 0in custom | |
104 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p2 == sii_ncu_data[18])) | |
105 | -message "ctag error for sii_ncu: p2 does not equal c2" | |
106 | -clock `TOP.cpu.sii.iol2clk | |
107 | -module cpu | |
108 | -reset `TB_RST | |
109 | -name sii_ncu_ctag_ecc_p2 | |
110 | */ | |
111 | ||
112 | wire p3 = (`TOP.cpu.sii_ncu_data[4] ^ `TOP.cpu.sii_ncu_data[5] ^ `TOP.cpu.sii_ncu_data[6] ^ `TOP.cpu.sii_ncu_data[7] ^ `TOP.cpu.sii_ncu_data[8] ^ `TOP.cpu.sii_ncu_data[9] ^ `TOP.cpu.sii_ncu_data[10]); | |
113 | ||
114 | /* 0in custom | |
115 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p3 == sii_ncu_data[19])) | |
116 | -message "ctag error for sii_ncu: p3 does not equal c3" | |
117 | -clock `TOP.cpu.sii.iol2clk | |
118 | -module cpu | |
119 | -reset `TB_RST | |
120 | -name sii_ncu_ctag_ecc_p3 | |
121 | */ | |
122 | ||
123 | wire p4 = (`TOP.cpu.sii_ncu_data[11] ^ `TOP.cpu.sii_ncu_data[12] ^ `TOP.cpu.sii_ncu_data[13] ^ `TOP.cpu.sii_ncu_data[14] ^ `TOP.cpu.sii_ncu_data[15]); | |
124 | ||
125 | /* 0in custom | |
126 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p4 == sii_ncu_data[20])) | |
127 | -message "ctag error for sii_ncu: p4 does not equal c4" | |
128 | -clock `TOP.cpu.sii.iol2clk | |
129 | -module cpu | |
130 | -reset `TB_RST | |
131 | -name sii_ncu_ctag_ecc_p4 | |
132 | */ | |
133 | ||
134 | wire p5 = (`TOP.cpu.sii_ncu_data[0] ^ `TOP.cpu.sii_ncu_data[1] ^ `TOP.cpu.sii_ncu_data[2] ^ `TOP.cpu.sii_ncu_data[4] ^ `TOP.cpu.sii_ncu_data[5] ^ `TOP.cpu.sii_ncu_data[7] ^ `TOP.cpu.sii_ncu_data[10] ^ `TOP.cpu.sii_ncu_data[11] ^ `TOP.cpu.sii_ncu_data[12] ^ `TOP.cpu.sii_ncu_data[14]); | |
135 | ||
136 | /* 0in custom | |
137 | -fire (($0in_rising_edge($0in_delay(ncu_sii_gnt,1))) && !(p5 == sii_ncu_data[21])) | |
138 | -message "ctag error for sii_ncu: p5 does not equal c5" | |
139 | -clock `TOP.cpu.sii.iol2clk | |
140 | -module cpu | |
141 | -reset `TB_RST | |
142 | -name sii_ncu_ctag_ecc_p5 | |
143 | */ | |
144 | ||
145 | /************************************************************************* | |
146 | * | |
147 | * Check for SII Error syndrome | |
148 | * | |
149 | **************************************************************************/ | |
150 | ||
151 | /* 0in assert_window | |
152 | -start (($0in_falling_edge(ccu_cmp_io_sync_en)) && (($0in_rising_edge(sii_ncu_syn_data[0])) | ($0in_rising_edge(sii_ncu_syn_data[1])) | ($0in_rising_edge(sii_ncu_syn_data[2])) | ($0in_rising_edge(sii_ncu_syn_data[3])))) | |
153 | -start_count 1 | |
154 | -stop_count 16 | |
155 | -in sii_ncu_syn_vld | |
156 | -clock `TOP.cpu.sii.iol2clk | |
157 | -module cpu | |
158 | -reset `TB_RST | |
159 | -name sii_error_synd | |
160 | */ | |
161 | ||
162 | ||
163 | endmodule // niu_siu_ras_chkr |