Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / libs / clk / rtl / clkgen_rst_io2x.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: clkgen_rst_io2x.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 clkgen_rst_io2x (
36 array_wr_inhibit,
37 tcu_atpg_mode,
38 tcu_wr_inhibit,
39 l2clk,
40 aclk,
41 bclk,
42 so,
43 clk_stop,
44 pce_ov,
45 wmr_protect,
46 wmr_,
47 por_,
48 cmp_slow_sync_en,
49 slow_cmp_sync_en,
50 tcu_clk_stop,
51 tcu_pce_ov,
52 rst_wmr_protect,
53 rst_wmr_,
54 rst_por_,
55 ccu_cmp_slow_sync_en,
56 ccu_slow_cmp_sync_en,
57 tcu_div_bypass,
58 ccu_div_ph,
59 cluster_div_en,
60 gclk,
61 clk_ext,
62 tcu_aclk,
63 tcu_bclk,
64 se,
65 si
66);
67
68
69// **************************
70// port declaration
71// **************************
72
73// clock & test out
74output l2clk; // assume we do not need aclk, bclk outputs
75output aclk; // buffered version of aclk
76output bclk; // buffered version of bclk
77output so; // unused as of today - feb 10, 05
78
79// pipelined out
80output clk_stop; // allows clk stop in flop-header
81output pce_ov; // pce override to l1 header
82output wmr_protect; // warm reset protect
83output wmr_; // warm reset (active low)
84output por_; // power-on-reset
85output cmp_slow_sync_en; // cmp->slow clk sync pulse
86output slow_cmp_sync_en; // slow->cmp clk sync pulse
87
88// ctrl in (for pipelining)
89output array_wr_inhibit;
90input tcu_atpg_mode;
91input tcu_wr_inhibit;
92input tcu_clk_stop;
93input tcu_pce_ov;
94input rst_wmr_protect;
95input rst_wmr_;
96input rst_por_;
97input ccu_cmp_slow_sync_en;
98input ccu_slow_cmp_sync_en;
99
100// ctrl in (for clock gen)
101input tcu_div_bypass; // bypasses clk divider to mux in ext clk
102input ccu_div_ph; // phase signal from ccu (div/4 or div/2)
103input cluster_div_en; // if enabled, l2clk is divided down
104
105// clock & test in
106input gclk; // global clk - this is either cmp or dr
107input clk_ext; // external clk muxed in for ioclk bypass
108input se; // unused as of today - feb 10, 05
109input si; // unused as of today - feb 10, 05
110input tcu_aclk;
111input tcu_bclk;
112
113
114// **************************
115// wire declaration
116// **************************
117wire array_wr_inhibit;
118wire tcu_atpg_mode;
119wire tcu_wr_inhibit;
120wire l2clk;
121wire aclk;
122wire bclk;
123wire so;
124wire clk_stop;
125wire pce_ov;
126wire wmr_protect;
127wire wmr_;
128wire por_;
129wire cmp_slow_sync_en;
130wire slow_cmp_sync_en;
131wire tcu_clk_stop;
132wire tcu_pce_ov;
133wire rst_wmr_protect;
134wire rst_wmr_;
135wire rst_por_;
136wire ccu_cmp_slow_sync_en;
137wire ccu_slow_cmp_sync_en;
138wire tcu_div_bypass;
139wire ccu_div_ph;
140wire cluster_div_en;
141wire gclk;
142wire clk_ext;
143wire se; // tie-low, unused as of today - feb 10, 05
144wire si; // tie-low, unused as of today - feb 10, 05
145wire tcu_aclk;
146wire tcu_bclk;
147
148
149
150// **************************
151// instantiations
152// **************************
153
154// needs a few edits to cluster header def - mahmud.hassan
155// modified custom cell name for avoiding
156// collision with sparc core and other clusters - mhassan
157n2_clk_clstr_hdr_cust xcluster_header (
158 .cpu_divider_bypass (tcu_div_bypass ),
159 .tcu_pce_ov (tcu_pce_ov ),
160 .tcu_clk_stop (tcu_clk_stop ),
161 // .clk_ext (clk_ext ),
162 .div_r (ccu_div_ph ),
163 .div_f (cluster_div_en ),
164 .se (se ),
165 .so (so ),
166 .clk_stop (clk_stop ),
167 .pce_ov (pce_ov ),
168 .wmr_ (wmr_ ),
169 .cclk (cclk ),
170 .tcu_bclk (tcu_bclk ),
171 .tcu_aclk (tcu_aclk ),
172 .si (si ),
173 .gclk (gclk ),
174 .rst_wmr_ (rst_wmr_ ),
175 .l2clk (l2clk ),
176 .rst_wmr_protect (rst_wmr_protect ),
177 .rst_por_ ( rst_por_ ),
178 .wmr_protect (wmr_protect ),
179 .por_ (por_ ),
180 .ccu_cmp_slow_sync_en (ccu_cmp_slow_sync_en ),
181 .ccu_slow_cmp_sync_en (ccu_slow_cmp_sync_en ),
182 .cmp_slow_sync_en (cmp_slow_sync_en ),
183 .slow_cmp_sync_en (slow_cmp_sync_en ),
184 .aclk (aclk),
185 .bclk (bclk)
186);
187
188
189// cclk -> l2clk from right
190n2_clk_rst_io2x_cust xright (
191 .l2clk (l2clk),
192 .cclk (cclk)
193);
194
195
196
197// cclk -> l2clk from left
198n2_clk_rst_io2x_cust xleft (
199 .l2clk (l2clk),
200 .cclk (cclk)
201);
202
203endmodule
204