Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / spc / mmu / rtl / mmu_mec_dp.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: mmu_mec_dp.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 ============================================
35module mmu_mec_dp (
36 data_in,
37 parity_in,
38 parity_out,
39 parity_err);
40wire [40:0] d;
41wire p;
42wire [41:0] check_bus;
43wire check_4;
44wire check_3;
45wire check_2;
46wire check_1;
47wire check_0;
48
49
50
51input [40:0] data_in; // Used for generation and checking
52input parity_in; // Used for checking only; tie to '0' for gen
53
54output parity_out; // Used for generation only; unused for check
55output parity_err; // Used for checking only; unused for gen
56
57
58
59//////////////////////////////////////////////////////////////////////////////
60
61
62assign d[40:0] =
63 data_in[40:0];
64assign p =
65 parity_in;
66
67
68
69assign check_bus[41:0] =
70 {p, d[40:0]};
71
72mmu_mec_dp_prty_macro__width_8 check_4_pty (
73 .din (check_bus [39:32] ),
74 .dout (check_4 )
75);
76
77mmu_mec_dp_prty_macro__width_8 check_3_pty (
78 .din (check_bus [31:24] ),
79 .dout (check_3 )
80);
81
82mmu_mec_dp_prty_macro__width_8 check_2_pty (
83 .din (check_bus [23:16] ),
84 .dout (check_2 )
85);
86
87mmu_mec_dp_prty_macro__width_8 check_1_pty (
88 .din (check_bus [15:8] ),
89 .dout (check_1 )
90);
91
92mmu_mec_dp_prty_macro__width_8 check_0_pty (
93 .din (check_bus [7:0] ),
94 .dout (check_0 )
95);
96
97mmu_mec_dp_prty_macro__width_8 check_pty (
98 .din ({1'b0 ,
99 check_bus [41:40],
100 check_4 ,
101 check_3 ,
102 check_2 ,
103 check_1 ,
104 check_0 }),
105 .dout (parity_out )
106);
107
108
109assign parity_err = parity_out;
110
111
112
113supply0 vss; // <- port for ground
114supply1 vdd; // <- port for power
115
116endmodule
117
118
119
120//
121// parity macro (even parity)
122//
123//
124
125
126
127
128
129module mmu_mec_dp_prty_macro__width_8 (
130 din,
131 dout);
132 input [7:0] din;
133 output dout;
134
135
136
137
138
139
140
141prty #(8) m0_0 (
142.in(din[7:0]),
143.out(dout)
144);
145
146
147
148
149
150
151
152
153
154
155endmodule
156
157
158
159