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