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

Subversion Repositories ddr2_sdram

[/] [ddr2_sdram/] [trunk/] [DDR2_readme.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 john_fpga
==============================================
2
Project :       Prj_12_DDR2
3
Purpose :       DDR2-SDRAM at a Spartan-3A Board
4
DDR2-RAM :      MT47H32M16 (64 MByte)
5
Date :          19.08.2011
6
Version :       7.0
7
Plattform :     XILINX Spartan-3A
8
FPGA :          XC3S700A-FGG484
9
Language :      VHDL
10
ISE :           ISE-Design-Suite V:13.1
11
IP-Core :       MIG V:3.6.1
12
Author :        UB
13
Mail :          Becker_U(at)gmx.de
14
==============================================
15
 
16
 
17
first word :
18
================
19
 
20
> sorry for my bad english :-)
21
 
22
 
23
 
24
Moduls :
25
==================
26
 
27
   ###############         #########################    ################
28
   #             #         #                       #    #              #
29
   #  DDR2-RAM : #---------#  TOP_Modul_VHDL       #----# Buttons_VHDL #
30
   #  512 MBit   #         #                       #    #              #
31
   #             #         #                       #    ################
32
   ###############         #                       #
33
                           #                       #    ################
34
                           #                       #    #              #
35
                           #                       #----# Clock_VHDL   #
36
                           #                       #    #              #
37
                           #                       #    ################
38
                           #                       #
39
   ###############         #                       #    #####################    ###################
40
   #             #         #                       #    #                   #    #                 #
41
   #  Input :    #         #                       #    # DDR2_Control_VHDL #----# DDR2_READ_VHDL  #
42
   #  4 buttons  #---------#                       #    #                   #    #                 #
43
   #  4 switches #         #                       #----#                   #    ###################
44
   #             #         #                       #    #                   #
45
   ###############         #                       #    #                   #    ###################
46
                           #                       #    #                   #    #                 #
47
   ###################     #                       #    #                   #----# DDR2_Write_VHDL #
48
   #                 #     #                       #    #                   #    #                 #
49
   #  Output :       #-----#                       #    #                   #    ###################
50
   #  8 LEDs (Data)  #     #                       #    #####################
51
   #  1 LED (Status) #     #                       #
52
   ###################     #                       #    #######################
53
                           #                       #----#                     #
54
   ###############         #                       #    # DDR2_RAM_CORE.vhd   #
55
   #  Clock :    #---------#                       #    # MIG 3.6.1           #
56
   #  133 MHz    #         #                       #    # (27 files)          #
57
   #             #         #                       #    # + UCF-File          #
58
   ###############         #########################    #######################
59
 
60
 
61
 
62
purpose :
63
========
64
 
65
> this project is a simple example how to implement the DDR2-SDRAM on a Xilinx FPGA Board
66
  (with the generated Code from the Xilinx MIG)
67
 
68
 
69
 
70
hint for using the DDR2-RAM :
71
===================================
72
 
73
> the complete DDR2_RAM_Core Files in this project are
74
  genaratet with the Xilinx MIG 3.6.1 tool
75
 
76
 
77
> MIG settings :
78
        - Typ = DDR2-SDRAM
79
        - Frq = 133MHz
80
        - Write Pipe Stages = 4
81
        - Memory Part = MT47H32M16XX-3 (for the Spartan-3A Board)
82
        - Data Width = 16
83
        - Data-Mask = Ja
84
        - SystemClock = Single-Ended
85
        - Signals at : Bank3 (complete) , Bank2 (V12)
86
        - Bank2 = System-Clock / Bank3 = Adrees-Control+Data+System-Control
87
        - all others : "Default"
88
 
89
> Hint : DDR2_RAM_CORE :
90
 
91
        - only the VHDL-Files from path
92
          "USer_Design/RTL" are used
93
        - the oter files generated from MIG
94
          are not necessary
95
 
96
> HINT : DDR2 UCF-File :
97
 
98
        - the settings in the UCF-File are very important
99
          for the correct timing and function of the RAM
100
        - i have downloaded the original UCF-File
101
          from Xilinx for the Spartan-3A Board
102
          from these adress :
103
          "http://www.xilinx.com/products/boards/s3astarter/reference_designs.htm"
104
        - a few changes are required (e.g. for the path)
105
 
106
 
107
Function of the Project :
108
============================
109
 
110
> Switch-0 (SW0) is the Reset-Switch (High = Reset)
111
 
112
> the "TOP_Modul" only routes the signals between the other Moduls
113
 
114
> the "Buttons_VHDL" debounce the switches und buttons
115
  and generate a "rising_edge" signal for the 4 Buttons
116
 
117
> the "DDR2_Control" has a state machine with these steps :
118
 
119
  1. Init the RAM
120
  2. Automatic Write Sequenz (writes 16 Datawords each 64Bit)
121
  3. Automatic Read Sequenz (reads the first Dataword with 64Bit from adress 0)
122
  4. Wait for a button signal
123
 
124
  5a. Button-1 (north) -> increment ROW-Counter
125
  5b. Button-2 (south) -> decrement ROW-COunter
126
  5c. Button-3 (west)  -> writes a single Datawort (64Bit) to the actual adress
127
  5d. Button-4 (east)  -> reads a single Dataword (64Bit) from the actual adress
128
 
129
> the "DDR2_Control" also selects one Byte (from the 64Bit Dataword)
130
 
131
  - SW1 to SW3 are the MUX-Select-Pins :
132
 
133
        SW3=0 + SW2=0 + SW1=0 -> shows the Databits (D7...D0)
134
        SW3=0 + SW2=0 + SW1=1 -> shows the Databits (D15...D8)
135
        SW3=0 + SW2=1 + SW1=0 -> shows the Databits (D23...D16)
136
        SW3=0 + SW2=1 + SW1=1 -> shows the Databits (D31...D24)
137
        SW3=1 + SW2=0 + SW1=0 -> shows the Databits (D39...D32)
138
        SW3=1 + SW2=0 + SW1=1 -> shows the Databits (D47...D40)
139
        SW3=1 + SW2=1 + SW1=0 -> shows the Databits (D55...D48)
140
        SW3=1 + SW2=1 + SW1=1 -> shows the Databits (D63...D56)
141
 
142
        the selected Databits are shown on the 8 LEDs at the FPGA-Board
143
 
144
> the "DDR2_Read" has a state machine to read one Dataword (64Bit)
145
  from given adress
146
 
147
> the "DDR2_Write" has a state machine to write one Dataword (64Bit)
148
  to the given adress
149
 
150
 
151
 
152
Ram Data content after the automatic write sequenz :
153
======================================================
154
 
155
> after the automtic write sequenz the content of the first 16 Datawords are :
156
 
157
ADR 0 = 0123456789ABCDEF
158
ADR 1 = 123456789ABCDEF0
159
ADR 2 = 23456789ABCDEF01
160
ADR 3 = 3456789ABCDEF012
161
ADR 4 = 456789ABCDEF0123
162
ADR 5 = 56789ABCDEF01234
163
ADR 6 to ADR 15 = 639CC6398C7318E7
164
 
165
 
166
 
167
Process after power on :
168
==========================
169
 
170
> after the RAM-INIT and writing of 16 Datawords
171
  the first RAM-Adress is reading and shown on the LEDs
172
 
173
> the buttons "north" and "south" changes the actuall adress pointer
174
 
175
> to read one adress use button "east"
176
 
177
> to write the Dataword "31CE629DC43B8877" use button "west"
178
 
179
 
180
 
181
RAM-Info :
182
================
183
 
184
> the size of the DDR2-RAM is 512MBit (64MByte)
185
 
186
> it is splitted in 4 Blocks (Banks)
187
  each Block has 8192 ROWs and 1024 COLs
188
 
189
  a single Datacell is 16bit wide
190
 
191
  4x8192*1024*16bit = 512MBit
192
 
193
> the Bank-Adress needs 2Bit
194
  the ROW-Adress needs 13Bit
195
  the COL-Adress needs 10Bit
196
 
197
> the Adresspointer looks like :
198
 
199
  ADR = ROW & COL & BANK
200
 
201
  the complete ADR-Pointer needs 25Bit
202
 
203
 
204
 
205
Restrictions in this project :
206
==================================
207
 
208
> the "Burst-Mode" is fixed set to "4"
209
  whis this setting the Dataword is 64Bit wide
210
 
211
> each read process reads 64Bit and each write process
212
  writes 64Bits
213
 
214
> to avoid data fail the COL-Adress must increment
215
  and decrement by the value of "4"
216
  like (0,4,8,12...)
217
 
218
 
219
 
220
Speed :
221
==================
222
 
223
> a single read process (of 64Bit) needs 22 Clockcycles
224
  (at 133MHz -> 165 ns => 46 MByte/sec)
225
 
226
> a single write process (of 64Bit) needs 25 Clockcycles
227
  (at 133MHz -> 188 ns => 40 MByte/sec)
228
 
229
 
230
last Hints :
231
=============
232
 
233
> this project is "from private"
234
  and not allowed for commercial use
235
 
236
> this project is not free of bugs
237
  and i can not give a guarantee
238
  for any kind of error or damages
239
 
240
> everyone is permitted to copy and modify
241
  this files
242
 
243
> please give me a notice if you found
244
  some bugs
245
 
246
 
247
 
248
 
249
19.08.11 / UB
250
 

powered by: WebSVN 2.1.0

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