DDR阅读理解-FGR Mode

细粒度刷新模式(FGR)的原理与优势

从协议出发, 理解DDR的工作原理



前言

FGR模式(Fine Granularity Refresh,细粒度刷新)是一种通过更灵活的刷新管理来优化性能和数据完整性的机制。


一、FGR的工作方式

FGR模式通过将刷新操作拆分为更小的单元,每次刷新操作仅覆盖部分行(Partial Array),减少单次刷新的时间(例如tRFC2=260ns, tRFC1=600ns),从而降低对内存带宽的占用。
普通模式(1x)的刷新周期为tRFC1,而FGR模式(2x)可能使用更短的tRFC2,通过分多次完成全阵列刷新。
同时tREFI也会变为非FGR模式下的一半,即tREFI2=他REFI/2。这意味着在FGR模式下,会以两倍的刷新频率发出REF命令。

这里需要明确一下2x mode的定义,
1X模式:普通刷新模式下,刷新间隔为tREFI1(如7.8μs),每次刷新覆盖整个Bank的所有子阵列,耗时tRFC1(如350ns)。
2X模式(FGR):刷新间隔缩短为tREFI2 = tREFI1/2(如3.9μs),但每次刷新仅覆盖部分子阵列,单次刷新时间缩短为tRFC2(如90ns)。
即2x mode的核心含义是刷新频率翻倍,而不是2x mode刷新两次可以达到1x mode刷新一次的效果。


二、切换流程(FGR->非FGR)

有FGR mode切换为非FGR mode时,要求REF次数为偶数次,因此切换流程为:

  1. 补偿未完成的刷新操作。
  2. 等待刷新完成(tRFC2)。
  3. 修改MR4[OP4]为0。

三、FGR原理

1、存储阵列物理分块

1)子阵列(Sub-Array)的划分

  • 物理分割
    DRAM存储单元(Memory Cell)被划分为多个独立的子阵列(Sub-Array),每个子阵列包含若干行(Rows)和列(Columns)。

**典型规模:**一个Bank可能由4-8个子阵列组成,每个子阵列包含512~2048行(具体数值因工艺和密度而异)。
**示例:**在16Gb DDR5芯片中,一个Bank可能划分为8个子阵列,每个子阵列管理2K行。

  • 行列解码本地化
    每个子阵列配备独立的行解码器(Row Decoder)和列多路复用器(Column MUX),实现局部地址解析,减少全局信号线的负载和延迟。

2)子阵列的电路隔离

  • 电源与地线分割
    子阵列间通过物理隔离的电源网格(Power Mesh)和地线(Ground Plane)供电,降低噪声耦合。
  • 电荷泵(Charge Pump)独立
    每个子阵列拥有局部电荷泵电路,快速响应刷新时的电荷恢复需求。
  • 信号线分组
    数据线(Bitline)和字线(Wordline)按子阵列分组,避免跨子阵列的长距离走线。
  • 字线驱动优化
    短距离字线减少RC延迟,提升激活(ACT)和刷新(REF)速度。

2、分块设计优势

1)并行刷新

  • 多子阵列并发刷新:
    在FGR模式下,多个子阵列可同时执行刷新操作,缩短整体刷新周期(tRFC2)。
    **示例:**若普通模式需刷新整个Bank(8个子阵列),耗时tRFC1=350ns;FGR模式下每次刷新2个子阵列,分4次完成,单次tRFC2=90ns,总耗时4×90=360ns,但每次阻塞时间更短,系统吞吐量更高。
  • 局部电荷恢复:
    每个子阵列的电荷泵和感应放大器(Sense Amplifier)仅服务局部单元,电荷补充速度更快,减少刷新对电容稳定性的依赖。
    通过这两种方式可以减小刷新冲突概率,降低一个bank内刷新时的电流,以提高并行能力。这也是FGR的优势。

2)动态刷新调度

  • 优先级队列:
    刷新控制器根据行访问热度动态调度子阵列刷新顺序。
  • 高频访问子阵列优先:
    减少因刷新导致的行激活冲突(Row Hammer效应)。
  • 冷数据子阵列延后:
    结合温度监测,低温环境下适当降低刷新频率。
  • 部分阵列自刷新(PASR):
    通过MR60配置PASR掩码,仅刷新指定子阵列,其余区域保持休眠,降低功耗。

3、实例

以某16Gb DDR5芯片为例:

  • Bank结构
    每个Bank划分为8个子阵列,每个子阵列含2K行×512列。
  • 刷新流程:
    a.FGR 模式下,每次刷新2个子阵列(共4次完成全Bank刷新)。
    b.局部电荷泵以1.8V VPP快速恢复电容电荷,单次刷新耗时tRFC2=90ns。
    c.温度>85℃时,刷新控制器自动切换至2x频率(tREFI2=3.9μs),确保数据保留。

参考文献

  1. T. Zhang, M. Poremba, C. Xu, G. Sun and Y. Xie, “CREAM: A Concurrent-Refresh-Aware DRAM Memory architecture,” 2014 IEEE 20th International Symposium on High Performance Computer Architecture (HPCA), Orlando, FL, USA, 2014, pp. 368-379, doi: 10.1109/HPCA.2014.6835947.

  2. K. K. -W. Chang et al., “Improving DRAM performance by parallelizing refreshes with accesses,” 2014 IEEE 20th International Symposium on High Performance Computer Architecture (HPCA), Orlando, FL, USA, 2014, pp. 356-367, doi: 10.1109/HPCA.2014.6835946.

The DDR4 SDRAM is a high-speed dynamic random-access memory internally configured as sixteen-banks, 4 bank group with 4 banks for each bank group for x4/x8 and eight-banks, 2 bank group with 4 banks for each bankgroup for x16 DRAM. The DDR4 SDRAM uses a 8n prefetch architecture to achieve high-speed operation. The 8n prefetch architecture is combined with an interface designed to transfer two data words per clock cycle at the I/O pins. A single read or write operation for the DDR4 SDRAM consists of a single 8n-bit wide, four clock data transfer at the internal DRAM core and eight corresponding n-bit wide, one-half clock cycle data transfers at the I/O pins. Read and write operation to the DDR4 SDRAM are burst oriented, start at a selected location, and continue for a burst length of eight or a ‘chopped’ burst of four in a programmed sequence. Operation begins with the registration of an ACTIVATE Command, which is then followed by a Read or Write command. The address bits registered coincident with the ACTIVATE Command are used to select the bank and row to be activated (BG0-BG1 in x4/8 and BG0 in x16 select the bankgroup; BA0-BA1 select the bank; A0-A17 select the row; refer to “DDR4 SDRAM Addressing” on datasheet). The address bits registered coincident with the Read or Write command are used to select the starting column location for the burst operation, determine if the auto precharge command is to be issued (via A10), and select BC4 or BL8 mode ‘on the fly’ (via A12) if enabled in the mode register. Prior to normal operation, the DDR4 SDRAM must be powered up and initialized in a predefined manner. The following sections provide detailed information covering device reset and initialization, register definition, command descriptions, and device operation.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值