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

Subversion Repositories ddr3_sdram

[/] [ddr3_sdram/] [trunk/] [top.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 eschabor
/*
2
        MicroBlaze MCS to DDR3 glue
3
        (C) Copyright 2012 Silicon On Inspiration
4
        www.sioi.com.au
5
        86 Longueville Road
6
        Lane Cove 2066
7
        New South Wales
8
        AUSTRALIA
9
 
10
    This program is free software: you can redistribute it and/or modify
11
    it under the terms of the GNU Lesser General Public License as published by
12
    the Free Software Foundation, either version 3 of the License, or
13
    (at your option) any later version.
14
 
15
    This program is distributed in the hope that it will be useful,
16
    but WITHOUT ANY WARRANTY; without even the implied warranty of
17
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
    GNU Lesser General Public License for more details.
19
 
20
    You should have received a copy of the GNU Lesser General Public License
21
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
*/
23
 
24
`timescale 1ns / 1ps
25
 
26
module top
27
(
28
        input           mck62M5,
29
    output      [1:0]    mled,
30
    input       [1:0]    mbtn,
31
    output                      txd,
32
    input                       rxd,
33
 
34
        inout   [63:0]   ddq,
35
        inout   [7:0]    dqsp,
36
        inout   [7:0]    dqsn,
37
        output  [7:0]    ddm,
38
        output  [15:0]   da,
39
        output  [2:0]    dba,
40
        output  [2:0]    dcmd,
41
        output  [1:0]    dce,
42
        output  [1:0]    dcs,
43
        output  [1:0]    dckp,
44
        output  [1:0]    dckn,
45
        output  [1:0]    dodt
46
);
47
 
48
    wire                        Reset;
49
    wire                        IO_Ready;
50
    wire                        IO_Addr_Strobe;
51
    wire                        IO_Read_Strobe;
52
    wire                        IO_Write_Strobe;
53
    wire [31 : 0]        IO_Read_Data;
54
    wire [1 : 0]         GPI1;
55
    wire [31 : 0]        IO_Address;
56
    wire [3 : 0]         IO_Byte_Enable;
57
    wire [31 : 0]        IO_Write_Data;
58
    wire [1 : 0]         GPO1;
59
    wire [3 : 0]         page;
60
 
61
    wire                        srd;
62
    wire                        swr;
63
    wire [33:5]         sa;
64
    wire [255:0] swdat;
65
    wire [31:0]          smsk;
66
    wire [255:0] srdat;
67
    wire                        srdy;
68
 
69
    wire                        ck150;
70
    wire                        ck75;
71
 
72
        wire [0 : 31]    Trace_Instruction;
73
        wire [0 : 31]    Trace_PC;
74
        wire [0 : 4]     Trace_Reg_Addr;
75
        wire [0 : 14]    Trace_MSR_Reg;
76
        wire [0 : 31]    Trace_New_Reg_Value;
77
        wire [0 : 31]    Trace_Data_Address;
78
        wire [0 : 31]    Trace_Data_Write_Value;
79
        wire [0 : 3]     Trace_Data_Byte_Enable;
80
 
81
        wire [2:0]               dbg_out;
82
        wire [7:0]               dbg_in;
83
 
84
    drac_ddr3 drac
85
    (
86
        .ckin                           (mck62M5),
87
        .ckout                          (ck150),
88
        .ckouthalf                      (ck75),
89
                .reset                          (Reset),
90
 
91
                .ddq                            (ddq),
92
                .dqsp                           (dqsp),
93
                .dqsn                           (dqsn),
94
                .ddm                            (ddm),
95
                .da                                     (da),
96
                .dba                            (dba),
97
                .dcmd                           (dcmd),
98
                .dce                            (dce),
99
                .dcs                            (dcs),
100
                .dckp                           (dckp),
101
                .dckn                           (dckn),
102
                .dodt                           (dodt),
103
 
104
                .srd                            (srd),
105
                .swr                            (swr),
106
                .sa                                     (sa),
107
                .swdat                          (swdat),
108
                .smsk                           (smsk),
109
                .srdat                          (srdat),
110
                .srdy                           (srdy),
111
 
112
                .dbg_out                        (dbg_out),
113
                .dbg_in                         (dbg_in)
114
    );
115
 
116
        adapter glue
117
        (
118
                .ckmb                           (ck75),
119
                .ckdr                           (ck150),
120
                .reset                          (Reset),
121
 
122
                .srd                            (srd),
123
                .swr                            (swr),
124
                .sa                                     (sa),
125
                .swdat                          (swdat),
126
                .smsk                           (smsk),
127
                .srdat                          (srdat),
128
                .srdy                           (srdy),
129
 
130
                .IO_Ready                       (IO_Ready),
131
                .IO_Addr_Strobe         (IO_Addr_Strobe),
132
                .IO_Read_Strobe         (IO_Read_Strobe),
133
                .IO_Write_Strobe        (IO_Write_Strobe),
134
                .IO_Read_Data           (IO_Read_Data),
135
                .IO_Address                     (IO_Address),
136
                .IO_Byte_Enable         (IO_Byte_Enable),
137
                .IO_Write_Data          (IO_Write_Data),
138
                .page                           (page),
139
                .dbg_out                        (dbg_out)
140
        );
141
 
142
    microblaze_mcs_v1_1 mcs_0
143
    (
144
                .Clk                                    (ck75),
145
                .Reset                                  (Reset),
146
                .IO_Ready                               (IO_Ready),
147
                .UART_Rx                                (rxd),
148
                .IO_Addr_Strobe                 (IO_Addr_Strobe),
149
                .IO_Read_Strobe                 (IO_Read_Strobe),
150
                .IO_Write_Strobe                (IO_Write_Strobe),
151
                .UART_Tx                                (txdraw),
152
                .IO_Read_Data                   (IO_Read_Data),
153
                .GPI1                                   (mbtn),
154
                .GPI2                                   (dbg_in),
155
                .IO_Address                             (IO_Address),
156
                .IO_Byte_Enable                 (IO_Byte_Enable),
157
                .IO_Write_Data                  (IO_Write_Data),
158
                .GPO1                                   (mled),
159
                .GPO2                                   (page),
160
                .GPO3                                   (dbg_out),
161
                .Trace_Instruction              (Trace_Instruction),            // Opcode
162
                .Trace_Valid_Instr              (Trace_Valid_Instr),            // valid opcode y/n
163
                .Trace_PC                               (Trace_PC),                             // PC
164
                .Trace_Reg_Write                (Trace_Reg_Write),                      // output Trace_Reg_Write
165
                .Trace_Reg_Addr                 (Trace_Reg_Addr),                       // output [0 : 4] Trace_Reg_Addr
166
                .Trace_MSR_Reg                  (Trace_MSR_Reg),                        // output [0 : 14] Trace_MSR_Reg
167
                .Trace_New_Reg_Value    (Trace_New_Reg_Value),          // output [0 : 31] Trace_New_Reg_Value
168
                .Trace_Jump_Taken               (Trace_Jump_Taken),             // Jump Taken
169
                .Trace_Delay_Slot               (Trace_Delay_Slot),             // Delay Slot
170
                .Trace_Data_Address             (Trace_Data_Address),           // Data Address
171
                .Trace_Data_Access              (Trace_Data_Access),            // Data_Access y/n
172
                .Trace_Data_Read                (Trace_Data_Read),                      // Data Read y/n
173
                .Trace_Data_Write               (Trace_Data_Write),             // Data Write y/n
174
                .Trace_Data_Write_Value (Trace_Data_Write_Value),       // Data Write Value
175
                .Trace_Data_Byte_Enable (Trace_Data_Byte_Enable),       // Data Byte Enables
176
                .Trace_MB_Halted                (Trace_MB_Halted)                       // Halted
177
        );
178
 
179
assign txd = ~txdraw;
180
 
181
endmodule
182
 

powered by: WebSVN 2.1.0

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