Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / niu_ram_s_4096x9.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: niu_ram_s_4096x9.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 ============================================
35
36/**********************************************************
37***********************************************************
38
39 Project : Niu
40
41 File name : niu_ram_s_4096x9.v
42
43 Module(s) name : niu_ram_s_4096x9
44
45 Parent modules :
46
47 Child modules :
48
49 Author's name : George Chu
50
51 Date : April. 2004
52
53 Description :
54
55 Synthesis Notes:
56
57 Modification History:
58 Date Description
59 ---- -----------
60
61************************************************************
62***********************************************************/
63
64`timescale 1ns/10ps
65
66module niu_ram_s_4096x9 (
67 reset,
68 tcu_aclk,
69 tcu_bclk,
70 tcu_scan_en,
71 tcu_se_scancollar_in,
72 tcu_se_scancollar_out,
73 tcu_array_wr_inhibit,
74 scan_in,
75 scan_out,
76 hdr_sram_rvalue,
77 hdr_sram_rid,
78 hdr_sram_wr_en,
79 hdr_sram_red_clr,
80 sram_hdr_read_data,
81 mbi_wdata,
82 mbi_rw_adr,
83 mbi_wr_en,
84 mbi_rd_en,
85 mbi_run,
86 data_inp,
87 addr_rw,
88 wt_enable,
89 cs_rd,
90 clk,
91 data_out
92 );
93
94parameter DATA_WIDTH_MINUS1 = 8;
95parameter ADDR_WIDTH_MINUS1 = 11;
96
97input reset; // if 1, reset the logic
98input tcu_aclk;
99input tcu_bclk;
100input tcu_scan_en;
101input tcu_se_scancollar_in;
102input tcu_se_scancollar_out;
103input tcu_array_wr_inhibit;
104input scan_in;
105output scan_out;
106
107input [5:0] hdr_sram_rvalue;
108input hdr_sram_rid;
109input hdr_sram_wr_en;
110input hdr_sram_red_clr;
111output [5:0] sram_hdr_read_data;
112
113input [DATA_WIDTH_MINUS1:0] mbi_wdata;
114input [ADDR_WIDTH_MINUS1:0] mbi_rw_adr;
115input mbi_wr_en;
116input mbi_rd_en;
117input mbi_run;
118
119input [DATA_WIDTH_MINUS1:0] data_inp; // data_input,
120input [ADDR_WIDTH_MINUS1:0] addr_rw; // read/write_address,
121input wt_enable; // write_enable, via port_B
122input cs_rd; // chip_selet_rd_port
123input clk;
124output [DATA_WIDTH_MINUS1:0] data_out; // data read out, via port_A
125
126wire [DATA_WIDTH_MINUS1:0] data_out;
127wire scan_out;
128
129wire [5:0] sram_hdr_read_data;
130
131wire [ADDR_WIDTH_MINUS1:0] mux_rw_adr;
132wire mux_wr_en;
133wire mux_rd_en;
134wire [DATA_WIDTH_MINUS1:0] mux_wdata;
135
136 assign mux_wdata = mbi_run ? mbi_wdata : data_inp;
137 assign mux_rw_adr = mbi_run ? mbi_rw_adr : addr_rw;
138 assign mux_wr_en = mbi_run ? mbi_wr_en : wt_enable;
139 assign mux_rd_en = mbi_run ? mbi_rd_en : cs_rd;
140
141 n2_niu_sp_4096x9s_cust ram_4096x9_0 (
142 .reset (reset),
143 .tcu_aclk (tcu_aclk),
144 .tcu_bclk (tcu_bclk),
145 .tcu_scan_en (tcu_scan_en),
146 .tcu_se_scancollar_in (tcu_se_scancollar_in),
147 .tcu_se_scancollar_out (tcu_se_scancollar_out),
148 .tcu_pce_ov (1'h1),
149 .pce (1'h1),
150 .tcu_array_wr_inhibit (tcu_array_wr_inhibit),
151 .scan_in (scan_in),
152 .scan_out (scan_out),
153 .hdr_sram_rvalue (hdr_sram_rvalue[5:0]),
154 .hdr_sram_rid (hdr_sram_rid),
155 .hdr_sram_wr_en (hdr_sram_wr_en),
156 .hdr_sram_red_clr (hdr_sram_red_clr),
157 .sram_hdr_read_data (sram_hdr_read_data[5:0]),
158 .rw_adr (mux_rw_adr[11:0]),
159 .wr_en (mux_wr_en),
160 .rd_en (mux_rd_en),
161 .din (mux_wdata[8:0]),
162 .dout (data_out[8:0]),
163 .l2clk (clk)
164 );
165
166endmodule