小时候下田锄地拔草,连续劳作超过三天,晚上睡着后就会梦到无边无边的野草把麦子豆子遮得严严实实的,最近晚上经常梦到功耗,leakage, internal, switch, glitch, toggle rate, condition, correlation —— 老驴也码过若干功耗优化功耗计算的文章,最近一篇是《低功耗 | 从综合到PostRoute 功耗的Gap 有多大》。
Transport Glitch: cell 输出在到达稳定状态前的无效翻转,这类翻转消耗的功耗跟正常翻转一样,Joules 目前只分析这类Glitch power—— Transport glitches are extra transitions at the output of the gate before the output signal reaches its steady state. A transport glitch consumes the same amount of power as the normal transition. The pulse width of the transport glitch is more than the gate delay and does not contribute to the functional behavior of the circuit.
Inertial Glitch: cell 输入翻转由于宽度小于cell delay 未传到cell 输出,这类翻转会对cell 的input pin 跟内部结点电容充放电,故消耗功耗,Joules 目前还不支持这类Glitch power 的分析—— These are transitions which may occur at the input of the gate. However, they will not be propagated to the output, as the pulse width of the glitch is smaller than the gate delay.
Joules 分析Glitch Power 的过程为:
Identifying a glitch: 如果一次toggle 发生在一个时钟周期内,则该次toggle 被认为是一个毛刺;如果一次toggle 是跨时钟周期的,则该次toggle 不被当做毛刺——Get the clocks reaching (both in and out clocks) the given combination and find out the fastest among them. Get the waveform of the clock; if the two toggles of data signal (going from 0 -> 1 -> 0, or vice versa) fall within a clock cycle, it is a glitch. If the two toggles are across the clock cycle, it is not a glitch. The clock cycle considered is --|__ for positive triggered and __|-- for negative triggered. If there is a pin that goes from PI to PO without any clock, the glitches are not identified for them.
Criteria used for considering transitions as a glitch: 工具进一步依据预订规则筛选第一步识别出的Glitch.
在Joules 里可以用如下命令做进一步分析:
谈到Glitch Power 通常一定会聊到的两个问题是:
Glitch Power 在设计中占多大比例:这是个无解的问题,这完全依赖于设计特性,通常data path 越长Glitch power 越大,但占多大比例取决于设计特征、工艺、工作场景等。
如何优化Glitch Power, 在《Glitch, Glitch, Glitch》中罗列了一串论文跟若干种方式,其中看似最有效的是logic balance —— 而logic balance 要涉及到在哪个corner, 在哪种应用场景去做balance, 还要考虑在logic balance 插入的cell 所消耗的功耗是否小于所消除的Glitch Power? 另一个问题是,logic balance 一定是需要仿真波形的,而在新工艺点,不论是AOCV 还是SOCV 都无法将variation 部分精确地写到SDF 中,那么后仿的精度偏差是无法避免的,那得出的波形是否可以真实的反应实际工作场景?等等这些因素,让Glitch Power 的优化几乎成了玄学的一个分支,它属灵!也许最有效的手段还是要从架构算法设计入手,让懂电路的人写精致的代码!
C 记实现端的工具都有report leaf cell 功耗计算的命令,该命令对于debug power 有巨大帮助,工具会列出leakage, internal power, switch power 每一项详细信息,包括arc, condition, toggle rate, probability, cap, slew 等信息。
Genus, Voltus, command: report_instance -power -detail XX
Innovus, report_inst_power XXX
Joules, get_inst_power -show_details XX
驴说IC