Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / niu_ram_64x74.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: niu_ram_64x74.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_64x74.v
42
43 Module(s) name : niu_ram_64x74
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_64x74 (
67 tcu_pce_ov,
68 tcu_aclk,
69 tcu_bclk,
70 tcu_se_scancollar_in,
71 tcu_se_scancollar_out,
72 tcu_clk_stop,
73 tcu_array_wr_inhibit,
74 scan_in,
75 scan_out,
76 mbi_wdata,
77 mbi_rd_adr,
78 mbi_wr_adr,
79 mbi_wr_en,
80 mbi_rd_en,
81 mbi_run,
82 data_inp,
83 addr_rd,
84 addr_wt,
85 wt_enable,
86 cs_rd,
87 clk,
88 data_out
89 );
90
91parameter DATA_WIDTH_MINUS1 = 73;
92parameter ADDR_WIDTH_MINUS1 = 5;
93
94input tcu_pce_ov;
95input tcu_aclk;
96input tcu_bclk;
97input tcu_se_scancollar_in;
98input tcu_se_scancollar_out;
99input tcu_clk_stop;
100input tcu_array_wr_inhibit;
101input scan_in;
102output scan_out;
103
104input [DATA_WIDTH_MINUS1:0] mbi_wdata;
105input [ADDR_WIDTH_MINUS1:0] mbi_rd_adr;
106input [ADDR_WIDTH_MINUS1:0] mbi_wr_adr;
107input mbi_wr_en;
108input mbi_rd_en;
109input mbi_run;
110
111input [DATA_WIDTH_MINUS1:0] data_inp; // data_input, via port_B
112input [ADDR_WIDTH_MINUS1:0] addr_rd; // read_address, via port_A
113input [ADDR_WIDTH_MINUS1:0] addr_wt; // write_address, via port_B
114input wt_enable; // write_enable, via port_B
115input cs_rd; // chip_selet_rd_port, i.e., port_A
116input clk;
117output [DATA_WIDTH_MINUS1:0] data_out; // data read out, via port_A
118
119wire [DATA_WIDTH_MINUS1:0] data_out;
120wire scan_out;
121
122wire [ADDR_WIDTH_MINUS1:0] mux_wr_adr;
123wire mux_wr_en;
124wire [ADDR_WIDTH_MINUS1:0] mux_rd_adr;
125wire mux_rd_en;
126wire [DATA_WIDTH_MINUS1:0] mux_wdata;
127
128 assign mux_wdata = mbi_run ? mbi_wdata : data_inp;
129 assign mux_rd_adr = mbi_run ? mbi_rd_adr : addr_rd;
130 assign mux_wr_adr = mbi_run ? mbi_wr_adr : addr_wt;
131 assign mux_wr_en = mbi_run ? mbi_wr_en : wt_enable;
132 assign mux_rd_en = mbi_run ? mbi_rd_en : cs_rd;
133
134 n2_com_dp_64x74s_cust ram_64x74_0 (
135 .tcu_pce_ov (tcu_pce_ov),
136 .tcu_aclk (tcu_aclk),
137 .tcu_bclk (tcu_bclk),
138 .tcu_se_scancollar_in (tcu_se_scancollar_in),
139 .tcu_se_scancollar_out (tcu_se_scancollar_out),
140 .tcu_clk_stop (tcu_clk_stop),
141 .tcu_array_wr_inhibit (tcu_array_wr_inhibit),
142 .scan_in (scan_in),
143 .scan_out (scan_out),
144 .wr_adr (mux_wr_adr[5:0]),
145 .wr_en (mux_wr_en),
146 .rd_adr (mux_rd_adr[5:0]),
147 .rd_en (mux_rd_en),
148 .din (mux_wdata[73:0]),
149 .dout (data_out[73:0]),
150 .rdclk (clk),
151 .wrclk (clk)
152 );
153
154endmodule