Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / dmu / rtl / dmu_pmu.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: dmu_pmu.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_pmu (
36 clk,
37 rst_l,
38
39 // Debug Ports
40 cr2pm_dbg_sel_a, // PMU debug select a
41 pm2cr_dbg_a, // PMU debug output a
42 cr2pm_dbg_sel_b, // PMU debug select b
43 pm2cr_dbg_b, // PMU debug output b
44
45 cm2pm_rcd_enq,
46 cm2pm_rcd,
47 pm2cm_rcd_full,
48 pm2cl_rcd_enq,
49 pm2cl_rcd,
50 cl2pm_rcd_full,
51 pm2ps_i_req,
52 ps2pm_i_gnt,
53 pm2ps_i_trn,
54 ps2pm_i_n_trn,
55 pm2ps_i_cmd_type,
56 ps2pm_i_full,
57 pm2ps_i_wr_data,
58 ps2pm_i_rd_data
59 );
60
61//************************************************
62// PARAMETERS
63//************************************************
64
65// parameter CM2PM_WDTH = `FIRE_DLC_IPR_REC_WDTH, //92
66// PM2CL_WDTH = `FIRE_DLC_ICR_REC_WDTH, //59
67
68 parameter PM2PS_RCDWDTH = 41,
69 PSCMDTYPE_WDTH = 4,
70 PSITRN_WDTH = 5,
71//BP n2 5-24-04
72// PSRDWDTH = 6,
73 PSRDWDTH = 7,
74 PSCMDTRN_WDTH = 5;
75
76 parameter IPRMSB = `FIRE_DLC_IPR_MSB, // CM2PM_WDTH -1,
77 ICRMSB = `FIRE_DLC_ICR_MSB, // PM2CL_WDTH -1,
78 PSRCDMSB = PM2PS_RCDWDTH -1,
79 PSCMDTYPMSB = PSCMDTYPE_WDTH -1,
80 PSITRNMSB = PSITRN_WDTH -1,
81 PSRDMSB = PSRDWDTH -1,
82 PSCMDTRNMSB = PSCMDTRN_WDTH -1;
83
84
85//************************************************
86// PORTS
87//************************************************
88
89 input clk; // The input clock
90 input rst_l; // The fifo rst_l
91
92 input cm2pm_rcd_enq; // enqueue to packet record queue
93 input [IPRMSB :0] cm2pm_rcd; // packet record in
94 output pm2cm_rcd_full; // packet record full flag
95
96 output pm2cl_rcd_enq; // enqueue to output command record
97 output [ICRMSB :0] pm2cl_rcd; // command record out
98 input cl2pm_rcd_full; // CLU record fifo full
99
100 output [PSITRNMSB :0] pm2ps_i_trn;
101
102 output pm2ps_i_req; // PSB request
103 input ps2pm_i_gnt; // PSB grant to request
104 input [PSCMDTRNMSB : 0] ps2pm_i_n_trn; // returned transaction number
105 output [PSCMDTYPMSB : 0] pm2ps_i_cmd_type; // command for PSB to run
106 input ps2pm_i_full; // PSB is full
107 output [PSRCDMSB :0] pm2ps_i_wr_data; // data put on PSB
108
109 input [PSRDMSB :0] ps2pm_i_rd_data;
110
111// Debug Ports
112 input [`FIRE_DLC_PMU_DS_BITS] cr2pm_dbg_sel_a; // PMU debug select a
113 input [`FIRE_DLC_PMU_DS_BITS] cr2pm_dbg_sel_b; // PMU debug select b
114
115 output [`FIRE_DBG_DATA_BITS] pm2cr_dbg_a; // PMU debug output a
116 output [`FIRE_DBG_DATA_BITS] pm2cr_dbg_b; // PMU debug output b
117
118//************************************************
119// SIGNALS
120//************************************************
121
122 wire clk;
123 wire rst_l;
124 wire pm2cm_rcd_full;
125 wire cl2pm_rcd_full;
126 wire cm2pm_rcd_enq;
127 wire pm2cl_rcd_enq;
128
129 wire pm2ps_i_req;
130 wire ps2pm_i_gnt;
131 wire [PSITRNMSB :0] pm2ps_i_trn;
132 wire [PSCMDTRNMSB : 0] ps2pm_i_n_trn;
133 wire [PSCMDTYPMSB : 0] pm2ps_i_cmd_type;
134 wire ps2pm_i_full;
135 wire [PSRCDMSB : 0] pm2ps_i_wr_data;
136 wire [PSRDMSB :0] ps2pm_i_rd_data;
137
138// Debug
139 wire [`FIRE_DLC_PMU_DS_BITS] cr2pm_dbg_sel_a; // PMU debug select a
140 wire [`FIRE_DLC_PMU_DS_BITS] cr2pm_dbg_sel_b; // PMU debug select b
141 wire [`FIRE_DBG_DATA_BITS] pm2cr_dbg_a; // PMU debug output a
142 wire [`FIRE_DBG_DATA_BITS] pm2cr_dbg_b; // PMU debug output b
143
144//************************************************
145// MODULES
146//************************************************
147
148dmu_pmu_prm prm (
149 .clk (clk),
150 .rst_l (rst_l),
151
152// // Debug
153 .cr2pm_dbg_sel_a (cr2pm_dbg_sel_a),
154 .cr2pm_dbg_sel_b (cr2pm_dbg_sel_b),
155 .pm2cr_dbg_a (pm2cr_dbg_a),
156 .pm2cr_dbg_b (pm2cr_dbg_b),
157
158 .cm2pm_rcd_enq (cm2pm_rcd_enq),
159 .cm2pm_rcd(cm2pm_rcd),
160 .pm2cm_rcd_full (pm2cm_rcd_full),
161 .pm2cl_rcd_enq (pm2cl_rcd_enq),
162 .pm2cl_rcd (pm2cl_rcd),
163 .cl2pm_rcd_full (cl2pm_rcd_full),
164 .pm2ps_i_req(pm2ps_i_req),
165 .ps2pm_i_gnt(ps2pm_i_gnt),
166 .pm2ps_i_trn(pm2ps_i_trn),
167 .ps2pm_i_n_trn(ps2pm_i_n_trn),
168 .pm2ps_i_cmd_type(pm2ps_i_cmd_type),
169 .ps2pm_i_full(ps2pm_i_full),
170 .pm2ps_i_wr_data(pm2ps_i_wr_data),
171 .ps2pm_i_rd_data(ps2pm_i_rd_data)
172 );
173
174endmodule
175
176