Electrical expressions are supported with the CPF commands that require power event control conditions. To enable the support for electrical expressions in CPF you must specify the -lps_ams_analog_ccnd command-line option. The electrical signal could be in a VAMS or SPICE model and can be specified in power event control condition directly or in boolean expression of power event control condition.
The tool collects the electrical signals that are used in CPF control condition and creates internal wreal signals for each electrical one. Then, the tool relaunches elaborator to compile the internal wreal signals and automatically inserts one of the following connect modules:
- An
ER_bidirconnect module to convert the electrical voltage value to internalwrealnets. The tool replaces the electrical signals in CPF control condition with the internal wreal one and reuses the same processing of wreal expression as CPF control condition. A mapping between original electrical signal and internal wreal signal is generated. - An
E2L_2_LPSconnect module, if there is an isolation power event control condition on the electrical signal. The electrical voltage value is converted to logic. The tool detects the power domain definition on the electrical signal of CPF control condition; and, uses the working voltage of this domain as reference. The working voltage can be from dynamic supply connection through domain mapping, CPF global connection, or static voltage info of nominal condition.
If there is no power domain definition detected on the electrical signal, the tool uses the reference voltage info defined in ie card. And, if there is no ie card specified, the default reference value, 1.8 is used.
The current mode and the electrical signal in IEEE1801 (UPF) control condition are not supported.
The following operators are supported in the expressions:
- >, >=, <, <=
- == and !=
- == and !==
The case equality operators === and !== can only be followed by `wrealXState and `wrealZState. For example:
create_power_domain -name PD -shutoff_condition pmc.vsup===`wrealXState
Also, the following conditions must apply:
The equality on real value means that the value is exact same for computer system. You must consider the tolerance in compare.
The reference value should be a real number or `wrealXState/`wrealZState. Variable or parameters are not supported.
The `wrealXState/`wrealZState must follow with case equality operators only.
Examples
In following example VDD and AVDD [0] electrical signals are used as shutoff conditions as per the CPF description. An ER_bidir connect module is inserted as shown below.
################################### HDL description ###################################module PMU(); electrical VDD, VSS; electrical [1:0]aVDD, aVSS; electrical gnd; ground gnd;
vsource #(.dc(0.0), .type("dc")) vgnd0 (VSS, gnd); analog begin V(VDD) <+ transition(vsup, 0.0, 20e-9, 30e-9, 0.0); V(aVDD[0]) <+ transition(vsup1, 0.0, 20e-9, 30e-9, 0.0); endendmodule
########################## CPF description ##########################create_power_domain -name PDD -defaultcreate_power_domain -name PD1 -base_domains PDD \ -instances {digInst1} \ -shutoff_condition {testbench/PMUInst/VDD<=0.5}
create_power_domain -name PD2 -base_domains PDD \ -instances {digInst2} \ -shutoff_condition {testbench/PMUInst/aVDD[0]<=0.5}
In the following example, electrical signals avdd, avdd1, and aiso are defined in HDL to drive CPF power event. The power domain PDD is associated with electrical supply net avdd and avss. And, the electrical signal avdd is used to drive domain shutoff condition. The electrical signals avdd belongs to domain PDD. The voltage of PDD is used as reference of electrical signal avdd.
The power domain PD1 is associated with electrical supply net avdd1 and avss. And the electrical signal avdd1 is used to drive domain shutoff condition. The electrical signals avdd1' belongs to domain PDD. The voltage of PDD is used as reference of electrical signal avdd1.
Isolation rules ISO1 and ISO2 are control by electrical aiso. The electrical signals aiso belongs to domain PD1. The voltage of PD1 is used as reference of electrical signal aiso.
################################### HDL description ###################################module pmu(avdd,avdd1,avss,aiso); output avdd, avdd1, avss, aiso; electrical avdd, avdd1, avss, aiso; ground avss; analog begin ... endendmodule
########################## CPF description ##########################set_macro_model pmu create_power_domain -name MPD0 -default update_power_domain -name MPD0 -primary_power_net avdd -primary_ground_net avss create_power_domain -name MPD1 -boundary_ports { aiso } update_power_domain -name MPD1 -primary_power_net avdd1 -primary_ground_net avssend_macro_model pmu
set_design testbench -testbench
create_power_nets -nets { avdd avdd1 }create_ground_nets -nets { avss }
create_power_domain -name PDD -default \ -shutoff_condition {!testbench/ipmu/avdd}
create_power_domain -name PD1 -base_domains PDD \ -shutoff_condition {!testbench/ipmu/avdd1}
update_power_domain -name PDD -primary_power_net avdd -primary_ground_net avssupdate_power_domain -name PD1 -primary_power_net avdd1 -primary_ground_net avss
set_instance dut -domain_mapping { {PDD PDD} {PD1 PD1} }set_design top
create_power_domain -name PDD -defaultcreate_power_domain -name PD1 -base_domains PDD \ -instances {digInst}
create_isolation_rule -name ISO1 -to PD1 -isolation_output high \ -isolation_condition {!testbench/ipmu/aiso}
create_isolation_rule -name ISO2 -from PD1 -isolation_output low \ -isolation_condition {!testbench/ipmu/aiso}end_design top
set_instance ipmu -model pmu -domain_mapping { {MPD0 PDD} {MPD1 PD1} }end_design testbench
