Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / dmu / rtl / dmu_imu_rss.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: dmu_imu_rss.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 dmu_imu_rss (
36
37 // Clock and Reset
38
39 clk,
40 rst_l,
41
42 // Inputs from RMU block
43
44 rm2im_rply,
45 rm2im_rply_enq,
46
47 // Outputs to GCS state Sub-block
48
49 rss2gcs_rply,
50 rss2gcs_id,
51 rss2gcs_valid,
52
53
54 // Debug Ports
55
56 rss2dbg_dbg_a,
57 rss2dbg_dbg_b,
58
59 //Perf Counters
60
61 rss2ics_perf_mondo_nacks
62
63
64 );
65
66
67//############################################################################
68// PORT DECLARATIONS
69//############################################################################
70
71
72 //------------------------------------------------------------------------
73 // Clock and Reset Signals
74 //------------------------------------------------------------------------
75 input clk;
76 input rst_l;
77
78 //------------------------------------------------------------------------
79 // Input Signals from RRM Block Signals
80 //------------------------------------------------------------------------
81
82 input rm2im_rply_enq; // Enqueue Signal from RRM
83 input [`FIRE_DLC_MRR_REC_WDTH-1:0] rm2im_rply; // 1:0 - group id 2: ACK/NACK 0 = NACK 1= ACK
84
85 //-----------------------------------------------------
86 // Interface for Group Controller Arbiter
87 //-----------------------------------------------------
88
89 output rss2gcs_rply; // Reply type from RSS ack =1 nack =0
90 output [`FIRE_DLC_MRR_TAG_WDTH-1:0] rss2gcs_id; // Group controller ID for response
91 output rss2gcs_valid; // Valid signal to validate respose
92
93 //------------------------------------------------------------------------
94 // Debug Ports
95 //------------------------------------------------------------------------
96 output [`FIRE_DEBUG_WDTH-1:0] rss2dbg_dbg_a;
97 output [`FIRE_DEBUG_WDTH-1:0] rss2dbg_dbg_b;
98
99 //------------------------------------------------------------------------
100 // Perf Counters
101 //------------------------------------------------------------------------
102 output rss2ics_perf_mondo_nacks;
103
104//############################################################################
105// SIGNAL DECLARATIONS
106//############################################################################
107 //**************************************************
108 // Wires
109 //**************************************************
110
111 wire [`FIRE_DEBUG_WDTH-1:0] n_dbg_a;
112 wire [`FIRE_DEBUG_WDTH-1:0] n_dbg_b;
113
114
115 //**************************************************
116 // Registers that Are Flops
117 //**************************************************
118 reg [`FIRE_DEBUG_WDTH-1:0] dbg_a;
119 reg [`FIRE_DEBUG_WDTH-1:0] dbg_b;
120
121 reg rss2gcs_rply; // Reply type from RSS ack =1 nack =0
122 reg [`FIRE_DLC_MRR_TAG_WDTH-1:0] rss2gcs_id; // Group controller ID for response
123 reg rss2gcs_valid; // Valid signal to validate respose
124
125//############################################################################
126// ZERO IN CHECKERS
127//############################################################################
128
129
130
131//############################################################################
132// SEQUENTIAL LOGIC
133//############################################################################
134
135 //**************************************************
136 // Register the inputs from, the RRM and send them
137 // The the group controller sub-block
138 //**************************************************
139
140
141always @ (posedge clk)
142 if (!rst_l)
143 begin
144 rss2gcs_valid <= 1'b0;
145 rss2gcs_rply <= 1'b0;
146 rss2gcs_id <= 2'b0;
147 end
148 else
149 begin
150 rss2gcs_valid <= rm2im_rply_enq;
151 rss2gcs_rply <= rm2im_rply[`FIRE_DLC_MRR_ACK_MSB];
152 rss2gcs_id <= rm2im_rply[`FIRE_DLC_MRR_TAG_MSB:`FIRE_DLC_MRR_TAG_LSB];
153 end
154
155
156
157//-----------------------------------------------------
158// Debug Ports
159//-----------------------------------------------------
160
161assign n_dbg_a = {4'h0, rss2gcs_valid, rss2gcs_rply, rss2gcs_id};
162assign n_dbg_b = {4'h0, rss2gcs_valid, rss2gcs_rply, rss2gcs_id};
163
164
165always @ (posedge clk)
166 begin
167 if (!rst_l) begin
168 dbg_a <= 8'b0;
169 dbg_b <= 8'b0;
170 end
171 else begin
172 dbg_a <= n_dbg_a;
173 dbg_b <= n_dbg_b;
174 end
175 end
176
177
178assign rss2dbg_dbg_a = dbg_a;
179assign rss2dbg_dbg_b = dbg_b;
180
181
182//-----------------------------------------------------
183// Performace Counters
184//-----------------------------------------------------
185
186assign rss2ics_perf_mondo_nacks = rm2im_rply_enq & ~rm2im_rply[`FIRE_DLC_MRR_ACK_MSB];
187
188endmodule
189
190
191
192
193