扫码加入

  • 正文
  • 相关推荐
申请入驻 产业图谱

低功耗设计中UPF文件常用的14种命令

2025/11/17
3279
加入交流群
扫码加入
获取工程师必备礼包
参与热点资讯讨论

在IEEE 1801-2018种一种有60多种命令,本文介绍一下UPF中常用的14种命令,分别是set_scope,create_power_domain,create_supply_port,create_supply_net,connect_supply_net,set_domain_supply_net,create_power_switch,map_power_switch,add_port_state,create_pst和add_pst_state,set_level_shifter,set_isolation,set_retention以及map_retention_cell。

1. set_scope

表1是set_scope命令的说明表。

表1 set_scope命令说明表

命令 set_scope
作用 指定适用范围
语法 set_scope instance
常用Option及其作用 instance 命令的有效适用范围为指定的instance,一般为不同的hierarchy层次

假设当前设计为top,该设计有/top/mid/bot三个hierarchy层次,且当前所处的hierarchy层次为/top,那么如下的四个命令的作用分别如下。

set_scope /top/mid/bot:将当前的scope切换到/top/mid/bot。

set_scope . : 保持当前的scope不变。

set_scope /: 将当前的scope切换到/top。

3. create_power_domain

表2是create_power_domain命令的说明表。

表2 create_power_domain命令说明表

命令 create_power_domain
作用 定义电压域及其特性
语法 create_power_domain domain_name

[-atomic]

[-elements element_list]

[-subdomains domain_list]

[-exclude_elements exclude_list]

[-supply {supply_set_handle [supply_set_ref]}]*

[-available_supplies supply_set_ref_list]

[-define_func_type {supply_ function pg_type_list}]*

[-update]

常用Option及其作用 domain_name 定义当前scope下的电压域的名称
-elements element_list 添加到该电压域的的单元集合,可以给一个hierarchy层次,也可以给单元集合
-exclude_elements exclude_list 从该电压域中排除的单元集合
-supply

{supply_set_handle

[supply_set_ref]}

指定该电压域的supply set方案,supply_set_handle是主supply set,也称之为primary supply set;supply_set_ref(如果有)一般是指其他状态下的supply set,可以有多个supply_set_ref
-available_supplies

supply_set_ref_list

可供该电压域使用的附件的supply set,一般为常开的supply set,供插入到该电压域的low power cell使用

如下命令创建了一个名为PDCPU的电压域,其对应的组成单元为当前scope的hierarchy层次下的所有单元,其有primary和retention两套supply set:

create_power_domain PDCPU -elements {.}  -supply {primary}  -supply {retention}

4. create_supply_port

如表3,是create_supply_port命令的说明表。

表3 create_supply_port命令说明表

命令 create_supply_port
作用 定义和创建电压域的电源或地的supply port
语法 create_supply_port port_name

[-domain domain_name]

[-direction]

常用Option及其作用 port_name 指定port name
-domain

domain_name

该port对应的supply set对应的电压域
-direction 该port的direction,默认是in

如下命令定义了一个名为VN1,direction为inout的supply port:

create_supply_port VN1-direction inout

5. create_supply_net

如表4,是create_supply_net命令的说明表。

表4 create_supply_net命令说明表

命令 create_supply_net
作用 创建一个supply net
语法 create_supply_net net_name

[-domain domain_name][-reuse]

[-resolve]

常用Option及其作用 net_name 指定该supply net的名字
-domain domain_name 指定该supply net是为哪个电压域创建的
-reuse 将之前给别的电压域创建的supply net扩展其使用范围到当前的电压域
-resolve

parallel_one_hot >

指定该supply net的state和voltage解析方式,默认是unresolved。

lunresolved:该supply net最多连接到一个supply source。

lone_hot:supply net具有多个supply source,但同一时间只有一个supply source的source drivers变换状态。

lparallel:supply net具有多个supply sources,但这些supply sources共用一个source driver。

lparallel_one_hot:supply net具有多个supply sources,这些supply sources中至少有两个supply sources共用一个source driver。

其中supply net是供电网络,supply source是供电电源,source driver是电源驱动。

如下命令创建了一个名为local_vdd_3,其状态的解析方式是one_hot的supply net:

create_supply_net local_vdd_3 -resolve one_hot

6. connect_supply_net

如表5,是connect_supply_net命令的说明表。

表5 connect_supply_net命令说明表

命令 connect_supply_net
作用  将supply net和supply ports连起来
语法 connect_supply_net net_name

[-elements element_list ]

[-ports port_list]

[-pg_type pg_type_list]*

[-vct vct_name]

[-cells cell_list]

[-domain domain_name]

常用Option及其作用 net_name supply net的name
-ports port_list supply ports的list

如下命令将supply net VDDX连接到hierarchical层次I1/I2下的VDD logic port:

connect_supply_net VDDX -ports I1/I2/VDD

7. set_domain_supply_net

表6,是set_domain_supply_net命令的说明表。

表6 set_domain_supply_net命令说明表

  命令 set_domain_supply_net
作用 为电压域设置默认的电源和地的supply nets  
语法 set_domain_supply_net domain_name

-primary_power_net supply_net_name

-primary_ground_net supply_net_name

 
常用Option及其作用 domain_name 进行设置的电压域的名称  
-primary_power_net

supply_net_name

The primary power supply net  
-primary_ground_net

supply_net_name

The primary ground net  

如下命令指定PD1电压域的primary power supply net为VDD,指定primary ground net为VSS:

set_domain_supply_net PD1 -primary_power_net VDD -primary_ground_net VSS

8. create_power_switch

表7是create_power_switch命令的说明表。

表7 create_power_switch命令说明表

命令 create_power_switch
作用 定义power switch strategy
语法 create_power_switch switch_name

[-switch_type]

[-output_supply_port {port_name [supply_net_name]}]

{-input_supply_port {port_name [supply_net_name]}}*

{-control_port {port_name [net_name]}}*

{-on_state {state_name input_supply_ port {boolean_expression}}}*

[-off_state {state_name {boolean_expression}}]*

[-supply_set supply_set_ref]

[-on_partial_state {state_name input_supply_ port {boolean_expression}}]*

[-ack_port {port_name net_name [boolean_expression]}]*

[-ack_delay {port_name delay}]*

[-error_state {state_name {boolean_expression}}]*

[-domain domain_name]

[-instances instance_list]

[-update]

常用Option及其作用 switch_name 创建的switch cell实例的名字关键字
-switch_type

 

coarse_grain | both>

switch cell strategy的类型,包括fine_grain(细颗粒度) ,coarse_grain(粗颗粒度)和both(二者混用),默认是coarse_grain
-output_supply_port

{port_name

[supply_net_name]}

switch cell的output supply port name(或者叫output supply  pin)及该port连接的supply net name(可选),一般输出的是可关断电源
-input_supply_port

{port_name

[supply_net_name]}

switch cell的input supply port name(或者叫input supply  pin)及该port连接的supply net name(可选),一般输入的是常开电源
-control_port

{port_name

[net_name]}

switch cell的control port及其连接的信号net,一般是控制switch cell开启和关断的信号
-on_state {state_name

input_supply_ port

{boolean_expression}}

开启状态的状态名,控制状态开启的input supply port name及开启状态下对应的信号状态布尔表达式(例如控制信号为低时开启)
-off_state {state_name

{boolean_expression}}

关断状态的状态名以及关断状态下对应的信号状态布尔表达式(例如控制信号为高时开启)

如下命令创建了一个名字关键字为simple_switch的power switch strategy,其output supply port为vout,其input supply port为vin;其控制信号的input port为ss_ctrl,其开启状态名为ss_on(ss_ctrl为高电平开启),其关断状态名为ss_off(ss_ctrl为低电平关断):

create_power_switch simple_switch

-output_supply_port {vout}

-input_supply_port {vin}

-control_port {ss_ctrl}

-on_state {ss_on vin { ss_ctrl }}

-off_state {ss_off { ! ss_ctrl }}

9. map_power_switch

表8是map_power_switch命令的说明表。

表8  map_power_switch命令说明表

命令 map_power_switch
作用 指定物理实现中具体的电压域使用的switch cell strategy以及使用的library cell
语法 map_power_switch switch_name_list

-lib_cells lib_cell_list

[-port_map {{mapped_model_ port switch_ port_or_supply_net_ref}*}]

常用Option及其作用 switch_name_list 选用create_power_switch定义的switch cell strategy
-lib_cells lib_cell_list 使用的library cell
-port_map

{{mapped_model_port

switch_ port_or_supply_

net_ref } *}

将switch cell strategy中的port和library cell中的port进行一一映射,如果二者中的port name并不完全匹配,则必须使用该option进行映射匹配,否则会报错

如下命令使用了一个预先定义的叫作switch_sw1的switch cell strategy,其使用了sw1的library cell,并指明了switch cell strategy和library cell中的port的对应关系:

map_power_switch switch_sw1

-lib_cells {sw1}

-port_map {{inp1 vin1} {inp2 vin2} {outp vout}

{c1 ctrl_small} {c2 ctrl_large}}

10. add_port_state

表9是add_port_state命令的说明表。

表9 add_port_state命令说明表

命令 add_port_state
作用 定义supply port的状态
语法 add_port_state port_name

{-state {name}}*

常用Option及其作用 port_name supply port的name,hierarchical names也可以
-state {name  } supply port的state name及对应的值,这个值可以是标称电压(nominal voltage)或“off”

如下命令给VN1这个supply port定义了两个状态active_state(电源电压为0.90V)和off_state:

add_port_state VN1 -state {active_state 0.90} -state {off_state off}

11. create_pst

表10是create_pst命令的说明表。

表10 create_pst命令说明表

命令 create_pst
作用 创建power state table(PST)
语法 create_pst table_name

-supplies supply_list

常用Option及其作用 table_name 指定power state table的name
-supplies supply_list 组成power state table的supply nets或supply ports列表

如下命令创建了一个叫作PD_GPU_PST的power state table,其supply ports列表为PN1、PN2、SOC/OTC/PN3和FSW/PN4:

create_pst PD_GPU_PST -supplies {PN1 PN2 SOC/OTC/PN3 FSW/PN4}

12. set_level_shifter

表11是set_level_shifter命令的说明表。

表11 set_level_shifter命令说明表

命令 set_level_shifter
作用 定义level shifter cell strategy
语法 set_level_shifter strategy_name

-domain domain_name

[-elements element_list]

[-exclude_elements exclude_list]

[-source]

[-sink]

[-use_functional_equivalence []]

[-applies_to]

[-applies_to_boundary]

[-rule]

[-threshold]

[-no_shift] [-force_shift]

[-location]

[-input_supply supply_set_ref] [-output_supply supply_set_ref]

[-internal_supply supply_set_ref]

[-name_prefix pattern] [-name_suffix pattern]

[-instance {{instance_name port_name}*}]

[-update]

[-use_equivalence []]

常用Option及其作用 strategy_name level shifter cell strategy的name
-domain domain_name 该level shifter cell strategy所应用到的电压域
-elements element_list 应用到该level shifter cell strategy的实例单元和port列表
-exclude_elements exclude_list 不应用该level shifter cell strategy的实例单元和port列表
-source

<source_domain_name< span>          </source_domain_name<>

| source_supply_ref >

level shifter cell的源端,可以是电压域的name或supply set name,如果给的是电压域的name则代表源端是该电压域的primary supply
-sink

 

sink_supply_ref >

level shifter cell的目的端,可以是电压域的name或supply set name,如果给的是电压域的name则代表目的端是该电压域的primary supply
-applies_to

outputs | both>

限制level shifter cell strategy只应用到给定的direction的port上
-rule 限制level shifter cell strategy只应用到给定的能级移动方向,默认值是both
-location

parent | fanout | >

指定插入level shifter cell的hierarchy层次,“self”代表当前电压域所在的hierarchy层次,默认值是“self”
-threshold 限制level shifter cell strategy只应用到超过了一定的电压阈值的port

如下命令定义了一个叫作LS_INPUTS的level shifter cell strategy,其应用到的电压域为PD_SHUTDOWN,只应用到direction为input的port,其应用到低电压域到高电压域的能级流动方向,其插入在本电压域的所在的hierarchy层次:

set_level_shifter LS_INPUTS

- domain PD_SHUTDOWN

- applies_to inputs

- rule low_to_high

- location self

13. set_isolation

表12是set_isolation命令的说明表。

表12 set_isolation命令说明表

命令 set_isolation
作用 定义isolation cell strategy
语法 set_isolation strategy_name

-domain domain_name

[-elements element_list]

[-exclude_elements exclude_list]

[-source]

[-sink]

[-diff_supply_only []]

[-use_functional_equivalence []]

[-applies_to]

[-applies_to_boundary]

[-applies_to_clamp <0 | 1 | any | Z | latch | value>]

[-applies_to_sink_off_clamp <0 | 1 | any | Z | latch | value>]

[-applies_to_source_off_clamp <0 | 1 | any | Z | latch | value>]

[-no_isolation]

[-force_isolation]

[-location]

[-clamp_value <0 | 1 | Z | latch | value | {<0 | 1 | Z | latch | value>*}>]

[-isolation_signal signal_list [-isolation_sense*}>]]

[-isolation_supply supply_set_list]

[-name_prefix pattern] [-name_suffix pattern]

[-instance {{instance_name port_name}*}]

[-update

[-isolation_power_net net_name] [-isolation_ground_net net_name]

[-use_equivalence []]

常用Option及其作用 strategy_name isolation cell strategy的name
-domain domain_name 该isolation cell strategy所应用到的电压域
-elements element_list 应用到该isolation cell strategy的实例单元和port列表
-exclude_elements

exclude_list

不应用该isolation cell strategy的实例单元和port列表
-source

<source_domain_name< span>          </source_domain_name<>

| source_supply_ref >

isolation cell的源端,可以是电压域的name或supply set name,如果给的是电压域的name则代表源端是该电压域的primary supply
-sink

 

sink_supply_ref >

isolation cell的目的端,可以是电压域的name或supply set name,如果给的是电压域的name则代表目的端是该电压域的primary supply
-diff_supply_only

[]

默认值是true,用于告诉工具是否需要将连接到相同supply set的port使用isolation cell strategy
-applies_to

outputs | both>

限制isolation cell strategy只应用到给定的direction的port上
-location

parent | fanout>

指定插入isolation cell的hierarchy层次,“self”代表当前电压域所在的hierarchy层次,默认值是“self”
clamp_value <0 | 1 | Z

| latch | value | {<0 | 1 |

Z | latch | value>*}>

isolation cell钳位的电平,“0”是低电平,“1”是高电平,“Z”是高阻态,“latch”应该是代表retention state
-isolation_signal

signal_list [-

isolation_sense

low | {*}>]

isolation cell的控制信号
-no_isolation 在特定的port上不要插入isolation
-isolation_supply

supply_set_list

给isolation cell供电的supply set
  -isolation_sense

{*}

isolation cell的控制信号的有效电平,默认是高电平

如下命令创建了一个叫作parent_strategy的isolation cell strategy,其应用到pda这个电压域中的“a”“b”“c”“d”四个实例的单元的output port上,其供电supply set为pda_isolation_supply,其钳位到高电平,其目的端为电压域pdb:

set_isolation parent_strategy

-domain pda

-elements {a b c d}

-isolation_supply {pda_isolation_supply}

-clamp_value {1}

-applies_to outputs

-sink pdb

14. set_retention

表13是set_retention命令的说明表。

表13 set_retention命令说明表

命令 set_retention
作用 定义retention strategy
语法 set_retention retention_name

-domain domain_name

[-elements element_list] [-exclude_elements exclude_list]

[-retention_supply ret_supply_set] [-no_retention]

[-save_signal {logic_net}

-restore_signal {logic_net}]

[-save_condition {boolean_expression}]

[-restore_condition {boolean_expression}]

[-retention_condition {boolean_expression}]

[-use_retention_as_primary]

[-parameters {

SAV_RES_COR | NO_SAV_RES_COR> *}]

[-instance {{instance_name [signal_name]}*}]

[-update]

[-retention_power_net net_name] [-retention_ground_net net_name]

常用Option及其作用 retention_name retention strategy的name
-domain domain_name 该retention strategy所应用到的电压域
-elements element_list 应用该retention strategy的实例单元列表
-exclude_elements

exclude_list

不应用该retention strategy的实例单元列表
-retention_supply

ret_supply_set

给retention strategy供电的supply set
-save_signal {logic_net

 

negedge>}

保存信号电平的控制信号及其有效电平(或有效沿)
-restore_signal

{logic_net

posedge | negedge>}

恢复信号电平的控制信号及其有效电平(或有效沿)
-use_retention_as_primary retention cell的retention部分使用retention supply供电
-restore_condition

{boolean_expression}

恢复信号电平时对应的布尔表达式
-retention_condition

{boolean_expression}

信号电平保持时对应的布尔表达式

如下命令定义了一个叫作my_ret的retention strategy,其状态控制信号为ret,ret为上升沿时保存信号电平,ret为下降沿时恢复信号电平,其在ret为高电平时为信号电平保持状态:

set_retention my_ret

-save_signal {ret posedge}

-restore_signal {ret negedge}

-retention_condition {ret}

15. map_retention_cell

表14是map_retention_cell命令的说明表。

表14 map_retention_cell命令说明表

命令 map_retention_cell
作用 指定retention strategy物理实现方法和为retention strategies指定functional model
语法 map_retention_cell retention_name_list

-domain domain_name

[-elements element_list]

[-exclude_elements exclude_list]

[-lib_cells lib_cell_list]

[-lib_cell_type lib_cell_type]

[-lib_model_name name -port_map {{port_name net_ref } *}]

常用Option及其作用 retention_name_list 在该电压域定义的可相互替代的retention strategies list
-domain domain_name 定义这些retention strategy的电压域
-lib_cells lib_cell_list 这些retention strategies使用的library cell
-lib_cell_type

lib_cell_type

用于区分具有retention功能的library cell的属性
-lib_model_name

model_name

retention cell的library cell的behavioral model
-port_map retention cell的port和各种信号的对应关系

如下命令中对PowerDomainA这个电压域应用了my_PDA_ret_strat_1,my_PDA_ret_strat_2和my_PDA_ret_strat_3这三个retention strategy(这三个retention strategy可相互替代),并描述了其使用的library cell和retention cell的port和各种信号的对应关系等:

map_retention_cell {my_PDA_ret_strat_1 my_PDA_ret_strat_2

my_PDA_ret_strat_3}

-domain PowerDomainA

-elements {foo/U1 foo/U2}

-lib_cells {RETFFIMP1 RETFFIMP2}

-lib_cell_type FF_CKLO

-lib_model_name RETFFVER -port_map {

{CP UPF_GENERIC_CLOCK}

{D UPF_GENERIC_DATA}

{SET UPF_GENERIC_ASYNC_LOAD}

{SAVE save_signal}

{RESTORE restore_signal}

{VDDC primary_supply.power}

{VDDRET retention_supply.power}

{VSS primary_supply.ground} }

加入星球

相关推荐

登录即可解锁
  • 海量技术文章
  • 设计资源下载
  • 产业链客户资源
  • 写文章/发需求
立即登录