Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / design / sys / iop / niu / rtl / niu_smx_ff_regfl.v
CommitLineData
86530b38
AT
1// ========== Copyright Header Begin ==========================================
2//
3// OpenSPARC T2 Processor File: niu_smx_ff_regfl.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
36module niu_smx_ff_regfl(
37/*AUTOARG*/
38 // Outputs
39 full, empty, rdata,
40 // Inputs
41 clk, reset_l, wr, wdata, rd
42 );
43
44// synopsys template
45
46parameter DATA_WIDTH= 128;
47parameter ADDR_WIDTH= 4;
48
49// fifo if
50input clk;
51input reset_l;
52
53input wr;
54input [DATA_WIDTH-1:0] wdata;
55output full;
56
57input rd;
58output empty;
59output [DATA_WIDTH-1:0] rdata;
60
61wire [DATA_WIDTH-1:0] mwdata= wdata;
62wire [DATA_WIDTH-1:0] mrdata;
63wire [DATA_WIDTH-1:0] rdata= mrdata;
64wire [ADDR_WIDTH-1:0] mwaddr;
65wire [ADDR_WIDTH-1:0] mraddr;
66wire mwr;
67wire mrd;
68
69niu_smx_ff_ctrl #(ADDR_WIDTH) ctrl(
70 .clk (clk),
71 .reset_l (reset_l),
72 .wr (wr),
73 .rd (rd),
74 .full (full),
75 .empty (empty),
76 .mwr (mwr),
77 .mwaddr (mwaddr[ADDR_WIDTH-1:0]),
78 .mrd (mrd),
79 .mraddr (mraddr[ADDR_WIDTH-1:0])
80);
81
82
83niu_smx_regfl #(DATA_WIDTH,ADDR_WIDTH) regfl(
84 .clk (clk),
85 .reset_l (reset_l),
86 .wr (mwr),
87 .addr_wr (mwaddr[ADDR_WIDTH-1:0]),
88 .data_wr (mwdata[DATA_WIDTH-1:0]),
89 .rd (mrd),
90 .addr_rd (mraddr[ADDR_WIDTH-1:0]),
91 .data_rd (mrdata[DATA_WIDTH-1:0])
92);
93
94endmodule
95
96/*
97 // if need ram, need to explicitly specify
98module niu_smx_ff_66bx16(
99);
100
101parameter DATA_WIDTH= 128;
102parameter ADDR_WIDTH= 4;
103
104// fifo if
105input clk;
106input reset_l;
107
108input wr;
109input [DATA_WIDTH-1:0] wdata;
110output full;
111
112input rd;
113output empty;
114output [DATA_WIDTH-1:0]rdata;
115
116wire [DATA_WIDTH-1:0] mwdata= wdata;
117wire [DATA_WIDTH-1:0] mrdata;
118wire [DATA_WIDTH-1:0] rdata= mrdata;
119
120niu_smx_ff_ctrl #(DATA_WIDTH,ADDR_WIDTH) ctrl(
121 .clk (clk),
122 .reset_l (reset_l),
123 .wr (wr),
124 .rd (rd),
125 .full (full),
126 .empty (empty),
127 .mwr (mwr),
128 .mwaddr (mwaddr[ADDR_WIDTH-1:0]),
129 .mrd (mrd),
130 .mraddr (mraddr[ADDR_WIDTH-1:0])
131);
132
133
134niu_smx_regfl regfl(DATA_WIDTH,ADDR_WIDTH) regfl
135 .clk (clk),
136 .reset_l (reset_l),
137 .wr (mwr),
138 .addr_wr (mwaddr[ADDR_WIDTH-1:0]),
139 .data_wr (mwdata[DATA_WIDTH-1:0]),
140 .rd (mrd),
141 .addr_rd (mraddr[ADDR_WIDTH-1:0]),
142 .data_rd (mrdata[DATA_WIDTH-1:0])
143);
144
145endmodule
146*/