论文解读:门控时钟的gating ratio如何提升

如何让一个clock gater能够gate更多的flip-flops?
如果两个flip-flops的enable和clk相同,那自然可以用同一个clock gater来gate。一般来说,一个module中的flip-flops的clk基本是同一个的,但是它们的enbale就可能千差万别了。这里,解析优秀论文中,如何将两个enable相似的flip-flops用同一个clock gater来控制

论文解读

芯片的动态功耗有30% ~70%是来自系统的时钟信号。降低动态功耗的方法中,最主要的是时钟门控技术。
Clock gating is very useful for reducing the power consumed by digital systems.
时钟门控对于数字系统的功耗降低非常有用。常见的gating方法有三种。

  1. synthesis-based
    一种最常用的方法,基于底层系统逻辑推导出clock enabling 信号。提出各种启发式算法,来增加时钟门控机会。适用于register-file based circuits。

(缺点)The switching of a significant portion of the system’s clock load is redundant, but consumes most of its power.
它大部分的驱动FFs的clock pulses都是无用(redundant)的,其时钟脉冲的利用率可能仍然很低。

  1. data-driven
    数据驱动方法可以停止大多无用cock,节省很多的功耗,但是它的实现非常复杂,且application dependent。适用于control and arithmetic circuits。

缺点:

  • 实现复杂。
    To maximize the power savings, the FFs should be grouped such that their toggling is highly correlated.
    如何将 FFs 分组,以使它们的切换高度相关,是个难题。
  • 严格的时间约束。数据驱动的门控电路要在很短的时间内可以正常工作,这样的限制可能会排除5% -10% 的 FFs ,具体视电路结构而定
  • application dependent。
  1. auto-gated FFs (AGFF)
    AGFF比较简单,但节省的功耗也较少。延伸的方法有LACG等。
    缺点:首先,只有从锁存器是门控的,另一半的时钟负载没有门控。其次,对于在关键路径上的 FFs 施加严格的时间约束,避免了它们gating。

1 《Adaptive Clock Gating for Shift Register Based Circuits》

This paper proposes a systematic way to achieve additional dynamic power savings based on the correlation of flip-flops’ activities.
Assessing the effectiveness of clock gating may require therefore, extensive simulations, trace derivation and statistical analysis of sequential elements activity.

这是一种data-driven的方法。本文提出了一种基于FF activities的相关性来实现额外的动态功耗降低的系统方法。因此,评估时钟门控的有效性可能需要对时序元件的activity进行广泛的模拟、跟踪推导和统计分析。

1.1 设计思路

对FF当前的output和下一个周期的输入data进行 XOR(比较),可实现对FF下个周期的clock进行disable。
f1
Figure 1: Enabling ofthe clock signal.

如果知道几个FF大多时间都是同时触发clock的,就可以用一个 common gater 来控制这几个FF,这样降低同等的power,可以用更少的gater。将这些异或门 OR起来,就得到 FFs 的joint gating信号,作为ICG的输入。图2展示了如何将k个不同FFs的 elk_enable信号连接到同一个gating信号上。

在这里插入图片描述
fig 2. Joining k enabling signals generated by distinct flip-flops into one gating signal

举例如下。3(a)中,在10个周期内,每个时钟周期都对应一个 elk __enable值。总共20个clock pulses,14个是可disable的,便可节省70%功耗 。图3(b)共用一个joint gated clock,时钟切换功耗节省了60% 。显然,获得effective joint clock gating的关键是找到大量具有相似触发的FFs。

A simple example is shown in Fig. 3(a) where each clock cycle produces the appropriate value of elk_enable for a period of 10 cycles. Clocking each flip-flop separately, 14 clock pulses are disabled out of the total 20, yielding 70% savings in the cost of two AND gaters. Fig. 3(b) generates a joint gated clock with the aid of the gater in Fig. 2. As shown, while a single gater is used, the clock toggling power saving reduced to 60%. Obviously, a key factor in obtaining effective joint clock gating is in finding large groups of flip-flops having similar toggling.

在这里插入图片描述fig 3.Example of joint gated clock

难点:如何将切换活动高度相关的 FFs 分到一组。

It is beneficial to group FFs whose switching activities are highly correlated.
To maximize the power savings, the FFs should be grouped such that their toggling is highly correlated.

为了最大地减少功率,哪些 FFs 应放在一个group中,如何找到这些groups。 这是个难题,也是个trade-off,disabled clock pulses的数量和gater数量之间的权衡。

1.2 Accurate formulation of flip-flop grouping problem

本文提出了一种解决LFSR的最大FF group activity 相关性的算法。

LFSR (Linear Feedback Shift Register) is a well-known circuit for pseudo-random number generation.

LFSR (线性反馈移位寄存器)是一种常见的伪随机数产生电路。由于FF是以伪随机方式切换的,因此,disable FF不必要的 clock pulses可以降低power。
定理如下。
在这里插入图片描述
在这里插入图片描述

举例:
在这里插入图片描述
前两列每个只包含两个1,因此这俩FF的时钟disable是高度相关的,证明了两个 MSB 共享一个common gater的合理性。MSB 共享gater非常有用,可以节省硬件资源,产生的不必要的FF clocks很少。LSBs 共享gater不是很有效,因为它会产生很多不必要的FF clocks。
一般来说,由于 M’列中的1是相互排斥的(除了第一行) ,任何一对FF共享一个common clock gater,与独自使用 clock gater相比,FF clock pulses数量增加了一倍。尽管如此,与不用gating的 N (2N-1)时钟脉冲总量相比,这种增加是很小的。另一方面,clock gaters的数量已经从 N 减少到 N/2。
MSB:most significant bit, 最高有效位。
LSB:Least Significant Bit,最低有效位。

1.3 others

电路实现图如下。
在这里插入图片描述fig.4 Circuit implementation of data-driven clock gating
Application of clock gating with feedback enabling signals. 红色部分是 clock gater,蓝色部分是FF。

缺点:

  • data-driven clock gating要在很短的时间内可以正常工作, 如下图。XOR、 OR、latch和 AND 门的累积delay 不能超过 FF 的setup time。这样的限制可能会排除5% -10% 的 FFs ,具体视电路结构而定。

在这里插入图片描述fig.5 Sequencing of gating logic in data-driven clock gating.

  • application dependent。其优化需要 FFs 的数据切换 向量的知识。并且,在一般的电路中,LFSR并不多,本文所提方法缺乏普适性。

2 《The Optimal Fan-Out of Clock Network for Power Minimization by Adaptive Gating》

承接上文,如何找到最合适的k。

3《A Look-Ahead Clock Gating Based onAuto-Gated Flip-FlopsShmu》

本文提出了一种Look-Ahead Clock Gating (LACG)方法。

LACG computes the clock enabling signals of each FF one cycle ahead of time, based on the present cycle data of those FFs on which it depends. A closed-form model characterizing the power saving per FF is presented. It is based on data-to-clock toggling probabilities, capacitance parameters and FFs’ fan-in. The model implies a breakeven curve, dividing the FFs space into two regions of positive and negative gating return on investment. While the majority of the FFs fall in the positive region and hence should be gated, those falling in the negative region should not. Experimentation on industry-scale data showed 22.6% reduction of the clock power, translated to 12.5% power reduction of the entire system.

基于 FF 的现有 cycle data ,LACG 提前one cycle计算每个 FF 的 clock enabling signals。FF 功耗减少模型,是基于data-to-clock的切换概率、电容参数和 FFs 的扇入。该模型包含一条盈亏平衡曲线,将 FFs 空间划分为正gating 效益和负gating 效益两块。大多数 FFs 属于正区域,因此应被gated,若在负区域,则 FFs 不该被gated。

3.1 AGFF

FF 的主锁存器在时钟的下降沿变得透明,其输出必须在时钟上升沿到达前的setup时间之前稳定下来;当主锁存器变得不透明时,XOR将指示从锁存器是否应该改变其状态时。若不改变,时钟脉冲将停止,否则将被传递。
在这里插入图片描述fig.3.1 An auto-gated flip-flop.

AGFF 有两个主要缺点。首先,只有从锁存器是门控的,另一半的时钟负载没有门控。其次,对于在关键路径上的 FFs 施加严格的时间约束,避免了它们gating。

AGFF has two major drawbacks. Firstly, only the slave latches are gated, leaving half of the clock load not gated. Secondly, serious timing constraints are imposed on those FFs residing on critical paths, which avoid their gating.

3.2 LACG

LACG 改进了AGFF,解决了三个目标:
①在主锁存器中也停止了时钟脉冲,②使其适用于大型和通用设计,③并避免了tight的时间限制。

LACG 是用图3.1中的XOR输出来生成其他 FFs 的时钟enable信号。不过,XOR输出只在时钟上升沿期间有效。为了在整个正半周期有效,应latch,如图3.2(a)所示。图3.2(b)是异或输出增强 AGFF 的符号。
The power consumed by the new latch can be reduced by gating its clock input .新的锁存器所消耗的功率可以通过 gating其时钟输入来降低。
在这里插入图片描述fig.3.2 Enhanced AGFF with XOR output used for LACG.

target FF’’ and source FF’. A target FF depends on source FFs. It is re- quired that the logic driving a target FF does not have an input externally of the block.
在这里插入图片描述
fig.3.3 LACG of general logic.工作原理

优点:

  • 类似于data-driven clock gating,它能disable大多数不必要的(redundant )时钟脉冲。
  • 不必遵守 AGFF 和data-driven的严格时序约束。
  • 实现简单,application independent。与data-driven clock gating(其优化需要 FFs 的数据切换向量的知识)不同,LACG 独立于 FFs 的数据切换向量。在 RTL 函数代码中嵌入 LACG 逻辑是唯一定义的,并且很容易从底层逻辑派生出来,与目标application 无关。

①Similarly to data-driven gating, it is capable of stopping the majority of redundant clock pulses.
②It avoids the tight timing constraints of AGFF and data-driven by allotting a full clock cycle for the computation of the enabling signals and their propagation.
③Furthermore, unlike data-driven gating whose optimization requires the knowledge of FFs’ data toggling vectors, LACG is independent of those. The embedding of LACG logic in the RTL functional code is uniquely defined and easily derived from the underlying logic, independently of the target application. This simplification is advantageous as it significantly simplifies the gating implementation.

  • 0
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值