Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / dmu / rtl / dmu_dou_epr.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: dmu_dou_epr.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_dou_epr
36 (
37 // Control Signals
38 l2clk,
39 clk,
40 scan_in,
41 tcu_array_bypass,
42 tcu_se_scancollar_in,
43 tcu_se_scancollar_out,
44 tcu_array_wr_inhibit,
45 tcu_pce_ov,
46 tcu_aclk,
47 tcu_bclk,
48 scan_out,
49
50
51 // CLU's CRM - DOU's PIO Interface
52 cl2do_pio_wr,
53 cl2do_pio_addr,
54 cl2do_pio_data,
55 cl2do_pio_dpar,
56
57 // ILU's EIL - DOU EPR Interface
58 // ILU's EIL - DOU
59 y2epr_addr,
60
61 // EDR - Mux
62 epr2mux_pio_data_out,
63
64 dmu_mb0_run,
65 dmu_mb0_addr,
66 dmu_mb0_wdata,
67 dmu_mb0_dou_pio_data_wr_en,
68 dmu_mb0_dou_pio_data_rd_en
69
70 );
71
72 //////////////////////////////////////////////////////////////////////
73 //************************* Parameters *************************
74 //////////////////////////////////////////////////////////////////////
75
76 parameter MEM_WIDTH = `FIRE_DLC_ERD_DATA_WDTH+`FIRE_DLC_ERD_DPAR_WDTH;
77 parameter MEM_TIEHIGH = 1'b1;
78// parameter MEM_TIELOW = 1'b0;
79
80
81 //////////////////////////////////////////////////////////////////////
82 //************************* Port Declarations *******************
83 //////////////////////////////////////////////////////////////////////
84
85 // Control signals
86
87 input l2clk;
88 input clk;
89 input scan_in;
90 input tcu_array_bypass;
91 input tcu_se_scancollar_in;
92 input tcu_se_scancollar_out;
93 input tcu_array_wr_inhibit;
94 input tcu_pce_ov;
95 input tcu_aclk;
96 input tcu_bclk;
97 output scan_out;
98
99 // CLU's CRM - DOU's EPR PIO Interface
100 input cl2do_pio_wr;
101 input [`FIRE_DLC_CPD_ADDR_WDTH-1:0] cl2do_pio_addr; // Address width, to address 64 entries PIO
102 input [`FIRE_DLC_CPD_DATA_WDTH-1:0] cl2do_pio_data; // Data width, 16 bytes
103 input [`FIRE_DLC_CPD_DPAR_WDTH-1:0] cl2do_pio_dpar; // Parity width 32 bit parity on data
104
105 // ILU's EIL - DOU Interface
106 input [`FIRE_DLC_ERD_ADDR_WDTH-3:0] y2epr_addr; // Address width, to address 128 entries DMA / 64 entries PIO
107
108 // DOU's EPR - Mux
109 output [MEM_WIDTH-1:0] epr2mux_pio_data_out; // RAM data output
110
111 // MBIST signals
112 input dmu_mb0_run;
113
114 input [3:0] dmu_mb0_addr;
115 input [7:0] dmu_mb0_wdata;
116 input dmu_mb0_dou_pio_data_wr_en;
117 input dmu_mb0_dou_pio_data_rd_en;
118
119 //////////////////////////////////////////////////////////////////////
120 //*************** Submodule Instantiations ***********************
121 //////////////////////////////////////////////////////////////////////
122/*
123 fire_dlc_ram64x132_211hd4 ram64x132_211hd4
124 (
125 // address ports
126 .aadr (y2epr_addr),
127 .badr (cl2do_pio_addr),
128
129 // clock ports
130 .clka (l2clk),
131 .clkb (l2clk),
132
133 // data input ports
134 .dib ({cl2do_pio_dpar, cl2do_pio_data}),
135
136 // data output ports
137 .doa (epr2mux_pio_data_out),
138
139 // port enables
140 .ena (MEM_TIEHIGH),
141 .enb (MEM_TIEHIGH),
142
143 // write enables
144 .web (cl2do_pio_wr)
145 );
146*/
147//BP n2 6-17-04 new ram model
148//BP n2 7-20-04 new ram model from ram compiler
149//BP n2 9-22-04
150// note that {cl2do_pio_dpar, cl2do_pio_data} come directly from flops in clu
151
152wire [MEM_WIDTH-1:0] pio_data_out;
153assign epr2mux_pio_data_out = tcu_array_bypass ? {cl2do_pio_dpar, cl2do_pio_data} : pio_data_out ;
154
155
156//SV 02/24/05 added BIST logic
157 wire [131:0] din_ram ;
158 wire [3:0] rd_addr_ram, wr_addr_ram ;
159 wire wr_en_ram, rd_en_ram ;
160
161 assign din_ram = dmu_mb0_run ? ({dmu_mb0_wdata[3:0],{16{dmu_mb0_wdata}}}) : ({cl2do_pio_dpar, cl2do_pio_data}) ;
162 assign rd_addr_ram = dmu_mb0_run ? dmu_mb0_addr[3:0] : y2epr_addr[3:0] ;
163 assign wr_addr_ram = dmu_mb0_run ? dmu_mb0_addr[3:0] : cl2do_pio_addr[3:0] ;
164 assign wr_en_ram = dmu_mb0_run ? dmu_mb0_dou_pio_data_wr_en : cl2do_pio_wr ;
165 assign rd_en_ram = dmu_mb0_run ? dmu_mb0_dou_pio_data_rd_en : MEM_TIEHIGH ;
166
167 /* 0in memory_access -read_addr y2epr_addr[3:0] -read (y2epr_addr[3:0] != cl2do_pio_addr[3:0])
168 -write_addr cl2do_pio_addr[3:0]
169 -latency 1 -write cl2do_pio_wr
170 -read_data pio_data_out -write_data ({cl2do_pio_dpar, cl2do_pio_data}) -group mbist_mode */
171
172 n2_com_dp_16x132s_cust dou_pio_ram16x132
173 (
174 // address ports
175 .rd_adr (rd_addr_ram),
176 .wr_adr (wr_addr_ram),
177
178 // clock ports
179 .rdclk (l2clk),
180 .wrclk (l2clk),
181
182 // data input ports
183 .din (din_ram),
184
185 // data output ports
186 .dout (pio_data_out),
187
188 // port enables
189 .rd_en (rd_en_ram),
190
191 // write enables
192 .wr_en (wr_en_ram),
193
194 // scan ports
195 .scan_in (scan_in),
196 .tcu_se_scancollar_in (tcu_se_scancollar_in),
197 .tcu_array_wr_inhibit (tcu_array_wr_inhibit),
198 .tcu_pce_ov (tcu_pce_ov),
199 .rd_pce (1'b1),
200 .wr_pce (1'b1),
201 .bist_clk_mux_sel (1'b0),
202 .tcu_aclk (tcu_aclk),
203 .tcu_bclk (tcu_bclk),
204 .scan_out (scan_out)
205 );
206
207
208endmodule // dmu_dou_epr
209