利用DC对RTL设计的动态功耗进行评估,主要可以分为以下步骤:
 
- 用vcs编译运行testbench,生成.saif文件(Switching Activity Interchange Format)
 - 在Design Compiler编译前,读入.saif文件
 - Design Compiler编译完设计文件后,输出功耗报告
 下面通过一个计数器的设计,来演示该过程。 
 
rtl代码
 
module counter
(input   wire clk ,input   wire rst_n ,input   wire en ,output  reg  [31:0] cnt
);always@(p