source: XOpenSparcT1/trunk/T1-common/common/cluster_header_ctu.v @ 6

Revision 6, 3.3 KB checked in by pntsvt00, 13 years ago (diff)

versione iniziale opensparc

Line 
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T1 Processor File: cluster_header_ctu.v
4// Copyright (c) 2006 Sun Microsystems, Inc.  All Rights Reserved.
5// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES.
6//
7// The above named program is free software; you can redistribute it and/or
8// modify it under the terms of the GNU General Public
9// License version 2 as published by the Free Software Foundation.
10//
11// The above named program is distributed in the hope that it will be
12// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public
17// License along with this work; if not, write to the Free Software
18// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
19//
20// ========== Copyright Header End ============================================
21// The cluster header is instatiated as a hard macro.
22// This model is for simulation only.
23`include "sys.h"
24
25module cluster_header_ctu (/*AUTOARG*/
26   // Outputs
27   dbginit_l, cluster_grst_l, rclk, so, 
28   // Inputs
29   gclk, cluster_cken, arst_l, grst_l, adbginit_l, gdbginit_l, si, 
30   se
31   );
32
33   input       gclk;
34   input       cluster_cken;
35   input       arst_l;
36   input       grst_l;
37   input       adbginit_l;
38   input       gdbginit_l; 
39   output      dbginit_l; 
40   output      cluster_grst_l;
41   output      rclk;
42
43   input       si; // scan ports for reset flop repeaters
44   input       se;
45   output      so;
46   
47   wire        pre_sync_enable;
48   wire        sync_enable;
49   wire        cluster_grst_l;
50   wire        dbginit_l;
51   wire        rst_sync_so;
52
53   bw_u1_syncff_4x sync_cluster_master ( // no scan hook-up
54                                        .so(),
55                                        .q (pre_sync_enable),
56                                        .ck (gclk),
57                                        .d (cluster_cken),
58                                        .sd(1'b0),
59                                        .se(1'b0)
60                                        );
61   
62
63   bw_u1_scanl_2x sync_cluster_slave ( // use scan lock-up latch
64                                      .so (sync_enable),
65                                      .ck (gclk),
66                                      .sd (pre_sync_enable)
67                                      );
68   
69// NOTE! Pound delay in the below statement is meant to provide 10 ps
70// delay between gclk and rclk to allow the synchronizer for rst, dbginit,
71// and sync pulses to be modelled accurately.  gclk and rclk need to have
72// at least one simulator timestep separation to allow the flop->flop
73// synchronizer to work correctly.
74   reg      rclk_reg;
75   always @(gclk)  rclk_reg = #10 gclk;
76   assign rclk = rclk_reg;
77
78   synchronizer_asr rst_repeater (
79                                 .sync_out(cluster_grst_l),
80                                 .so(rst_sync_so),
81                                 .async_in(grst_l),
82                                 .gclk(gclk),
83                                 .rclk(rclk),
84                                 .arst_l(arst_l),
85                                 .si(si),
86                                 .se(se)
87                                 );
88   
89   synchronizer_asr dbginit_repeater (
90                                     .sync_out(dbginit_l),
91                                     .so(so),
92                                     .async_in(gdbginit_l),
93                                     .gclk(gclk),
94                                     .rclk(rclk),
95                                     .arst_l(adbginit_l),
96                                     .si(rst_sync_so),
97                                     .se(se)
98                                     );
99
100endmodule // cluster_header
Note: See TracBrowser for help on using the repository browser.