在多电压域设计中的应用
![](https://img-blog.csdnimg.cn/846f6e02a65e4dbeb1167899d15c5349.png)
图1所示的多电压芯片有两个不同电压的电源VDD1和VDD2。该芯片有两个内部块CPU_1和CPU_2,这两个块都是同一CPU块的instance。块CPU_1和芯片的顶层使用VDD1,而块CPU_2使用VDD2。VDD1和VDD2二者在整个芯片中始终处于on状态。整个芯片使用相同的地VSS。
bottom-up的设计
在自底向上的设计策略中,低层次的CPU模块分别进行设计,分别进行 upf 规范的编写,最终所有模块将集成到顶层模块中。
block level
下面是低层模块 CPU.upf 的例子:
create_power_domain PD
create_supply_net VN -domain PD
create_supply_net GN -domain PD
set_domain_supply_net PD -primary_power_net VN -primary_ground_net GN
create_supply_port VN
create_supply_port GN
connect_supply_net VN -ports {VN}
connect_supply_net GN -ports {GN}
top level
下面是顶层模块 SODIUM.upf 的例子:
load_upf CPU.upf -scope CPU_1
load_upf CPU.upf -scope CPU_2
create_supply_port VDD1
create_supply_port VDD2
create_supply_port VSS
create_power_domain PD
create_supply_net VN1 -domain PD
connect_supply_net VN1 -ports {VDD1 CPU_1/VN}
create_supply_net VN2 -domain PD
connect_supply_net VN2 -ports {VDD2 CPU_2/VN}
create_supply_net GN -domain PD
connect_supply_net GN -ports {VSS CPU_1/GN CPU_2/GN}
set_domain_supply_net PD -primary_power_net VN1 -primary_ground_net GN
top-down的设计
在自顶向下的设计策略中,设计的upf规范可直接从顶层模块进行控制。
实例如下所示:(注意resue的option)
create_power_domain PD_CPU_1 -elements {CPU_1}
create_power_domain PD_CPU_2 -elements {CPU_2}
create_power_domain PD_SODIUM
create_supply_port VDD1
create_supply_port VDD2
create_supply_port VSS
create_supply_net VN1 -domain PD_CPU_1
create_supply_net VN1 -domain PD_SODIUM -reuse
connect_supply_net VN1 -ports {VDD1}
create_supply_net VN2 -domain PD_CPU_2
connect_supply_net VN2 -ports {VDD2}
create_supply_net GN -domain PD_CPU_1
create_supply_net GN -domain PD_CPU_2 -reuse
create_supply_net GN -domain PD_SODIUM -reuse
connect_supply_net GN -ports {VSS}
set_domain_supply_net PD_CPU_1 -primary_power_net VN1 -primary_ground_net GN
set_domain_supply_net PD_CPU_2 -primary_power_net VN2 -primary_ground_net GN
set_domain_supply_net PD_SODIUM -primary_power_net VN1 -primary_ground_net GN
在电源关断设计中的应用
![](https://img-blog.csdnimg.cn/f3264b6b1847480ebae6791620d3a363.png)
图2所示的芯片设计有两个外部电源,VDD_MAIN和VDD_PM。该芯片有两个内部块CPU_1和CPU_2,这两个块都是同一CPU块的instance。
片上电压调节器VoltReg(输入电压为1.2V)产生不同电压的两个电源,vrout1(0.7V,0.8V,0.9V)和vrout2(1.0V,1.1V,1.2V)。电源vrout1为NormCPU块供电,电源vrout2为FastCPU块提供更高电压的电源。VDD_MAIN电源可在芯片上切换。每个CPU块都有自己的内部开关,用于打开和关断自己的电源。电源管理器逻辑块PwrMgr产生控制电源开关的信号。
block level
下面是低层模块cpu.upf的实例:
create_power_domain PD1
create_supply_net PVN -domain PD1
create_supply_port PVN -domain PD1
connect_supply_net PVN -ports PVN
create_supply_net IVN -domain PD1
create_power_switch sw1 \
-domain PD1 \
-input_supply_port {vin PVN} \
-output_supply_port {vout IVN} \
-control_port {ctrl sw_ctrl_net} \
-on_state {state1 vin {ctrl}}
create_supply_net PGN -domain PD1
create_supply_port PGN -domain PD1
connect_supply_net PGN -ports PGN
create_supply_net RVN -domain PD1
create_supply_port RVN -domain PD1
connect_supply_net RVN -ports RVN
set_domain_supply_net PD1 \
-primary_power_net IVN -primary_ground_net PGN
set_retention retent1 \
-domain PD1 \
-retention_power_net RVN -retention_ground_net PGN
set_retention_control retent1 \
-domain PD1 \
-save_signal {cpu_state_save high} \
-restore_signal {cpu_state_restore high}
set_isolation iso1 \
-domain PD1 \
-isolation_power_net RVN -isolation_ground_net PGN \
-clamp_value 1 \
-applies_to outputs
set_isolation_control iso1 \
-domain PD1 \
-isolatio_signal cpu_iso \
-isolation_sense low \
-location self
top level
下面是顶层模块 chiptop.upf 的实例:
set_scope FastCPU
load_upf cpu.upf
set_scope ../NormCPU
load_upf cpu.upf
set_scope # doing this make chiptop not reusable.
# PD for the PwrMgr, powered separately
create_power_domain PD2 -elements {PM1}
create_supply_net LPVN -domain PD2
create_supply_port VDD_PM -domain PD2
# PD for glue logic and SystemModule
create_power_domain PD1
create_supply_net PVN -domain PD1
create_supply_port VDD_MAIN -domain PD1
connect_supply_net PVN -ports {VDD_MAIN}
create_supply_net IVN -domain PD1
create_power_switch sw1 \
-domain PD1 \
-input_supply_port {vin PVN} \
-output_supply_port {vout IVN} \
-control_port {ctrl sw_ctrl_net} \
-on_state {on_state vin {ctrl}}
create_supply_net PGN -domain PD1
create_supply_net PGN -domain PD2 -reuse
create_supply_port VSS_MAIN -domain PD1
# Explicit connections of pre-regulated supply nets
connect_supply_net PGN -ports {VSS_MAIN VR1/vgnd}
connect_supply_net IVN -ports {VR1/vin}
connect_supply_net LPVN -ports {VDD_PM}
# Implicit connections of pre-regulated supply nets
set_domain_supply_net PD1 -primary_power_net IVN -primary_ground_net PGN
set_domain_supply_net PD2 -primary_power_net LPVN -primary_ground_net PGN
set_isolation -domain PD1 -isolation_power_net PVN
set_isolation_control -domain PD1 -isolation_signal iso_sig_net
# Explicit connections to soft IP’s
create_supply_net RegVN1 -domain PD2
create_supply_net RegVN2 -domain PD2
create_supply_net RegVG -domain PD2
connect_supply_net RegVN1 -ports {VR1/vrout1 NormCPU/PVN}
connect_supply_net RegVN2 -ports {VR1/vrout2 FastCPU/PVN}
connect_supply_net IVN -ports {NormCPU/RVN FastCPU/RVN}
connect_supply_net RegVG -ports {VR1/vrgnd NormCPU/PGN FastCPU/PGN}
相关命令的语法指导
create_supply_net
create_supply_set
create_supply_port
![](https://img-blog.csdnimg.cn/88f1173894e34c529e8b431b15bb7e4d.png)
create_power_domain
connect_supply_net
![](https://img-blog.csdnimg.cn/882ac855dd0144dfbe67db063a653977.png)
set_domain_supply_ net
![](https://img-blog.csdnimg.cn/f3424ab1de144a9f8251a44b983509ac.png)
create_power_switch
![](https://img-blog.csdnimg.cn/9570a0ec9f774cfcae40503b5f284802.png)
set_retention
![](https://img-blog.csdnimg.cn/3ca42675487346639546d12d73368603.png)
set_isolation
![](https://img-blog.csdnimg.cn/0ee90e0d74a8480191720f0415a38809.png)
![](https://img-blog.csdnimg.cn/831c464d8b7b4382b699bf9c67691fee.png)
低功耗设计upf系列的文章暂告一段落,接下来我将介绍tcl语言学习的心得。