Simulation Debug
Simulation Debug
How to debug Simulation Miscompares, why patterns are failing, serial passes but parallel fails
How To...
This article explains in detail about how to debug Modus Verilog patterns miscompares. It also explain about difference between serial and
parallel scanformat and scenarios like serial passing and parallel failing
Answer
This article has following sections:
1. Why we need verilog patterns.
2. What to look for before we start debugging simulation miscompares.
3. Zero delay patterns debug.
4. Different format of patterns Serial Vs Parallel.
5. Steps to debug the Miscompares.
6. Getting failing register using Diagnose failset flow.
7. Serial Passes and Parallel failed.
8. Using Diagnostic to debug miscomapres.
Here, the “SO” entry tells you that the failure was during a Scan Output operation.
The Scan Output pin is DLX_CHIPTOP_DATA[12]
Scan Cycle/Bit #: 31 tells that the 31st FF from the Scan Output pin is the state device that captured the bad logic value during the
functional capture portion of the test.
B. In case of serial Verilog pattern we will not have the register name explicitly mentioned in the log file, in that case we can map the
miscompare message information to the output from report_test_structures.
Following is the example of report_test_structures command and snippet from the section where we can map the failing register :
report_test_structures -testmode {testmode_name} -reportscanchain all
1 of 6 10/4/19, 3:36 PM
https://support.cadence.com/apex/Display_Articl...
This will open a window that will ask the Register Number and Bit position which is given in the TVE-660. We have options to Replace
Circuit Display or Add to Circuit Display as well.
Following is the example :
Following is the set of commands that can be used for Diagnostics run :
read_failures -testmode {tetsmode_name} -experiment {experiment_name} -workdir . -failset logic -importfile ./testresults/verilog
/VER.[testmode].logic.data.logic.ex1.ts2.verilog_FAILSET
analyze_failset -testmode {testmode_name} -experiment {experiment_name} -workdir . -failset logic
Following is the snippet from the log file of analyze_failset in which tool is reporting the failing register and its corresponding scanout pin :
2 of 6 10/4/19, 3:36 PM
https://support.cadence.com/apex/Display_Articl...
2. Now since the Failing register is identified we need to compare the values MODUS believed should exist (Good Machine Simulation) with
the values simulated by Xcelium/Simulator.
Following are the steps to run the Good machine simulation :
A. From the MODUS main window/Shell set the context for the analysis and enter the testmode.
B. Open the failing Register in MODUS Schematic Window.
C. View -> Test Data -> Test Vectors (TBDbin) -> Sequence -> View Circuit Value
From Sequence section, we need to find the failed vector from the Xcelium log file. For example, if we are getting failure at : 1.2.1.3.1.6
then following is the snippet :
Values will be displayed on the schematic. We can trace the logic backward to check the values propagation as well.
Modus can also create Simvision file to allow pattern tracing and debug. These will be good machine values from what Modus is expecting
from the circuit.
We need to create a list to watch particular nets within design. This watch list can be created from the GUI or by a script. Following are the
steps :
1. Open Schematic Viewer
2. Open the failing Registers/ Logic you want to trace
3. Right Click on the net to bring up the Display Actions menu
4. Click on Add to Watch List
Following is the snippet from the Add to Watch List window :
3 of 6 10/4/19, 3:36 PM
https://support.cadence.com/apex/Display_Articl...
Now we can use analyze_vectors command to generate the waveforms for these nets and even control the range of vectors for which we
want to run simulation.
Following is the syntax of command :
Analyze_vectors –testmode <> -experiment <analyzed> -inexperiment <atpg experiment> -watchnetsfile <netfile.txt> -watchvectors
1.2.1.2.1:1.2.1.3.2
Now, open the MODUS GUI and click on the View Waveforms icon which is 7th Icon from the left.
A popup window will comes up, we need to load the .trn file to open simvision.
Once the simvision is loaded with database, we can run simulation on the selected nets to have a Good Machine reference values.
3. The next step would be to bring the Simvision on the Bad machine simulation i.e., where we are getting simulation miscompares and
compare the waveforms with Good Machine Values.
In case the simulation GUI is not already opened, we need to add +gui to the irun command. Your command should look like :
On the waveform window change the radix of the waveform “pattern” by right clicking the waveform element under “cursor” to ASCII. This
should show the pattern odometer on X axis and will help you locate the failing ODOMETER.
We can go to Odometer and now we have the Good Machine and Bad Machine values, we need to Compare the two to point to the origin
of discrepancy between both.
In SimVision, we can also open the schematic of the failing register and back trace the logic cone. Right Click on the specific cell and
choose the option as required. Following is the snippet :
4 of 6 10/4/19, 3:36 PM
https://support.cadence.com/apex/Display_Articl...
Following are the ways that can report if there are Scan Corrupted Latches in design.
A. build_testmode will give following information message :
INFO (TTM-350): There are 20 Permanently Scan Corrupted Latches. [end TTM_350]
B. verify_test_structure will give the following Warning message and mention the specific register name :
WARNING (TSV-315): Memory element block XYZ.dff_primitive is not in a scan chain and is corruptible during the scan operation. The
memory element may be clocked through pin ABC.CLK during the scan sequence. [end TSV_315]
C. report_test_structures -reportscancorrupt yes … will report if a known value is being loaded into scan corrupted latch.
Following is the snippet from the report_test_structures :
Blk Index Value Block Name
--------- ----- ----------
37738 X chip.xxx.dff_primitive
65756 + pad.xyz.I0.dff_primitive
Method for addressing this is to use write_vectors -explicitshifts <integer> or add patterns to your test mode init
sequence. The keyword explicitshifts offsets the parallel Verilog simulation from 1-to-n scan shifts. This parameter allows you to
force the "n" scan shifts necessary to get a known value into these non-scan scan corrupted latches. By default parallel Verilog does
not execute the scan shift operation thus these non-scan latches remain at an "X" logic state.
Another solution is to add patterns into test mode initialization sequence, so as to set these scan corrupted latches to a known value.
This method requires rebuilding the test mode and rerunning create_logic_tests.
Both methods have very little or no impact on your tester run times or tester data volume.
5 of 6 10/4/19, 3:36 PM
https://support.cadence.com/apex/Display_Articl...
In the above report. We can see tool has pin pointed the defect that explain all the miscompares.
We can open the location of fault ID : 37223 from the Modus Schematic window and in Simvision schematic browser and analyze the
reason for the origin of discrepancy between values.
6 of 6 10/4/19, 3:36 PM