PTPX仿真
网上有的文章对此有误解。
使用PTPX进行功耗分析有两种:一种是平均功耗的分析(Averaged power analysis),一种是基于时间的功耗分析(Time-based power analysis)。
在平均功耗分析(Averaged power analysis)中常出现三个名词,分别是switching activity, toggle rate以及static probability。
其中toggle rate (Tr) = Number of toggles/仿真时间,也就是单位仿真时间内的信号翻转次数。
static probability (Sp) 是某个节点是逻辑为1的概率。
假设对于占空比为50%的时钟信号,周期为20ns,如下图所示:
则Tr=4/40ns = 0.1;
Sp=20/40=0.5
那么switching activity和上面两个变量之间的关系则是包含关系。
一般来说当我们设置某个节点的Tr或者Sp时,采用的语法是:
set_switching_activity -static_probability [get_nets a]
set_switching_activity -toggle rate [get_nets a]
同样,我们可以使用get得到某点的Tr及Sp:
get_switching_activity -static_probability [get_nets a]
get_switching_activity -toggle rate [get_nets a]
而当直接使用get_switching_activity [get_nets a]时,则可以同时显示Tr和Sp。
同样,当使用reset_switching_activity [get_nets a]时,则该点的Tr与Sp设置全部移除。