|
How to display the strength of a net and its driversSwapnajit MittraVineyard Research Inc.
Sometimes it is useful to see the following information about a net all in one place.
Unfortunately, there is no standard system call to find out what are the drivers of a net and what are their strength values. Verilog-XL provides a non-standard system call $showvars, which finds out the drivers of a net. But there is no system call to find out the origin of propagating Xs. We are now going to see how to write such a PLI application. Note that, the term "strength" makes sense only for a wire - a bus or a reg can not have any strength. Since, strength makes more sense for gate level design rather than RTL or behavioral design, our system call $strength will assume a gate level model for the input design.
The following Verilog program shows how to use such a call.
The code listing for $strength is shown below.
Notice that the net q in our example should be at x, as there is a contention between the outputs of the two AND gates. Here is the output of the Verilog program:
Signal: top.q, Strength: StX Driving Strengths: top.u2.m1 St0 top.u1.m1 St1
|