简体   繁体   English

DDR3 标准/数据表中的 CK (tCK, nCK) 单位歧义?

[英]CK (tCK, nCK) unit ambiguity in DDR3 standard/datasheets?

I am designing a simplistic memory controller and PHY on an Artix-7 FPGA but am having problems reading the datasheet.我正在 Artix-7 FPGA 上设计一个简单的 memory controller 和 PHY,但在阅读数据表时遇到问题。 The timings in the memory part's datasheet (and in the JEDEC JSD79-3F doc) are expressed in CK/tCK/nCK units, which are in my opinion ambiguous if not running the memory at the nominal frequency (eg lower than 666 MHz clock for a 1333 MT/s module). memory 部件的数据表(以及 JEDEC JSD79-3F 文档)中的时序以 CK/tCK/nCK 单位表示,如果不在标称时钟频率下运行 memory(例如低于 666 MHz 1333 MT/s 模块)。

If I run a 1333 MT/s module at a frequency of 300 MHz -- still allowed with DLL on, as per the datasheet speed bins, -- is the CK/tCK/nCK unit equal to 1.5 ns (from the module's native 666 MHz), or 3.33 ns (from the frequency it is actually run at)?如果我以 300 MHz 的频率运行 1333 MT/s 模块——在 DLL 上仍然允许,根据数据表的速度箱——CK/tCK/nCK 单位等于 1.5 ns(来自模块的原生 666 MHz),还是 3.33 ns(从它实际运行的频率)? On one hand it makes sense that certain delays are constant, but then again some delays are expressed relative to the clock edges on the CK/CK# pins (like CL or CWL).一方面,某些延迟是恒定的是有道理的,但同样,一些延迟是相对于 CK/CK# 引脚(如 CL 或 CWL)上的时钟沿来表示的。

That is to say, some timing parameters in the datasheet only change when changing speed bins.也就是说,datasheet 中的一些时序参数只有在改变 speed bin 时才会改变。 Eg tRP is 13.5 ns for a 1333 part, which is also backwards compatible with the tRP of 13.125 ns of a 1066 part -- no matter the chosen operating frequency of the physical clock pins of the device.例如,1333 器件的 tRP 为 13.5 ns,这也向后兼容 1066 器件的 13.125 ns tRP——无论器件的物理时钟引脚选择的工作频率如何。

But then, running a DDR3 module at 300 MHz only allows usage of CL = CWL = 5, which is again expressed in "CK" units.但是,在 300 MHz 下运行 DDR3 模块仅允许使用 CL = CWL = 5,它再次以“CK”单位表示。 To my understanding, this means 5 periods of the input clock, ie 5 * 3.33 ns.据我了解,这意味着输入时钟的 5 个周期,即 5 * 3.33 ns。

I suppose all I am asking is whether the "CK" (or nCK or tCK) unit is tied to the chosen speed bin (tCK = 1.5 ns when choosing DDR3-1333) or the actual frequency of the clock signal provided to the memory module by the controlling hardware (eg 3.3 ns for the 600 MT/s mode)?我想我要问的只是“CK”(或 nCK 或 tCK)单元是否与所选速度箱(选择 DDR3-1333 时 tCK = 1.5 ns)或提供给 memory 模块的时钟信号的实际频率相关联通过控制硬件(例如 600 MT/s 模式为 3.3 ns)?

This is the response of u/Allan-H on reddit who has helped me reach a conclusion:这是帮助我得出结论的 u/Allan-H 在 reddit 上的回复:

When you set the CL in the mode register, that's the number of clocks that the chip will wait before putting the data on the pins.当您在模式寄存器中设置 CL 时,这就是芯片在将数据放在引脚上之前将等待的时钟数。 That clock is the clock that your controller is providing to the chip (it's S DRAM, after all).该时钟是您的 controller 提供给芯片的时钟(毕竟它是S DRAM)。
It's your responsibility to ensure that the number of clocks you program (eg CL=5) when multiplied by the clock period (eg 1.875ns) is at least as long as the access time of the RAM.您有责任确保您编程的时钟数(例如 CL=5)乘以时钟周期(例如 1.875ns)至少与 RAM 的访问时间一样长。 Note that you program a number of clocks, but the important parameter is actually time.请注意,您编写了许多时钟,但重要的参数实际上是时间。 The RAM must have the data ready before it can send it to the output buffers. RAM 必须先准备好数据,然后才能将其发送到 output 缓冲区。
Now let's run the RAM at a lower speed, say 312.5MHz (3.2ns period).现在让我们以较低的速度运行 RAM,比如 312.5MHz(3.2ns 周期)。 We now have the option of programming CL to be as low as 3, since 3 x 3.2ns > 5 x 1.875ns.我们现在可以选择将 CL 编程为低至 3,因为 3 x 3.2ns > 5 x 1.875ns。
BTW, since we are dealing with fractions of a ns, we also need to take the clock jitter into account.顺便说一句,由于我们处理的是 ns 的分数,我们还需要考虑时钟抖动。

Counterintuitively, the DRAM chip doesn't know how fast it is;与直觉相反,DRAM 芯片不知道它有多快。 it must be programmed with that information by the DRAM controller.它必须由 DRAM controller 使用该信息进行编程。 That information might be hard coded into the controller (eg for an FPGA implementation) or by software which would typically read the SPD EEPROM on the DIMM to work out the speed grade then write the appropriate values into the DRAM controller.该信息可能被硬编码到 controller(例如用于 FPGA 实现)中,或者通过软件通常会读取 DIMM 上的 SPD EEPROM 以计算出速度等级,然后将适当的值写入 DRAM controller。

This also explains timing values defined as eg "Greater of 3CK or 5ns".这也解释了定义为例如“大于 3CK 或 5ns”的时序值。 In this case, the memory chip cannot respond faster than 5 ns, but the internal logic also needs 3 positive clock edges on the input CK pins to complete the action defined by this example parameter.在这种情况下,memory 芯片的响应速度不能超过 5 ns,但内部逻辑也需要输入 CK 引脚上的 3 个正时钟沿来完成此示例参数定义的动作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM