典型的 DRAM 行缓冲区大小是多少?如何找到它?

What is the typical DRAM row buffer size? How to find it?

如何以编程方式或使用 *nix 系统中已有的工具找到 DRAM 行缓冲区大小?

例如,使用金士顿 DDR4,我执行了以下命令(您可能需要安装一些软件包):

  sudo modprobe eeprom
  decode-dimms

在众多信息中,这些命令给出了我的 DDR 棒的特性:

---=== Memory Characteristics ===---
Maximum module speed                             2132 MHz (PC4-17000)
Size                                             16384 MB
Banks x Rows x Columns x Bits                    16 x 16 x 10 x 64
SDRAM Device Width                               8 bits
Ranks                                            2
Rank Mix                                         Symmetrical
AA-RCD-RP-RAS (cycles)                           14-14-14-35
Supported CAS Latencies                          16T, 15T, 14T, 13T, 12T, 11T, 9T

行和列实际上是地址位数(您可以在 https://fossies.org/linux/i2c-tools/eeprom/decode-dimms, and understand what the code is doing when you look at the DDR4 SPD information: https://en.wikipedia.org/wiki/Serial_presence_detect#DDR4_SDRAM 查看 decode-dimms 源)

因此,如果我们有 10 个列位,则有 1024 列 (2^10),其中每列由模块宽度组成(根据上述数据为 64,表示为“位”)。由于我们还可以看到 SDRAM 设备宽度为 8 倍,因此我们可以推断出 DIMM 锁步 8 个 SDRAM 芯片(您在 DRAM 棒中看到的那些黑框)以获得 64 位的总宽度。

因此,我的 DDR4 中的行缓冲区大小为 64 位 * 1024 列 = 65536 位宽(8192 字节)。 DDR3 和 DDR4 中的行缓冲区大小大多是这个长度,但是 HMC 和 HBM 等新架构有不同的大小。

因此,在一个简短的命令行中,return 以位为单位(只需除以 8 即可得到字节): decode-dimms | grep "Columns x Bits" | awk -F 'x' '{print (2^$(NF-1))*$NF}

PS:请注意,它处理单个 DIMM。如果您有多个 DIMM 解码 dimm 可能 return 多个模块的信息。