Magic Blue Smoke

 

Functional Simulation using UPF(Cont’d)

Last week we saw various commands within UPF which can be used for simulation. Today let us see how these constructs can be used to simulate certain behaviour.

(a) Functional Correctness of all the signals, when voltage is varying.

The question that needs to be asked here is, how to model the voltage in a logic simulator. One way to do this would be to use the behavioral model of a Voltage Regulator. Now, even if we do that, will the simulator be able to associate the Voltage Regulator to the appropriate signal and flag when there is violation ?

Using only UPF to encapsulate the above said behavior is difficult. But with the use of VCS along with UPF and its verification methodology we will be able to simulate this.

For example, lets say we define the legal state of the design for various power domains as follows:-

add_port_state VDD_HIGH -state {HighVoltage 1.08}
add_port_state VDD_LOW -state {LowVoltage 0.864}
add_port_state crc_sw/out -state {HighVoltage 1.08} -state {CRC_OFF 0.0}
add_port_state rx_sw/out -state {LowVoltage 0.864} -state {RX_OFF 0.0}

create_pst pst_0 -supplies {VDD_HIGH VDD_LOW VDD_HIGH_VIRTUAL VDD_LOW_VIRTUAL}
add_pst_state PRE_BOOT -pst pst_0 -state { HighVoltage LowVoltage CRC_OFF RX_OFF}
add_pst_state CRC_ON -pst pst_0 -state { HighVoltage LowVoltage HighVoltage RX_OFF}

From the above state table it is clear that, there are 2 domains which are going to be shut-down and their voltages are 1.08V and 0.864V.

If the simulator sees any state other than the one defined in the above state-table, it should flag it as an Invalid State. However, the simulator won’t be able to differentiate between the two voltage levels nor the ON/OFF Voltages. One way to handle ON/OFF Voltage for the switch is to model this behaviour in a testbench, as follows:-

always @(tb.dut.power_controller.shut_down)
if (tb.dut.power_controller.shut_down == 1’b0)
VDD_HIGH_VIRTUAL = 1.08;
else VDD_HIGH_VIRTUAL = 0.0;

So far we have only modelled the ON/OFF voltage, how about:-

(1) Voltage ramps, and
(2) How will the simulator flag a violation, when some activity is triggered during the ramping up cycle or ramping down cycle?
(3) How to Model Voltage Regulator?

Let us discuss this in my next posting.