[DDR]3 - Understanding Timing Parameters

本文详细介绍了DDR4 SDRAM中的关键时序参数,包括激活、刷新、读取和写入操作的定时限制。例如,tRRD_S和tRRD_L规定了不同银行组间和同一银行组内连续激活命令的间隔,tFAW限制了连续激活命令的数量,tREFI定义了平均刷新间隔,CL和AL决定了读取和写入操作的延迟。这些参数对于理解和优化DDR4 SDRAM的性能至关重要。

DDR4 SDRAM - Understanding Timing Parameters

Introduction

There are a large number of timing parameters in the DDR standard, but when you work with DDR4 SDRAM you’ll often find yourself revisiting or reading about a handful of timing parameters more often than others. So, in this article we’ll examine only these frequently occurring timing parameters by looking at them in the context of a command.

These timing parameters are a hard thing to remember, they tend to slip out of your head. The accompanying article, Timing Parameter Cheat Sheet, can be used as a reference to recollect what a specific timing parameter means.

Note: All pictures below were taken from the DDR4 JEDEC specification and a Micron memory part spec. Links to them can be found in the Reference section.

ACTIVATE Timing

The ACTIVATE command is used to open a row within a bank. In Understanding the Basics we saw that every bank has a set of sense amps, so one row can remain active per bank. With ACTIVATE there are 3 timing parameters we should know about: tRRD_S, tRRD_L, tFAW

ParameterFunction
tRRD_SWhen issuing consecutive ACTIVATE commands to banks of different bank groups, the ACTIVATE commands have to be separated by tRRD_S (row-to-row delay–short)
tRRD_LIf the banks belong to the same bank group, their ACTIVATEs have to be separated by tRRD_L (row-to-row delay–long)
tFAWFour Activate Window or sometimes also called Fifth Activate Window is a timing restriction. tFAW specifies a window within which only four activate commands can be issued. So, you can issue ACTIVATE commands back-to-back with tRRD_S between them, but once you have completed 4 activates you cannot issue another one until the tFAW window expires.

Table 1: Activate command timing parameters
在这里插入图片描述
Figure 1: tRRD timing
在这里插入图片描述
Figure 2: tFAW timing

REFRESH Timing

In order to ensure data stored in the SDRAM is not lost, the memory controller has to issue a REFRESH command at an average interval of tREFI. But before a REFRESH can be applied, all banks of the SDRAM have to be Precharged and idle for a minimum time of tRP(min). Once a REFRESH command is issued, there has to be a delay of tRFC(min) before the next valid command is issued (except DES command).

Notice how I mentioned that tREFI is the “average” interval between REFRESH commands. This is because you can push-out (or pull-in) a certain number of refresh commands and make up for it later. This mode was added to DDR4 to overcome the performance penalty due to refresh lockout at the higher densities. The number of refresh commands that can be postponed depends upon the Refresh Mode (1x, 2x or 4x) which can be set in the SDRAM’s Mode Register MR2.

ParameterFunction
tREFIThe device requires REFRESH commands at an average interval of tREFI
tRPPrecharge time. The banks have to be precharged and idle for tRP before a REFRESH command can be applied
tRFCDelay between the REFRESH command and the next valid command, except DES

Table 2: Refresh command timing parameters
在这里插入图片描述
Figure 3: REFRESH timing
在这里插入图片描述
Figure 4: Postponing REFRESH command

READ Timing

The READ timing parameters can be broken up into 3 categories - Overall read timing, Clock-to-Strobe relationship and Data Strobe-to-Data relationship. Refer to DRAM-read-operation to understand the basics.

ParameterFunction
Read Timing
CL (CAS Latency)CAS is the Column-Address-Strobe, i.e., when the column address is presented on the lines. CL is the delay, in clock cycles, between the internal READ command and the availability of the first bit of output data. It is defined in the MR0 mode register. SDRAM data sheets typically specific what the CL needs to be set for a particular frequency of operation. *See Fig 7*
AL (Additive Latency)With AL, the device allows a READ command to be issued immediately after the ACTIVATE command. The command is held for the time of AL before it is issued inside the device. This feature is supported to sustain higher bandwidths/speeds in the device.
RL (Read Latency)This is the overall read latency and is defined as RL = CL + AL
tCCD_S & tCCD_LBank accesses to different banks’ groups require less time delay between accesses than bank accesses to within the same bank’s group. Bank accesses to different bank groups require tCCD_S (or short) delay between commands while bank accesses within the same bank group require tCCD_L (or long) delay between commands.
Clock to Data Strobe relationship
tDQSCK (MIN/MAX)describes the allowed range for a rising data strobe edge relative to the clock CK_t, CK_c
tDQSCKis the actual position of a rising strobe edge relative to CK_t, CK_c
tQSHdescribes the data strobe high pulse width
tQSLtQSL - describes the data strobe low pulse width.
Data Strobe to Data relationship
tDQSQThis describes the latest valid transition of the associated DQ data pins. From the picture below you’ll see that it is the time between when DQS transitions to the left edge of the DQ data-eye
tQHIs the earliest invalid transition of the associated DQ pins. From the picture below you’ll see that it is the time from when DQS goes high to the right egdge of the DQ data-eye.

Table 3: Read command timing parameters

在这里插入图片描述
Figure 5: Consecutive READs to different Bank Groups. In this figure AL=0, CL = 11, so RL = 11. Notice how the read data burst (DQ bus) from the second READ immediately follows the first without any gap. Also notice tCCD_S between the 2 consecutive reads.
在这里插入图片描述
Figure 6: Non-Consecutive READs to different Bank Groups
在这里插入图片描述
Figure 7: Illustration of tCCD_S and tCCD_L
在这里插入图片描述
Figure 8: Illustrating CK-DQS and DQS-DQ relationships

WRITE Timing

Following similarly to the READ …

ParameterFunction
Write timing
CWL (CAS Write Latency)CWL is the delay, in clock cycles, between the internal WRITE command and the availability of the first bit of input data. It is defined in Mode Register MR2.
AL (Additive Latency)With AL, the device allows a WRITE command to be issued immediately after the ACTIVATE command. The command is held for the time of AL before it is issued inside the device. This feature is supported to sustain higher bandwidths/speeds in the device.
WL (Write Latency)This is the overall write latency and is defined as WL = CWL + AL
tCCD_S & tCCD_LBank accesses to different banks’ groups require less time delay between accesses than bank accesses to within the same bank’s group. Bank accesses to different bank groups require tCCD_S (or short) delay between commands while bank accesses within the same bank group require tCCD_L (or long) delay between commands.
Clock to Data Strobe relationship
tDQSS (MIN/MAX)describes the allowed range for a rising data strobe edge relative to CK
tDQSSis the actual position of a rising strobe edge relative to CK
tDQSHdescribes the data strobe high pulse width
tDQSLdescribes the data strobe low pulse width
tWPSTThis of this as “post-write”. It is the time from when the last valid data strobe to when the strobe goes to HIGH, non-drive level.
tWPREThis of this as “pre-write”. It is the time between when the data strobe goes from non-valid (HIGH) to valid (LOW, initial drive level).

Table 4: Write command timing parameters
在这里插入图片描述
Figure 9: WRITE timing parameters

Mode Register Timing

SDRAMs provide a number of features, functions and settings which can be programmed using the 7 Mode Registers. These registers can be programmed using the MRS (Mode Register Set) command. The Mode Registers are set during initialization and thereafter they can be changed at any time during normal operation. Mode Register setting is governed by two timing parameters.

ParameterFunction
tMRDMRS command cycle time. It is the time required to complete the WRITE operation to the mode register and is the minimum time required between the two MRS commands shown in the tMRD Timing figure.
tMODis the minimum time required from an MRS command to a non MRS command, excluding DES.

Table 5: Mode register command timing parameters
在这里插入图片描述
Figure 10: tMRD timing
在这里插入图片描述
Figure 11: tMOD timing

References

### DDR3 CK时钟信号的作用及工作原理 DDR3内存中的CK(Clock)时钟信号是一个至关重要的同步信号,用于协调整个系统的操作。它不仅为存储器提供基本的时间基准,还决定了数据传输速率和其他内部时序参数。 #### 1. CK时钟信号的主要作用 CK时钟信号作为DDR3的核心时间基准,在以下几个方面起着重要作用: - **同步控制**:所有的命令、地址以及数据传输都依赖于CK时钟信号进行同步[^1]。 - **定义频率范围**:DDR3的工作频率由CK时钟决定,其典型范围可以从400 MHz到800 MHz不等,对应的数据传输率则达到800 Mbps至1600 Mbps[^2]。 - **支持双倍数据速率**:由于DDR3采用了双倍数据速率技术,因此在每个CK周期的上升沿和下降沿都会发生数据采样或发送动作。 #### 2. 工作原理详解 为了确保高效率的数据交换并减少延迟影响,DDR3通过复杂的时序管理实现了精确的操作流程: - **外部输入与内部生成的关系** 外部提供的CLK信号被用作基础参考源,而实际使用的CK是由FPGA或者专用PHY层电路经过缓冲处理后再传递给DRAM芯片。这种设计可以有效降低噪声干扰带来的不确定性。 - **多相位分配机制** 在某些高级配置下,可能会存在多个不同相位版本的CK分发到各个独立通道上,从而优化整体布局布线条件下的性能表现[^3]。 - **Write Leveling调整功能** Write Leveling是一种专门针对Fly-by拓扑结构所引发的问题提出的解决方案之一。当写入过程中遇到因线路长度差异造成的DQS相对于CK偏移情况时,可通过动态微调方式重新校准两者之间的相对位置关系,使得最终到达目标端口处保持良好的一致性。 ```python # Python伪代码展示如何模拟简单版write leveling逻辑过程 def write_levelization(dqs_signal, ck_signal): delay_steps = range(0, max_delay) # 假设最大可调节步数 best_alignment = None for step in delay_steps: adjusted_dqs = apply_delay(dqs_signal, step) alignment_score = evaluate_timing(adjusted_dqs, ck_signal) if (best_alignment is None or alignment_score > best_alignment['score']): best_alignment = {'step': step, 'score': alignment_score} return adjust_final_dqs(best_alignment['step']) final_adjusted_dqs = write_levelization(initial_dqs, reference_ck) print(f"Optimal DQS Delay Steps: {final_adjusted_dqs}") ``` 上述代码片段仅作为一个理论上的例子说明可能涉及的技术细节,并不代表真实硬件实现方法。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值