# Power Issue ###### tags: `Digital IC Design` [回到主頁面](https://hackmd.io/@derek8955/BkK2Nb5Jo/https%3A%2F%2Fhackmd.io%2FdpcBlBL8TlShpQ-wSi9Quw) CMOS功耗可以分成以下兩種: - Static power(又稱作Leakage Power): 由於製程特性導致在CMOS關閉時有小量的漏電流所造成的功率消耗 - Dynamic power: Internal Power + Switching Power - Internal Power: 在CMOS導通瞬間,需要一段轉態時間(Transition Time),在這 過程中可能會同時NMOS與PMOS都導通,進而產生一條短路電流,造成功率消耗 - Switching Power: 切換電流與負載電容充放電所造成的功耗 |![image](https://hackmd.io/_uploads/By_M7J-v0.png)| |:---:| |Dynamic Power Consumption| |![image](https://hackmd.io/_uploads/rJa0XJ-w0.png)| |:---:| |Short Circuit Power| 低功耗的重要性 --- 1. Power上升 -> 溫度上升 -> 安全性下降 2. 耗電過高不利於邊緣設備的硬體限制,如手機, 平板 ...等 Dynamic Power --- - Switching Power(Dominate): |![image](https://hackmd.io/_uploads/ryxKUTGewA.png)|![image](https://hackmd.io/_uploads/SyGbmk-vR.png)| |:---:|:---:| |None|由於動態消耗只會在訊號有轉變的時候發生,因此進一步考慮觸發參數| - Short Circuit Power(Internal Power): |![image](https://hackmd.io/_uploads/rJKKB1bvC.png)| |:---:| |![image](https://hackmd.io/_uploads/Hk-3r1WDA.png) ![image](https://hackmd.io/_uploads/SJyaH1bwC.png)| tsc簡單來說就是 MOS 的 Transition time。此外short circuit power 其實也跟toggle rate有關,但公式內沒有表明。 - Resolution: 1. Multi-Voltage |![image](https://hackmd.io/_uploads/r13lJmePR.png)| |:---:| 給定不同區塊不同的供給電壓,需要更高性能的模塊再使用較高的電壓。須添加level shifter以切換不同 clock domain 2.Clock Gating: 由於Clock的loading很高,因此關閉訊號不必trigger的地方,關閉後僅會有靜態功耗產生如下圖所示,詳見 [Clock Gating 筆記](https://hackmd.io/@derek8955/SkeOMZKzo) |![image](https://hackmd.io/_uploads/B19nYyZwR.png)| |:---:| |Clock Gating Power Redunction| 3. Power Gating: 直接關閉區塊電源,但因為此技術會加入一些Gating電路,因此仍會造成部分靜態的功率消耗,僅能減少不能完全消除,如下圖所示。詳細說明待補 |![image](https://hackmd.io/_uploads/Sk8XoCev0.png)| |:---:| |Power Gating Power Redunction| Leakage Power --- CMOS電路中由於會有微電流產生,造成些微的靜態功率消耗有以下幾點: - Sub-threshold Leakage Current(ISUB):當MOS處於關閉狀態時,MOS Drain跟Source之間的漏電流 > 主要由ISUB主導靜態功率消耗 |![image](https://hackmd.io/_uploads/SyGd2dzDA.png)| |:---:| - Gate Leagage(IGATE):由於電流直接從閘極流過氧化物,閘極氧化物隧道效應和熱載子注入所產生的 Gate Leakage Power - Reverse Bias Junction Leakage (IREV): MOS內本身的反向二極體所產生的漏電流,即下圖的Drain junction leakage - Gate Induced Drain Leakage (IGIDL):由 MOSFET 汲極中的High Filed Effect引起從汲極流向基板的電流,而High Filed Effect是由高VDG電壓所導致的。 |![image](https://hackmd.io/_uploads/BJ0PqOMPA.png)| |:---:| 隨著製成的演進,CMOS的Subthreshold逐漸下降,使得在越先進的製程靜態功耗甚至超越動態功耗。 - Solution: Multi-Vth,在design中引入不同的CMOS臨界電壓 - Vt下降 -> MOS越容易倒通 -> Subthreshold Current上升 -> 速度變快但更耗Power What we can do in the design level --- - 降低FSM訊號轉態,例如FSM設計時可以用One-Hot Encoding或Gray Code(因為每次切換狀態只會改變其中一個bit) - 降低面積,面積越大功耗肯定越大,例如設計Data Reuse或優化演算法 - 刪除不必要的資料轉態,例如適當停止不必要的Counter計數 - Data Gating:(思考一下下方電路,最終邏輯會相同) ```verilog= // Bad Code assign out = sel?A:A*B; // Good Code assign multin0 = sel & A; assign multin1 = sel & B; assign out = sel? A:multin0*multin1; ``` - 選用Multi-Vth設計,High Vth跑比較慢但功耗相對低; Low Vth跑比較快但功耗相對比較高。因此可以根據Design情形,在非Critical Path 上使用High Vth 的Cell - 依據SPEC,若Performance允許,降低處理頻率、供給電壓 - [CDC](https://hackmd.io/@derek8955/BkK2Nb5Jo/https%3A%2F%2Fhackmd.io%2FBQ8rbz6pSN2wYYt4PcmyKw) & Clock Switch Reference --- https://www.design-reuse.com/articles/52663/multi-voltage-soc-power-design-technique.html https://www.cnblogs.com/-9-8/p/5487239.html https://link.springer.com/book/10.1007/978-0-387-71819-4