专栏首页陌上风骑驴看ICcombinational clock gating Vs sequential clock gating

combinational clock gating Vs sequential clock gating

关于clock gating 已经写过:《clock gating | 从ICG cell 在 library 中的定义说起》《clock gating | Gating 的插入与验证》《clock gating | clock gating 的timing check》《clock gating | ODC-based Clock Gating》。最近在学习Joules 20.1 update training 时又接触到了两个新概念:combinational clock gating 跟 sequential clock gating, 觍着老脸去问研发大爷这是啥,大爷说:你丫不能自己谷歌一下吗?于是在ElectronicDesign 上找到了一篇好文章,深入简出地描述了两者的区别。

概括来说,combinational clock gating 就是通常所说的clock gating, 它不改变电路的逻辑功能,对设计实现影响没有,但是它只能省掉clock 的多余toggle.

Sequential clock gating 的搜索空间更大,在时序路径多级寄存器之间进行分析,找到所有冗余的翻转,该类Gating 通常有两种:

  • observability-based clock gating, writes done to a register are unobservable down-stream. Following is an example of the first type, where under some conditions, writes to a register will never be observed at the design output. If the signal vld_2 is low in a particular cycle, the register dout retains its older value. This means that writes that would have happened in register d_2, one cycle back and in d_1, two cycles back are redundant. Observability-based clock gating identifies this redundant write and adds a suitable gating condition based on the vld signal.
  • stability-based clock gating, writes requires multi-cycle analysis of the design. Following shows an example of the second type of redundant writes. This is where the same value gets written to registers across consecutive clock cycles. When the signals vld_1 and vld_2 are low, registers f_1 and g_1 retain their previously held values. Consequently, values written into registers f_2 and g_2 in the next clock cycle are identical to what was written into them in the previous cycle. Stability-based clock gating identifies the redundant write and adds a suitable gating condition using a one-cycle delayed version of vld_1 for f_2 (and similarly, a one-cycle delayed version of vld_2 for g_2).

下面一部分原文照办,包括:

  • 如何分析设计找到可以插入Sequential clock gating 的点。
  • Sequential clock gating 可以多省哪些power.
  • Sequential clock gating 对设计验证有哪些影响。
  • 目前业界如何做Sequential clock gating.

Identifying Sequential Clock Gating Opportunities

Combinational clock gating has been part of RTL synthesis tools for several years and has become dependable for optimizing for power. Very rarely do synthesis tools miss a combinational clock gating opportunity. Yet, in certain cases the self-assignment to a register uses complex logic (either spanning multiple design hierarchies or written as separate functions) that may cause difficulties for RTL synthesis tools in identifying combinational clock gating. In such cases, designers simplify the complex logic and rewrite it as an “if” statement on the register assignment, thereby simplifying the job of RTL synthesis tools. However, identifying sequential clock gating opportunities is beyond the scope of RTL synthesis tools. Power conscious designers try to analyze the registers for redundant accesses (unobservable or stable writes) and look for conditions under which such accesses can be shut off. There is no single known method of achieving this, and designers mostly develop this expertise over time. Even so, the process can get very tedious and error prone without suitable assistance.

Sequential clock-gating tools introduced to the market either aid the manual exploration of sequential clock gating opportunities or do it automatically. Designers pick the desired methodology (manual versus automated) based on their schedule and comfort with letting a tool make the decisions for them. The tool must fulfill some requirements to make the job of an RTL designer easier, regardless of whether it is used in an automated or manual exploration mode:

  • Early feedback about possible total power savings through the elimination of redundant writes to registers
  • Clock gating expressions and directions about how to put them into the RTL and additionally, provide a way to change the expressions so that users can configure them to suit their requirements (ease of patching, size of expression, etc.)
  • Accurate estimates of power savings and area cost for the clock gating expressions
  • If the tool misses creating some clock gating expressions, then feedback must be provided to the user about the potential power savings and the changes (RTL, tool constraints, etc.) that the user can make to help realize those expressions

Such a flow will inform the designer very early on whether a significant potential for power optimization exists in the design. If not, the designer can focus solely on objectives like area and performance. The level of scope will also indicate how much effort should be put towards power optimization. Since the designer understands the power impact of each potential change (putting in a clock gating expression, an RTL or constraints change, the registers with most power saving potential, etc.), the designer can prioritize changes based on delivery schedule. On completion of the sequential clock gating tool’s run, the designer will know how much of the total potential power savings has been realized for the design.

Impact of Sequential Clock Gating on Power

Estimating the power saving potential of a combinational clock gating expression is relatively easy. The change in power of a clock-gated register is computed after reducing the switching activity of the clock net driving the register. The signal that disables the clock net is present in the design, and it is easy to compute its impact on the switching of the clock net by using combinational switching activity propagation techniques. However, sequential clock gating alters the sequential nature of the design. For example, to perform observability-based clock gating for the circuit shown in Figure 2, signal vld_1 will be used to gate the clock going to register d_2. This will not only change the clock toggles but also the toggle activity at the output of register d_2, which in turn will impact switching activity of the entire fanout of register d_2. Following shows the region (shaded) where switching activity would change as a result of sequentially clock gating register d_2. If only the impact on register power is reported, then a potentially good clock gating expression (since it could have saved a large amount of datapath power) might get rejected.

Hence, to compute accurate power, switching activities for all affected signals and new signals need to be computed. The tool must take the actual power saving impact of a sequential clock gating change into account while making optimization decisions or when presenting the opportunity to the user. An automated tool has to evaluate hundreds and thousands of such gating expressions, so the power computation must be very quick, and at the same time the accuracy of computation should not be compromised.

Verification Impact

The act of combinational clock gating does not change the functionality of the registers in the design, and hence, traditional logical equivalence checkers (LEC) can be used to verify the correctness of such clock gating transformations. Sequential clock gating, on the other hand, changes the sequential nature of the design. For example, if register d_2 in Figure 2 is gated using signal vld_1, then its output is no longer identical to the original design. However, the design output remains unchanged. Traditional LEC tools cannot verify the equivalence of such changes since they require that the register behavior of the two designs being verified is identical. Sequential logic equivalence checkers (SLEC) on the market can help verify the correctness of sequential changes made to the design (like pipelining, retiming, rescheduling, clock gating, etc.). Such tools can be deployed to verify the correctness of sequential clock gating changes. Users must be aware of the following requirements for verifying the correctness of clock gating changes:

  • The optimization tool itself cannot make claims about the correctness of the changes it makes
  • The verification tool should be able to independently verify the correctness of sequential changes made to the design (either by automation or manually)
  • Verification should be fast and formal
  • Simulation vector-based verification cannot guarantee the correctness of sequential changes since the bug could be several cycles deep and could remain undetected

Design Flow Support

Combinational clock gating is already present as an internal optimization step in all RTL synthesis tools. RTL synthesis tools themselves support various design flow requirements: bottom-up, engineering change orders (ECO), etc. However, sequential clock gating is still an intermediate stage in the design flow. Either the designer is doing it manually or an automated tool is making such changes to the RTL. For an automated tool, the requirements for writing changed RTL include: complete support for all HDLs (SystemVerilog, Verilog, VHDL, etc.) and a mix thereof;minimal changes to the RTL (preserve all user comments, formatting, and pre-processor directives like macros, defines, includes, etc.); comprehensive configurability of the written-out RTL so as to support Lint rule requirements specific to individual design houses; and clock gating changes written in such a way that they are understood and honored by RTL synthesis tools.

If the sequential clock gating tool is sitting in an automated design flow, then it needs to provide the complete support for ECOs. An ECO change in the RTL could potentially make some of the optimizations done by the automated tool invalid. The requirements for an automated tool for ECO support are:

  • Only drop those optimizations which are invalid, and no more
  • The output RTL should be identical to the RTL output from the previous run (other than the changes required to make some optimizations invalid)
  • Clear directives on how the invalidation of some optimizations would be achieved in the gate-level netlist
  • Work in conjunction with RTL synthesis tools to achieve the desired ECO at the gate level

Several other considerations are important. For example, optimizations must be timing aware, and there must be a way to factor in feedback from the specific RTL synthesis tool used.

Optimizations should not introduce any clock domain crossing violations. Finally, automation is necessary to cover various aspects of the optimizations such as discovering the clock-gating expressions, evaluating their power savings and automatically inserting them into the RTL, as well as handling other stages in the design flow. The latter include verification, clock-domain checks, and integration of the sequential clock-gating tool with mainstream RTL synthesis tools.

Conclusion

Sequential clock gating provides significant power savings because it not only switches off the clock going to registers but also the datapath logic in the fanout of gated registers. However, RTL synthesis tools are not capable of identifying sequential clock gating opportunities. Fortunately, recently introduced sequential clock-gating tools either automate this process or facilitate manual exploration of sequential clock gating opportunities, helping RTL designers achieve lower power designs. Sequential clock-gating brings unique challenges of its own for power estimation, verification, and design flow support, all of which an automatic tool must solve to provide the best power savings in the shortest time.

本文分享自微信公众号 - 陌上风骑驴看IC(MoShangFengQiLv),作者:陌上风骑驴

原文出处及转载信息见文内详细说明,如有侵权,请联系 yunjia_community@tencent.com 删除。

原始发表时间:2021-01-06

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 论综合 | 是什么让一个数字前端实现硅农开始学习Floorplan 的?

    如题,是什么让一个数字前端实现硅农开始学习Floorplan 的?是制造工艺的进步,是实现方法学的被迫更新,是养家糊口生的本能,正可谓:头发落完终不悔,为伊消得...

    老秃胖驴
  • P&R | 物理设计流程概述

    题记,VLSI System Design 上的这篇文章其实没什么实质性的内容,只是一个特别特别笼统的概述,而且由于年久失修,某些地方的概念欠完备,但该文趣味十...

    老秃胖驴
  • P&R | 如何在实现全流程中考虑IR-Drop

    随着工艺进步,芯片上的线宽越来越窄,单位电阻也越来越大,而同时设计的复杂度也越来越高,芯片尺寸非但没有减小还长得更大了,以至于绕线越来密集,这对电源完整性提出了...

    老秃胖驴
  • cf--------(div1)1A. Theatre Square

    A. Theatre Square time limit per test 2 seconds memory limit per test 64 meg...

    Gxjun
  • python socket.recv(

    感觉很是奇怪,自己没有去设置阻塞模式,也就是默认的阻塞模式,为什么不阻塞在那里,而是要一直收到空呢?

    py3study
  • 加权Q学习的深度强化学习(CS AI)

    对最大动作值的高估是一个众所周知的问题,它阻碍了Q学习的性能,导致次优策略和不稳定的学习。在为解决此问题而提出的几种Q学习方法变体中,加权Q学习(WQL)有效地...

    RockNPeng
  • HDUOJ-----Robot Motion

    Robot Motion Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768...

    Gxjun
  • COVIDScholar:一个自动化的新冠肺炎研究聚合和分析平台(CS DL)

    正在进行的新冠肺炎大流行在全社会产生了深远的影响,科学也不例外。科学界对新冠肺炎响应的规模,速度和广度导致了规模惊人的新研究文献的涌现——截至2020年10月,...

    毛艺漩8078803
  • Spark笔记

    基础版:https://tech.meituan.com/2016/04/29/spark-tuning-basic.html

    DuncanZhou
  • 学会用多尺度负抽样来选择外部知识(CS CL)

    DSTC9的Track-1旨在有效地回答用户在面向任务的对话中提出的请求或问题,这些请求或问题不在API/DB的范围内。通过利用外部知识资源,可以检索相关信息并...

    谭雪儿

扫码关注云+社区

领取腾讯云代金券

,,