Languages

CommunityCategory: GLISTERHow to probe currents flowing through circuit primitive instances

XMODEL GLISTER

How to probe currents flowing through circuit primitive instances

SA Support Team Staff 2019-01-25

Is there a way to probe the currents flowing through circuit primitive instances such as nmosfet, pmosfet, resistor and capacitor?

2 Answers
SA Support Team Staff 2019-01-25

Basically, you can access the voltage, current, and instantaneous power of each circuit primitive instance via its internal variables named V, I, and P. For instance, the current flowing through a resistor instance named R1 can be accessed via R1.I and you can record its waveform by dumping R1.I. One way to achieve this is to add "R1.I" to the list of variables to be dumped, either by defining the "Variables" property of the dump primitive instance in GLISTER or by supplying the variable list to the $xmodel_dumpvars() command as shown below. Note that in this case, the name "R1.I" must be a valid Verilog hierarchical name from the location it is used.

initial begin
    $xmodel_dumpfile("xmodel.jez");
    $xmodel_dumpvars(R1.I);
end

In case you want to probe currents of multiple circuit primitive instances, you can provide a "probe" option to the dump primitive in GLISTER or to the $xmodel_dumpvars() command. For instance, adding

probe=resistor.I

in the "Extra Options" field of the dump primitive in GLISTER as shown below, or calling the $xmodel_dumpvars() with the following option:

$xmodel_dumpvars("probe=resistor.I");

would dump the current waveforms of all the resistor instances located in the current hierarchy and below.

If you want to probe the currents of other circuit primitive instances such as mosfet, pmosfet, and capacitor as well, you can simply list the items delimited by commas (,):

probe=resistor.I,capacitor.I,nmosfet.I,pmosfet.I

It is also possible to combine this option with the other dump options. For instance, additionally defining the "Depth Level" field to 1 or using the following $xmodel_dumpvars() command,

$xmodel_dumpvars("level=1", "probe=resistor.I");

would instruct XMODEL to dump the current waveforms of the resistor instances located in the current hierarchical level only.

SA Support Team Staff 2020-11-09

Starting from 2020.11 release, you can probe the currents of all types of circuit primitive instances at once by providing the "probe=*.I" option to the dump primitive or to the $xmodel_dumpvars() command. That is, you can add

probe=*.I

in the "Extra Options" field of the 'dump' primitive in GLISTER, or call $xmodel_dumpvars() with the same option

$xmodel_dumpvars("probe=*.I");

to probe the currents of all types of circuit primitive instances in the design.