OpenCores
URL https://opencores.org/ocsvn/embedded_risc/embedded_risc/trunk

Subversion Repositories embedded_risc

[/] [embedded_risc/] [trunk/] [Verilog/] [data_port.v] - Blame information for rev 27

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 hosseinami
/*********************************************************
2
 MODULE:                Sub Level SDRAM Controller Data Port Block
3
 
4
 FILE NAME:     data_port.v
5
 VERSION:       1.0
6
 DATE:          April 8nd, 2002
7
 AUTHOR:                Hossein Amidi
8
 COMPANY:
9
 CODE TYPE:     Register Transfer Level
10
 
11
 DESCRIPTION:   This module is the sub level RTL code of SDRAM Controller ASIC verilog
12
 code. It is the Data Port block.
13
 
14
  It will instantiate the following blocks in the ASIC:
15
 
16
 1)   Data input register
17
 2)     SDRAM control signals
18
 3)     SDRAM Data port
19
 4)     SDRAM Data port Multiplexor
20
 
21
 Hossein Amidi
22
 (C) April 2002
23
 
24
*********************************************************/
25
 
26
// DEFINES
27
`timescale 1ns / 10ps
28
 
29
module data_port(// Input
30
                                                reset,
31
                                                clk0,
32
                                                clk0_2x,
33
                                                dm,
34
                                                oe,
35
                                                datain,
36
                                                wsadd,
37
                                                wba,
38
                                                wcs,
39
                                                wcke,
40
                                                wras,
41
                                                wcas,
42
                                                wwe,
43
                                                // Out
44
                                                dqm,
45
                                                dataout,
46
                                                add,
47
                                                ba,
48
                                                cs,
49
                                                cke,
50
                                                ras,
51
                                                cas,
52
                                                we,
53
                                                // Inout
54
                                                dq
55
                                                );
56
 
57
 
58
// Parameter
59
`include        "parameter.v"
60
 
61
// Input
62
input reset;
63
input clk0;
64
input clk0_2x;
65
input [dqm_size - 1 : 0]dm;
66
input oe;
67
input [data_size - 1 : 0]datain;
68
input [add_size - 1 : 0]wsadd;
69
input [ba_size - 1 : 0]wba;
70
input [cs_size - 1 : 0]wcs;
71
input wcke;
72
input wras;
73
input wcas;
74
input wwe;
75
 
76
// Output
77
output [dqm_size - 1 : 0]dqm;
78
output [data_size - 1 : 0]dataout;
79
output [add_size - 1 : 0]add;
80
output [ba_size - 1 : 0]ba;
81
output [cs_size - 1 : 0]cs;
82
output cke;
83
output ras;
84
output cas;
85
output we;
86
 
87
// Inout
88
inout [data_size - 1 : 0]dq;
89
 
90
// Internal wires and reg
91
wire reset;
92
wire clk0;
93
wire [dqm_size - 1 : 0]dm;
94
wire [data_size - 1 : 0]datain;
95
wire [dqm_size - 1 : 0]dqm;
96
wire [data_size - 1 : 0]datain2;
97
 
98
wire [add_size - 1 : 0]wsadd;
99
wire [ba_size - 1 : 0]wba;
100
wire [cs_size - 1 : 0]wcs;
101
wire wcke;
102
wire wras;
103
wire wcas;
104
wire wwe;
105
wire [data_size - 1 : 0]wsdram_in;
106
 
107
wire [add_size - 1 : 0]add;
108
wire [ba_size - 1 : 0]ba;
109
wire [cs_size - 1 : 0]cs;
110
wire cke;
111
wire ras;
112
wire cas;
113
wire we;
114
wire [data_size - 1 : 0]dataout;
115
 
116
wire clk0_2x;
117
wire oe;
118
wire [data_size - 1 : 0]dq;
119
wire [data_size - 1 : 0]sdram_in;
120
wire [data_size - 1 : 0]sdram_out;
121
 
122
 
123
// Assignment
124
 
125
 
126
/***************************** Sub Level Instantiation ********************************/
127
 
128
 
129
data_in_reg data_in_reg0(// Input
130
                                                                .reset(reset),
131
                                                                .clk0(clk0),
132
                                                                .dm(dm),
133
                                                                .datain(datain),
134
                                                                // Output
135
                                                                .dqm(dqm),
136
                                                                .datain2(datain2)
137
                                                                );
138
 
139
sdram_cntrl sdram_cntrl0(// Input
140
                                                                .reset(reset),
141
                                                                .clk0(clk0),
142
                                                                .wsadd(wsadd),
143
                                                                .wba(wba),
144
                                                                .wcs(wcs),
145
                                                                .wcke(wcke),
146
                                                                .wras(wras),
147
                                                                .wcas(wcas),
148
                                                                .wwe(wwe),
149
                                                                .sdram_in(sdram_in),
150
                                                                // Output
151
                                                                .add(add),
152
                                                                .ba(ba),
153
                                                                .cs(cs),
154
                                                                .cke(cke),
155
                                                                .ras(ras),
156
                                                                .cas(cas),
157
                                                                .we(we),
158
                                                                .dataout(dataout)
159
                                                                );
160
 
161
 
162
sdram_port sdram_port0( // Input
163
                                                                .reset(reset),
164
                                                                .clk0_2x(clk0_2x),
165
                                                                .oe(oe),
166
                                                                .datain2(datain2),
167
                                                                .dq(dq),
168
                                                                // Output
169
                                                                .sdram_in(sdram_in),
170
                                                                .sdram_out(sdram_out)
171
                                                                );
172
 
173
sdram_mux sdram_mux0(// Input
174
                                                        .sdram_out(sdram_out),
175
                                                        .oe(oe),
176
                                                        // Output
177
                                                        .dq(dq)
178
                                                        );
179
 
180
 
181
endmodule

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.