Design and Implementation of DDR SDRAM Controller Using Verilog
Design and Implementation of DDR SDRAM Controller Using Verilog
1
Student, M.E. (VLSI Design), CSVTU University, Electronics & Telecommunication Dept., SSCET, Bhilai
Chhattisgarh, India
[email protected]
2
Assistant Professor, Electronics & Telecommunication, SSCET, Bhilai
Chhattisgarh, India
[email protected]
3
Associate Professor, HOD (EEE), CSIT, Durg
Chhattisgarh, India
[email protected]
Abstract: Double Data Rate Synchronous DRAM (DDR SDRAM) has become a mainstream memory of choice in design due to its
speed, burst access and pipeline features. The DDR SDRAM is an enhancement to the conventional SDRAM running at bus speed over
75MHz. The DDR SDRAM (referred to as DDR) doubles the bandwidth of the memory by transferring data twice per cycle on both the
rising and falling edges of the clock signal. The designed DDR Controller supports data width of 64 bits, Burst Length of 4 and CAS
(Column Address Strobe) latency of 2. DDR Controller provides a synchronous command interface to the DDR SDRAM Memory along
with several control signals. In this paper, the implementation has been done in Verilog HDL by using Xilinx ISE 9.2i and Modelsim
6.4b.
Keywords: Double Data Rate, Column Address Strobe (CAS), Synchronous Dynamic RAM.
1. Introduction data, on the other hand, can be accessed in any order. All the
data that the PC uses and works with during operation are
With the rapid development in the processor’s family, stored here. Data are stored on drives, typically the hard
speed and capacity of a memory device is a major concern. drives. However, for the CPU to work with those data, they
The DDR is an enhancement to the traditional synchronous must be read into the working memory storage (RAM).
DRAM. The DDR is able to transfer the data on both the
edges of each clock cycle. Thus doubling the data transfer B. Types of Random Access Memory
rate of the memory device. The DDR is available in a very
low cost that’s why it is widely used in personal computers i. Static Random Access Memory
where they are basically used to provide the functions of
storage and buffers. The DDR SDRAM supports the data Static Random Access Memory uses a completely different
widths of 16, 32 and 64 bits. It automatic refresh during the technology. In static RAM, a form of flip-flop holds each bit
normal and power down modes. The DDR is a complete of memory. A flip-flop for a memory cell takes four or six
synchronous implementation of controller. It increases the transistors along with some wiring, but never has to be
throughput using command pipelining and bank refreshed. This makes static RAM significantly faster than
management. This improvement allows the DDR module to dynamic RAM. However, because it has more parts, a static
transfer data twice as fast as SDRAM. As an example, memory cell takes up a lot more space on a chip than a
instead of a data rate of 133MHz, DDR memory transfers dynamic memory cell. Therefore, you get less memory per
data at 266MHz.DDR modules, like their SDRAM chip. Static Random Access Memory uses multiple
predecessors, arrive in there. Although motherboards transistors, typically four to six, for each memory cell but
designed to implement DDR are similar to those that use doesn't have a capacitor in each cell. It is used primarily for
SDRAM, they are not backward compatible with cache. So static RAM is fast and expensive, and dynamic
motherboards that support SDRAM. You cannot use DDR in RAM is less expensive and slower. So, static RAM is used to
earlier SDRAM based motherboards, nor can you use create the CPU's speed-sensitive cache, while dynamic RAM
SDRAM on motherboards that are designed for DDR. forms the larger system RAM space.
A. Random Access Memory ii. Dynamic Random Access Memory
Random access memory (RAM) is the best known form of Dynamic Random Access Memory has memory cells
computer memory. RAM is considered "random access" with a paired transistor and capacitor requiring constant
because you can access any memory cell directly if you refreshing. DRAM works by sending a charge through the
know the row and column that intersect at that cell. RAM
Volume 2 Issue 1, January 2013
www.ijsr.net
320
International Journal of Science and Research (IJSR), India Online ISSN: 2319-7064
appropriate column (CAS) to activate the transistor at each up of PC 266 chips. Go for PC2700 DDR. It is about the cost
bit in the column. When writing the row lines contain the of PC2100 memory and will give you better performance.
state the capacitor should take on. When reading the sense DDR memory comes in CAS 2 and CAS 2.5 ratings, with
amplifier determines the level of charge in the capacitor. If it CAS costing more and performing better.
is more than 50 percent, it reads it as a 1 otherwise it reads it
as a 0. This paper is organized as follows. In Section 2, Block
diagram of DDR controller will be described. The
A memory chip rating of 70ns means that it takes 70 architecture of DDR controller will be described in Section
nanoseconds to completely read and recharge each cell. It is 3. In Section 4, different functional blocks will be explained.
one of the most common types of computer memory (RAM). Finally the Result and Conclusion will be given in Section 5
It can only hold data for a short period of time and must be and Section 6 respectively.
refreshed periodically. DRAMs are measured by storage
capability and access time. Storage is rated in megabytes (8 2. DDR controller Block Diagram
MB, 16 MB, etc). Access time is rated in nanoseconds (60ns,
70ns, 80ns, etc) and represents the amount of time to save or Figure 1 shows the different blocks in top level reference
return information. With a 60ns DRAM, it would require 60 design. The user interface module contains the I/O registers
billionths of a second to save or return information. The to latch system signals coming into the FPGA. The DDR
lower the speed, the faster the memory operates. DRAM controller module contains the DDR SDRAM controller,
chips require two CPU wait states for each execution. Can including I / Os to interface with the DDR SDRAM.
only execute either a read or write operation at one time. The
capacitor in a dynamic RAM memory cell is like a leaky
bucket. It needs to be refreshed periodically or it will
discharge to 0. This refresh operation is where dynamic
RAM gets its name.
4. Different Functional Blocks timing requirements and issues the commands to the memory
devices at the shorted time possible. The pin diagram of
4.1 Address Latch controller is shown in figure 5:
The basic function of address latch module is to gets its
control signals from the controller and generates row,
column and bank addresses for the DDR SDRAM. The clk ddr_casb
address latch also generates different control signals like clk2x ddr_rasb
burst_max, cas_lat_max for the burst counter and cas latency lac_clk ddr_web
counter. u_ref_ack
u_cmd [7:1] ddr_dqs_t
ddr_write_en [7:0]
burst_end CONTROLLER ddr_read_en [3:0]
cas_lat_end u_data_valid_en
rcd_end mrs_addr
burst_8 row_addr
ld_burst
burst_2 ld_cas_lat
ld_rcd
4.3 Controller
The controller consists of a state machine which performs
DDR SDRAM read and write accesses based on user
interface request. The controller consists of a high
performance timing & control state machine that observes all
Volume 2 Issue 1, January 2013
www.ijsr.net
322
International Journal of Science and Research (IJSR), India Online ISSN: 2319-7064
Idle
Precharge
read or Load_mr
write
Refresh
rcd_end#
rcd_end#
burst_8#
rcd_end &
ACT Act_wait
read
burst_2
READ rcd_end &
burst_8# read WRITE
cas_lat_end cas_lat_end# burst_2# burst_8#
The controller next state could be PRECHARGE, Figure 8: Simulation waveform for Controller
LOAD_MR, REFRESH or ACT, depending upon the
required command. The ACT command is used to open a
row in a bank before starting any read or write operation.
The controller state machine diagram is shown in figure 6.
4.4 Counter
5. Results
Figure 7 shows the RTL schematic of designed DDR
SDRAM controller.