SIBR Technical Review Cover
SIBR Technical Review Cover
Abstract- Today's high-per for mance CPUs demand high- 5) Programmable wrap sequence: sequential or interleave
speed memor y. Conventional DRAM technology cannot 6) Multiple burst read with single write option
suppor t the data r ates that today's CPUs require. As the bus 7) Automatic and controlled precharge command
speed gets faster than 50 MHz, new memor y devices are 8) Data mask for read-write control
required. Synchronous DRAM (SDRAM) is the new memor y
for high-speed CPUs. DDR SDRAM is similar in function to
9) Auto refresh or self-refresh
the regular SDRAM but doubles the bandwidth of the
memor y by tr ansfer r ing data on both edges of the clock cycles Conventional DRAM is controlled asynchronously. The
SDRAM is the most prefer able memor y for stor ing lar ge system must insert wait states (latency cycles to allow the
amount of data stor age. SDRAM stands for synchronous DRAM to catch up with the CPU) to meet the
DRAM in this case all the I/O and control signal of memor y is specifications of the conventional DRAMs. Timing
synchronize to clock. In this paper we design a kind of depends on the speed of DRAM device used, and is
SDR AM con t r oller. SDAR M con t r oller p r ovid es a independent of the bus speed. With SDRAM, the
synchronous command inter face to the SDRAM memor y performance can be increased by up to 2.7 times that of the
along with sever al control signals.
fast page mode device (conventional, asynchronous
Keywords- SDARM; Memor y r ead-wr ite;memor y DRAM).
control action
SDRAM provides for programmable READ or WRITE
burst lengths of 2, 4, or 8 locations. An auto precharge
I. INTRODUCTION function may be enabled to provide a self timed row
With the development of semiconductor industry the speed precharge that is initiated at the end of the burst access this
and capacity of memory device enlarges increasingly from model has implemented in RTL by VHDL. The focus of
RAM to DRAM and SDRAM. DDR SDARM is an this work is to implement behavioral model of SDRAM.
enhancement in traditionally synchronous DRAM. It The Top level model is as shown in Fig.1. The core contains
supports data transfer on both edge of each clock cycle, mainly two parts, AHB Slave and DDR SDRAM
effectively doubling the data transfer throughput of the controller.
memory device. It is widely used on PC for its low cost. Of
all DRAMs manufactured today, approximately 70% are II. ARCHITECTURE OF SDRAM CONTROLLER
used in desktop and notebook PCs, where they are used to Fig.1 shows the block diagram of memory controller it
provide two different functions: main storage and buffers. consist of three component command module, signal
The operating frequency of CPU is much higher than generation module and data path module.
memory thus there is a gap exit between CPU and memory.
Most PCs are offered with L2 cache to bridge the
processor-memory performance gap [2]. This makes the
speed of the DRAM memory used for main storage an
important but secondary consideration to price. However
as multitasking increases with large programs, the
frequency of accesses to the L2 cache decreases, this
degrades overall system performance, since the processor
must wait for the DRAM to supply the requested data. To
recover lost system performance, larger L2 cache or faster
DRAM main memory are required. Therefore SDRAM is
the right main memory choice to increase the system Fig.1 Top Module
performance.
The features of the SDRAM are [1, 2] Command module consists of sub module initialization
1) Fully synchronous and command generation. Initialization module initializes
2) Dual banks the memory before use it. Initialization start with high on
3) Programmable CAS latency: 1, 2, 3 clock cycles input INIT_START. It also provides the control
4) Programmable burst length: 1, 2, 4, 8
184
International Journal of Computer Science and Application Issue 2010 ISSN 0974-0767
information for command and signal generator module. accessed (BA0-BA2 select the bank; A26-A13 select the
Command module accepts the command like read, write, row). The address bits registered coincident with the Read
active, refresh and precharge from user and generate or Write command are used to select the starting column
internal signal CSTATE. All the output of initialization and location for the burst access and to determine if the auto
command module are internally coded in the form of precharge command is to be issued.
ISTATE and CSTATE respectively. Depending on the
value of ISTATE and CSTATE signal generator generates Fig.2 shows the block diagram of SDRAM controller.
the value at the output. Signal WR_EN to enable write Input contains the necessary signal for bus system and
and read operation in data path module, to activate the data output side contains the signal for addressing the memory.
transfer between CPU and memory at data transfer states At the input a multiplexed 27 bit addresses bus. RD_WR
[1]. indicates type of access read or write, for read it would be
'1'. A three bit command input indicates the input command
A memory controller regulates the data transfer between defined by user. 'Burst' input indicates whether the input is
CPU and memory. All the command and address are the single data transfer or burst data transfer. With 14 rows bit
input of controller and it generates the necessary control address and 2 bit bank address we can address 512 MB
signal for addressing the memory. SDRAM is organized in SDRAM. An active command moves row from the
bank, row and column architecture. Bank row and column memory array into row buffer, thereby opening the row.
address are multiplexed into a single address bus Once the row has been opened any number of Read- Write
“ADDRESS”. The entire control signals are synchronized command issued to transfer data on into and out of the row.
with clock. A precharge command closes a row, restores it back to the
memory array and precharges the bank for next row
III. BASIC FUNCTIONALITY [3] activation.
The SDRAM is a high-speed CMOS, dynamic random-
access memory. It is internally configured as a dual bank 1) Register Definition
DRAM. The DDR SDRAM uses double data rate Fig.3 shows scheme of address bus multiplexing. A 27 bit
architecture to achieve high-speed operation. The double multiplexed address bus consists of address of bank row
data rate architecture is essentially 2n prefetch architecture and column.
with an interface designed to transfer two data words per
clock cycle at the I/O pins. A single read or write access for
the DDR SDRAM effectively consists of a single 2n-bit
wide, one clock- cycle data transfer at the internal DRAM
core and two corresponding n-bit wide, one-half clock-
cycle data transfers at the I/O pins. A bidirectional data Figure.3 Address bus multiplexing
strobe (DQS) is transmitted externally, along with data, for
use in data capture at the receiver. DQS is a strobe
transmitted by the DDR SDRAM during READs and by SDARM is organized as a set of rank that consists of
the memory controller during WRITEs. DQS is edge- independent memory bank. 2 bit bank can address
aligned with data for READ and center-aligned with data maximum 4 no. of bank. Each memory bank consists of
for WRITE. independent 2D memory cell.
185
International Journal of Computer Science and Application Issue 2010 ISSN 0974-0767
3) Mode Register and Extended Mode register (EMRS), such as for the burst
The mode register stores the data for controlling the length, CAS latency, and additive latency, are configurable
various operating modes of SDRAM. It controls CAS in the design and determined by the value of top-level HDL
latency, burst length, burst sequence, test mode, DLL reset, parameters. During the initialization the mode register and
WR and various vendor specific options to make SDRAM extended mode register are initialized with user defined
useful for various applications. The Mode register is used value of burst length, CL latency, AL latency and other
to define the specific mode of operation of the DDR2 parameter.
SDRAM. Fig.4 shows the Mode register features used by
the controller. Bank Addresses BA1 and BA0 select the Initialization process provides the necessary signal
Mode registers[5]. (ISTATE) to the signal generator. Initialization starts with
IDLE followed by NOP and precharge all signal. EMRS
are initialized with specific bank address value.
5) Extended Mode Register 2 (EMR2) Mode register is initialized with value “0342” to reset DLL
Bank Address bits are set to 10 (BA1 is set High, and BA0 and programmed the other value like CAS latency.
is set Low). The address bits are all set to Low. Onwards all bank precharged and generates two refresh
signal. Again it loads mode register with value “0242” to
6) Extended Mode Register 3 (EMR3) reset DLL. EMR is loaded with value “2380” for default
Bank Address bits are set to 11 (BA1 and BA0 are set calibration and “2000” to ocd exit. Once the MR and EMR
High).Address bits are all set to Low, as in EMR2. are initializing with certain value it will remain same till
Extended mode register 2 and 3 are kept reserved by end. To change the values have to re-initialize again[1].
JEDEC (Joint Electron Device Engineering Council)[5]. After initialization completed it generates INIT_DONE
signal to the command module, it shows that memory is
IV. DIFFERENT MODULE initialized and it is ready for reading or writing.
A. Initialization Module Fig.7 shows the simulated result of initialization. All the
Prior to normal operation, the SDRAM must be initialized. simulation has been performed using Xilinx simulation
SDRAMs must be powered up and initialized in a tool. Initialization sequence (ISTATE) follows as 0-1-2-3-
predefined manner. The PHY layer of SDRAM executes a 4-5-6-7-8-9-A-B-C-D which is the coded value of Idle,
JEDEC-compliant initialization sequence for memory. Nop,PrecharfeAll,EMR2,EMR3,EMR,MR,PrechargeAll,
Fig6. Shows the memory initialization sequence executed Refresh1,Refresh2,Reset DLL,OCD Default, OCD Exit,
for the physical layer during initialization of memory Ready. After Ready state signal INIT_DONE indicate
certain bit values programmed to the Mode register (MR) initialization complete.
186
International Journal of Computer Science and Application Issue 2010 ISSN 0974-0767
C. Signal Generator
This module accept the command from initialization
(Istate) and command module (Cstate) and activate the
DDR_CAS, DDR_RAS, DDR_WE signal at the output
upon the detection of initialization and command state.
fig.9 shows the generated signal. DDR_CKE signal
always remain high to enable the data transfer between
controller and memory. DDR_CS always remain low to
enable the memory device.
187
International Journal of Computer Science and Application Issue 2010 ISSN 0974-0767
Figure 9 Signal generation Fig 12 shows the RTL schematic of top module. All the
D. DATAPATH design is simulated and tested in vertex5 Xilinx ISE
The data flow design between the SDRAM and the system simulator.
HDL Synthesis report of the core as shown below
interface. Fig10 shows the diagram of controller's Macro Statistics
datapath. The module in this reference design interfaces # FSMs :2
between the SDRAM with 16-bit bidirectional data bus # Registers : 44
and the bus master with 32 bit data bus. The data path Flip-Flops : 44
module performs the data latching and dispatching of the # Latches : 14
1-bit latch :1
data between the processor and SDRAM. This module 16-bit latch :7
accepts a data of 32 bit and convert into two 16 bit DDR 2-bit latch :1
data and issue the data at both rising and falling edge of 32-bit latch :1
clock. 8-bit latch :4
Minimum period : 2.653ns
(Maximum Frequency : 376.932MHz)
Minimum input arrival time before clock: 3.333ns
Maximum output required time after clock: 3.597ns
IO Utilization:
Number of IOs :161
Figure 11 waveform of write cycle
188
International Journal of Computer Science and Application Issue 2010 ISSN 0974-0767
REFERENCES
1. High-Performance DDR2 SDRAM Interface in Virtex-5 Devices
XAPP858 (v2.1) May 8, 2008
2. LatticeSC/M DDR/DDR2 SDRAM Memory interface User's
Guide,TechnicalNoteTN1099, July 2008
3. Implementing a Synchronous DRAM Controller in Cypress
CPLDs, Cypress Semiconductor Corporation CA95134 408-943-
2600 July 15, 1999
4. VHDL for Programmable Logic, Kevin S kahill, Cypress
Semiconductor
5. JEDEC Solid State Technology Association. DDR2 SDRAM
Specification.
6. Double Data Rate (DDR) SDRAM Specification, JEDEC
STANDARD JESD79E, May 2005
Abhishek kumar
M.Tech. (Student)
V.J.T.I. (Mumbai)
[email protected]
Kir ti Shinde P
M.Tech. (Student)
V.J.T.I.(Mumbai)
[email protected]
Yogesh E. Wankhede
M.Tech. (Student)
V.J.T.I. (Mumbai)
[email protected]
189