UPF文件的结构和撰写逻辑

1,UPF在撰写的过程中要满足电路的电源结构,不能随便写!

2,UPF从TOP开始往下写是具有层级结构的

-----分割线

撰写步骤:

本文来自博客园,作者:hematologist,转载请注明原文链接:https://www.cnblogs.com/littleMa/p/11080100.html

1,设定约束的层级

 set_design_top SoC/Video_SB   #指定design_top为Video_SB

set_scope .             #指定命令作用的范围为当前层次即Video_SB

set_scope V1/LV1        #指定命令作用的范围为V1/LV1

首先按照电源的层级结构定义好使用的电源层级和使用范围。

2,设定power domain

 上图中在Video_SB的TOP层级下存在5个Power domain;(Video_SB/Video_PD、Video_SB/V1_PD、Video_SB/V2_PD、Video_SB/LV12_PD、Video_SB/LV34_PD)

设定power_domain的步骤如下:

1. set_scope  Video_SB                #set the scope to Video_SB 

2. create_power_domain Video_PD -include_scope       #create Video_PD power domain in current scope.

3. create_power_domain V1_PD -elements {V1}       #creates V1‘s domain,its own power domain called V1_PD

4. create_power_domain LV12_PD -elements {V1/LV1 V1/LV2}

5. create_power_domain V2_PD -elements {V2}

6. create_power_domain LV34_PD -elements {V2/LV3 V2/LV4}

 3,对要用的电源进行描述:supply network

 上图为电源网络的定义

主要是通过下面四个进行电源网络的连接。

create_supply_port   VDD   -direction in
create_supply_port   VSS   -direction in

create_supply_net    Pwr     -domain Video_PD
create_supply_net    Gnd    -domain Video_PD

connect_supply_net   Pwr   -ports (VDD)
connect_supply_net   Gnd   -ports (VSS)

set_domain_supply_net   Video_PD \
-primary_power_net   Pwr \
-primary_ground_net   Gnd

下图中,V_PD domain 中的supply_net复用Video_PD domain中的supply_net。需要-reuse进行描述

create_supply_net   Pwr    -reuse   -domain V_PD
create_supply_net   Gnd   -reuse   -domain V_PD 

同时,必须显示的申明net所属的power_domain

set_domain_supply_net V_PD \
-primary_power_net Pwr \
-primary_ground_net Gnd

4,创建power switch

 create_supply_net  VDDsw -domain V_PD   #定义switch产生的supply_net。

create_power_switch SW -domain V_PD \
-input_supply_port {pwin Pwr} \
-output_supply_prt {pwout VDDsw } \
-control_port {swctrl sw_ctrl} \
-on_state {Pwon swctrl} \
-off_state {Pwoff !swctrl}

set_domain_supply_net V_PD \     #V_PD的primary_power_net为switch产生的net
-primary_power_net VDDsw \
-primary_ground_net Gnd

5,设定supply port的值

add_port_state    VDD              -state   {ON_10  1.0}    #VDD只有一种常开的状态,其电压值为1.0v

add_port_state    VSS               -state  {ON_00  0.0}

 add_port_state   SW/VDDsw   -state   {ON_10  1.0}   -state   {OFF  off}    #switch开关电压VDDsw,存在ON和OFF两种状态。

6,power state table的描述

 create_pst   PST1   -supplies   {VDD, VDDsw, VDD2, VSS}

add_pst_state   Normal   -pst PST1 -state {ON_10, ON_10, ON_08, ON_00}

add_pst_state   Sleep     -pst PST1 -state {ON_10, OFF, ON_08, ON_00}

add_pst_state   Normal   -pst PST1 -state {ON_10, OFF, OFF, ON_00}

7、set retention快速回复被关断domain的状态

 其中retention cell的电源和地为红色VDD和VSS

set_retention V_PD_retention \     #所以V_PD domain的状态都要能被恢复
-domain V_PD \
-retention_power_net Pwr \
-retention_ground_net Gnd

 set_retention_control V_PD_retention \
-domain V_PD \
-save_signal {SRctrl posedge} \
-restore_signal {SRctrl negedge}

8,用isolation cell 隔离ON domain和OFF domain

 OFF domain其输出连接至ON domain,所以其输出需要处理。

 set_isolation V_PD_isolation \

-domain V_PD \
-applies_to outputs \
-clamp_value 0 \
-isolation_power_net Pwr \
Isolation_ground_net Gnd 

set_isolation_control V_PD_isolation \
-domain V_PD \
-isolation_signal vISO \
-isolation_sense high \
-location parent

9,level shift cell 处理不同电压域之间信号的传递。

 set_level_shifter LV_PD_LS
-domain LV_PD \
-threshold 0.1 \
-applies_to both \
-rule both \
-location self

 

 

 

 

 

 
 
 
posted @ 2024-10-08 14:10  chippeace  阅读(545)  评论(0)    收藏  举报