SimVisionAdvancedRAK Overview
SimVisionAdvancedRAK Overview
XCELIUM, Xcelium, INCISIVE, incisive, Probe, error, warning, Post Processing Mode(Inspection of HDL Waveforms), Debug Methodology(Post Processing Mode), Waveform
signal comparison(Using simcompare), Driver Tracing, Probing assertions, Probing HVL Objects(Transaction recording), Probing UVM Hierarchy, Sequence Debug, Interactive
Debug (Single stepping and break points), Setting breakpoints, Advantages of SimVision Interactive Debug, UVM Debug Challenges, UVM Sequence Viewer, UVM
Configuration Debug, UVM Register Debug, UVM Factory Debug, SHM, Simvision, UVM, Probe, Database, SHM database, VCD, SST2, EVCD, TCL, incremental, incfile,
incremental database, Delta Cycle ,Event,transaction,recording shm_probe, Assertion, Assertion Browser, simvisdbutil, Convert,UVM toolbar, SystemC,Waveform
SimVision Debug RAK
Agenda
Summary
Code
Post process debug
using only waveform
information + source
code
Debug Simulate
Fail
Done Inspect
Pass
SimCompare sidebar
contains hyperlinks to
each mismatch detected.
New group created
highlighting the
differences between
the signals
All mismatches
highlighted in red
throughout the window
1 - Open
databases for
comparison 3 - After scopes have
been added, click
“Submit Compare”
Waveform
databases
listed in the
sidebar
2 - Drag and
drop scopes
from the
sidebar here
New comparison
added to the list 5 - Click “View
Results”
Number of
mismatches
found
All mismatches
listed in waveform
sidebar
Mismatches
highlighted in the
waveform area
Clicking a mismatch in sidebar
adds the comparison to the
waveform area
10 © 2020 Cadence Design Systems, Inc. All rights reserved.
Post process HDL
Mnemonic Mapping waveform
inspection
3) Customize the
look of the
mnemonic with If you have a signal
many options already selected,
click Apply
New mnemonic is
applied to the
selected signal
Signal of
interest
A B C
B and C do not
Driver contribute to
driving D
– Users may not be interested in viewing all intermediate connections between a signal and
it’s driver/load
– Viewing all connections provides a full picture of what is going on but
– It can add complexity and clutter to the tracing task
• There are several steps that take place under the hood when users perform a
driver trace operation within SimVision:
• Identify all
possible drivers
Launch • Invokes Driver • Snapshot • Heuristics • Contributing • Active Driver
Analyze • Graded drivers
Driver Trace process provides driver Driver • Algorithms Circuit signals identified Results
• Trace current
Static list • Uses recorded • Contributing • Static drivers
Trace Grading Sensitivity Presented
value of signal Drivers • List does not waveform data signals graded • No drivers found
Operation
reflect active
driver
• In all methods, you first need to select a signal to trace before invoking
• Automatic trace:
– Default trace mode when tracing X values in source and Waveform Go To Cause
– Automatically trace a value back its source, through several drivers if needed
– User interaction only required when driver grading can’t find driver with 100% accuracy
– Invoked through the Auto trace button shown above
– History of traced drivers is saved and accessible
• Trace driver:
– Default trace mode when tracing non-X values in source and Waveform Go To Cause
– Trace back to the next immediate driver
– Invoked through the Trace driver button shown above
• Though the basic user interface is simple, there are several advanced
preferences available
18 © 2020 Cadence Design Systems, Inc. All rights reserved.
Driver Tracing Preferences – 2 Launch
Driver
• Invokes Driver
Trace process
Trace • Trace current
Operation value of signal
Influence X trace
decisions when multiple
X’s are detected
If an X is not detected
on the current cycle of a
Signal Tracing Sidebar signal, how many
Selections transitions to go back in
time looking for a match
Indicates that
contributor has a grading
Original Signal
Traced
3.)Right-click
3.) Right-clickonon
thethe signal
signal name
name and
2.) Place cursor on edge of
andselect
select “Go
“Go ToTo Cause”
Cause” interest
Recommend isolating the signal of interest in
it’s own target waveform window. You can then
add interesting contributors along the way
Traverse up one
level
To continue your trace all the
Traverse down a
way up the hierarchy, right click-
level
>Follow signal.
• Answer: That signal rose because something was driving a 1’b1 on the txd
lines of the top level test harness.
– Perhaps take a closer look at the rstate variable from prev. slide?
31 © 2020 Cadence Design Systems, Inc. All rights reserved.
Post process HDL
Example 2: Tracing Through a Memory - 1 waveform
inspection
3.) Right-click
3.) Right-clickononthe
the signal
signal name
name and
and select “Go To Cause”
select “Go To Cause”
Where do we
go from here?
Where do we
go from here?
• If grading algorithms cannot determine driver, SimVision reverts to static driver tracing
• All signals in the trace path must be probed
• Read access is required for all signals
• Driver grading is not available at time 0
• Currently, variable delays are not supported, that is delays inside if, for or generated blocks
• Limited support for generate statements
• There is a time limit for the tracing operations, so if the algorithm runs out of time it will return
with an invalid trace path
• New data types added to System Verilog might not be supported.
– E.g. – Newly supported SV let construct
1. Use markers in the Waveform window to mark the start location of your Driver
Trace operation
2. Refrain from clicking in Waveform once you have started your Driver tracing
– Changing the cursor affects value annotation in all windows
3. Understand that the scheduler sequence time affects source annotation
– Look for bracketed numbers after the simulation time (e.g 34,567(5) ps)
4. Understand that Driver Tracing has limitations
– It is algorithmic and probabilistic in nature
– There will be times where the algorithm cannot predict the correct driver
– Human analysis will be required to provide further guidance as to next steps
• Please see these YouTube Videos for more information on Method 1 debug
features:
– YouTube:
– SimVision Debug Video Series Introduction
– SimVision Quick Introduction to the Major SimVision Windows
– SimVision Waveform Window Introduction
– SimVision Design Browser Introduction
– SimVision Source Browser Introduction
– SimVision Driver Tracing Introduction
– SimVision Automatic Driver Trace
– SimVision Signal Comparison using SimCompare
– probe … –transaction …
– Records assertions as transactions only (will not record any additional assertion information) within the scope
– Will not probe any other signal at all … only transactions
– Can visualize start/end and pass/fail (colourization) of any assertion thread
– Visualize multiple threads of a given assertion (overlapping transactions)
– probe … –assertions …
– Only records assertion information (will not probe other signals) for the scopes in the probe command
– Assertion state as well as checked_count, finish_count, failure_count and disabled_count counters probed
– probe …-assertdebug …
– Records assertions as transactions
– Records also local variables
Local variable
num_cycles
contained within the
req_ack assertion
• Please see these Videos for more information on Method 1-2 debug features:
– YouTube:
– SimVision Debug Video Series Introduction
– SimVision Quick Introduction to the Major SimVision Windows
– SimVision Waveform Window Introduction
– SimVision Design Browser Introduction
– SimVision Source Browser Introduction
– SimVision Driver Tracing Introduction
– SimVision Automatic Driver Trace
– SimVision Signal Comparison using SimCompare
– SimVision Assertion Debug Introduction
Refer to Lab1-DriverTrace.pdf for more details. It can be downloaded from attachment section.
Note: There might be some issues if labs are decompressed/untar in Windows OS. To mitigate this, request is
to decompress/untar the labs in UNIX/LINUX.
43 © 2020 Cadence Design Systems, Inc. All rights reserved.
Post Process
A Word on Post Process Class Based Debug HDL/HVL waveform
inspection
Exploration/filtering of
sequence information
– Waveform visualization
• Users must request UVM base class fields via the –uvm switch
– Example probe -create -database waves –uvm uvm_pkg::uvm_top -all -depth all
• Before navigating the UVM hierarchy, the debug database must be loaded
– Snapshot/Lightweight debug database must be loaded before sending to the waveform
– Otherwise you may not be able to expand sent items
• Use the Design Browser window to navigate the UVM hierarchy
3 - Can then select
any object and send
to waveform or use
Ctrl+W
This contains the
transaction hierarchy
only (when 2 - UVM hierarchy
debugging offline) will be displayed in
the Data Members
pane
1 - Click on the
uvm_top item to
view the UVM
hierarchy
49 © 2020 Cadence Design Systems, Inc. All rights reserved.
Post Process Class Based Debug – Post Process
HDL/HVL waveform
Waveform Representation inspection
Click “+” to
create new
Hover to bring up detailed group for this
Changing Class
info in tool tips transaction
Handles
Dynamic Class
Internal fields
changing
Fields of the
uart.tx.driver
UVM Component
Fields of each
UART frame
driven
Transaction View
of UART
sequences
• By default, req/resp UVM base class fields of driver components are recorded
– As are the m_parent_sequence fields
• Using these fields alone, it is possible to walk up the sequence tree to
understand the sequence structure
– Keep walking up through the sequences until you encounter a sequence whose
m_parent_sequence is null
• Generally, it is much faster to use UVM transaction recording for sequence
analysis however, there are some benefits to using this approach
– Can start from the req field and work upwards
– Using transactions users generally start at the sequencer and work downward
– Parent class handles displayed
– Parent class names displayed
– Associated sequencer type name displayed
5 – Locate it’s
m_parent_sequence
u2a_bad_parity_vseq
sends the rd_rx_fifo
Select the sequence, which sends
sequencer of interest req
Select the
transaction stream of
interest and send to
Waveform
UVM Build
phase occurs
UVM at time 0
Hierarchy
displayed in
the
waveform
window
Refer to Lab2-PostProcessDebug.pdf for more details. It can be downloaded from attachment section.
Note: There might be some issues if labs are decompressed/untar in Windows OS. To mitigate this, request is
to decompress/untar the labs in UNIX/LINUX.
59 © 2020 Cadence Design Systems, Inc. All rights reserved.
Post Process
Additional Information HDL/HVL waveform
inspection
• Please see these Videos for more information on Method 1-3 debug features:
• YouTube: • Cadence Online Support (COS):
− SimVision Quick Introduction to the Major SimVision Windows • You can refer to
− SimVision Waveform Window Introduction https://support.cadence.com – Resources
− SimVision Design Browser Introduction – Video Library, Application Notes and
− SimVision Source Browser Introduction Rapid Production Kits (Filter on “Indago
− SimVision Driver Tracing Introduction Debug” Product)
− SimVision Automatic Driver Trace
− SimVision Signal Comparison using SimCompare
− SimVision Assertion Debug Introduction
− SimVision Class Browser Introduction
− SimVision Class and Transaction Based Debug
− SimVision Transaction Stripe Chart Introduction
− SimVision UVM Debug Commands
Summary
Code
Online
Simulate
Debug
Re-run
(set break
Automated Pass
point) Fail Status
Done
Inspect
Conditional breakpoints
• Time based
– Stop the simulation on a specific line of code if we have reached a certain time
• Value based
– Stop the simulation on a specific line if ever a specific set of signals take on a desired value
• There are various ways to access the source files for setting breakpoint
– Design File Sidebar:
– If you know the source file name or only need to set a time based breakpoint
– Design Browser:
– If you know the specific instance in the hierarchy or you would like to set a Value based breakpoint
• Though not as common, you can set a breakpoint from several other locations
within SimVision
– Watch window, UVM Sequence Viewer, UVM Register Viewer, etc.
• Time Based
– Break on a particular line of code after a
certain time has been reached
– RMB in Source Browser Margin
Single Stepping
Step control toolbar
• Single stepping allows users to
run code in a controlled manner
– Access to all simulator data is a huge
productivity boost for debug
Source annotations
– Can explore on the fly
available without
– Can examine the context of every probing
line executing
– Can examine all variable values at
the current simulation time
– Can selectively probe items of
interest on the fly
– Step within the current thread, within
all threads, into methods
uart_ctrl_monitor.
write_abp()
apb_monitor.
write()
apb_collector.
collect_transactions()
apb_collector.
run_phase()
These numbers
identify “frames”
within the stack UVM phase control stuff
Creating forces
• Forces can be applied to HDL objects
– Typically done through the right click option of the Waveform or Source Browser windows
Forcing a value
causes the
variable to retain
this value until
the force is
released
5. Walk up the call stack to find the class that instantiates the input trans field
6. Send that object to the watch window
7. Right Click on the addr field in the Watch window and select “Deposit Value”
8. Enter the new desired value in the Deposit dialogue box and click OK
9. New value appears in the watch window
10. Run the simulation and you will see your new value being driven
– You may want to delete your breakpoint
OLD SIGNALS
NEW SIGNALS
78 © 2020 Cadence Design Systems, Inc. All rights reserved.
Advantages of SimVision Interactive Debug Interactive Debug
Constraint Debug
• Constraint Debug
Run randomizer
– Advanced “what if” analysis
allows users to add/remove Add a
constraint
constraints interactively through TCL
– Can see all variables and
constraints involved in
randomization issues
– Cross selection with source Class Enable/Disa Applicable
code members ble constraints
and values constraints
• Command Line
Debug
– Simulation control
– Available in batch or GUI
mode
– Query object/signal
contents and values
– Quick printing to the
screen/Console
– Print drivers of signals
– Set breakpoints
•Sequence Debug
•Configuration Debug
•UVM register modeling
•Heavy macro usage
•UVM base class inheritance
•Phased execution
•Factory overrides
•Objections
UVM Debug
Challenges
sequenceB item2
sequenceC
item3
sequenceA
item4 Error traced to
sequenceD sequenceE this sequence
item5 item being sent
sequenceF item6
Problem
Problem can be be
can probably
Problem can be isolated to
isolated
isolatedto
to one ofthese
one of these
one of these locations item6
locations?
sequences
84 © 2020 Cadence Design Systems, Inc. All rights reserved.
SimVision UVM Sequence Debug Interactive Debug
Sequencer hierarchy
within the UVM
environment
Rapid debug of sequence based stimulus Can jump to the parent or Indicates whether item
Indicates the
sequencer that the
the root sequence is in flight or finished item belongs to
Double click of
any item opens
When items source in-scope
selected,
sequencer is
bolded
2) Notice we
are at the
apb0 master
sequencer
1) Select
sequence or
sequence
item
4) Hierarchy
jumps to
virtual
sequencer
Navigation
Filtering
Sequence-specific
breakpointing
• New Sequence Types pane allows users to quickly analyze all sequence types
Click the Sequence
– Shows how many of Types Tab to view
List of types currently in
each sequence and existence
sequence item exist at
current simulation time
– Can filter UVM base
sequences away
– Can filter sequences
and sequence items
that do not have
instances
Can see all members
• Users can now send any sequence based stimulus to the Sequence Viewer
– RMB -> Send To UVM Sequence Viewer
RMB
Selection
Sequence
Hierarchy
expanded with
item selected
UVM
component
hierarchy Individual set()/get() calls
Resources affecting
for the resource
selected component
Clicking on
Clicking on a
a
resource
resource access
access
takes users directly
takes users directly
to
to the
the source
source code
code
Clicking a
Resource resource shows
Names tab all entries in the
resource DB
No matching
components
Number of
set()
entries in the
with no
config DB RMB Menu show
get()
all components
affected by this
resource call
Register Hierarchy
(maps/blocks) – e or SV Registers Register Values
and Fields
Access Type
Values
currently
changing
Find Filtering
UVM field
automation
macros
• Macros are becoming increasingly more common within RTL code as well
Macro is expanded
inline with background
to indicate expanded
macro code
Source
Hover to see + annotations
sign for
expansion
• Most of the base class functionality provides much needed automation to the
SystemVerilog Language
– e has most of the automation built-in hence, smaller base class
• Most information contained within base classes is not needed by users
– Some fields are useful for debug though:
– m_parent_sequence: The parent sequence of the current sequence item
– m_sequencer: The sequencer that this sequence is being sent on
– m_name: Hierarchical location of this class within the environment
– m_parent: The parent of the current class
Run to end
of connect
debug
– Can set breakpoints to
stop at any UVM Run to Break
– Can explore the next on UVM
environment after a phase phase
phase executes
– Example, after build phase to
ensure environment is
constructed
– Can set breakpoints and
step through any custom
user code
– No wasted simulation Query UVM Phase
cycles from command line
Info on instance
and type
overrides
Registered
types
• Please see these Videos for more information on Method 1-4 debug features:
• YouTube:
• Cadence Online Support (COS):
− SimVision Quick Introduction to the Major SimVision Windows
• You can refer to
− SimVision Waveform Window Introduction
https://support.cadence.com – Resources
− SimVision Design Browser Introduction
– Video Library, Application Notes and
− SimVision Source Browser Introduction
Rapid Production Kits (Filter on “Indago
− SimVision Driver Tracing Introduction
Debug” Product)
− SimVision Automatic Driver Trace
− SimVision Signal Comparison using SimCompare
− SimVision Assertion Debug Introduction
− SimVision Class Browser Introduction
− SimVision Class and Transaction Based Debug
− SimVision Transaction Stripe Chart Introduction
− SimVision UVM Debug Commands
− SimVision UVM Toolbar and Messaging Hyperlinks
− SimVision UVM Register Viewer
− SimVision SystemC/C/C++ Debug with HDL
113 © 2020 Cadence Design Systems, Inc. All rights reserved.
Lab3: UVM Sequence Debug (NULL Pointer Issue)
Lab4: UVM Scoreboard Failure (Packet parity mismatch)
Note: There might be some issues if labs are decompressed/untar in Windows OS. To mitigate this, request is
to decompress/untar the labs in UNIX/LINUX.
114 © 2020 Cadence Design Systems, Inc. All rights reserved.
Access and Download RAKs from Cadence Support Portal
https://support.cadence.com
The SimVision interactive debug feature supports effective delta cycle debugging by allowing users to address 0-delay errors, debug event ordering issues, race conditions, and handle glitch debugging efficiently. This capability is essential for understanding precise timing issues that arise during simulation, particularly when dealing with complex verification environments like UVM . The advantages it offers during simulation include the ability to visualize and control the execution of each cycle comprehensively, identify critical timing issues, and probe into the sequence of execution events, which are crucial for diagnosing and resolving low-level simulation problems . Additionally, features like setting breakpoints and exploring variable contexts in real-time help enhance the effectiveness of debugging processes .
Sequence debugging in UVM can be challenging due to complex procedural chains and potential issues surfacing from low-level failures necessitating deep sequence tree navigation. SimVision provides a Sequence Viewer with hierarchy panes and sequence data visualization to aid this process. For macro usage, challenges arise from the large number of macros and their nested nature. SimVision allows inline macro expansion while maintaining original formatting and provides access to macro source code for effective debugging .
Driver tracing in SimVision faces several challenges and limitations. Users must ensure that all signals in the trace path are probed, and read access is required for these signals . SimVision's algorithms may not always determine the driver accurately, requiring static driver tracing as a fallback . Driver grading is unavailable at time 0, and variable delays inside conditional or iterative blocks are not supported, limiting traceability . The algorithm has a time limit; if the tracing operation times out, an invalid trace path may result . New System Verilog constructs might not be fully supported . Furthermore, tracing through memory addresses is performance-intensive and not feasible; users must identify when the value of interest was written into memory as a workaround . To mitigate these issues, users can use markers in the Waveform window to keep track of their starting point, and refrain from unnecessary interaction with the waveform to prevent changes in annotated values . Users should also be prepared for manual analysis when the algorithm cannot accurately predict a driver and utilize resources such as YouTube tutorials and Cadence Online Support to better understand tracing features and limitations ."}
Post-process debug techniques in SimVision accommodate dynamic data types by providing advanced visualization features and tools to manage the complexity introduced by these data types. SimVision allows the randomization of a single class multiple times during simulation, enables the resizing of internal variables, and facilitates the creation of new object handles, which are typical characteristics of dynamic data types . Post-process debug offers unique benefits such as the ability to visualize dynamic data changes within transactions, with features like class browser and transaction stripe charts that help users correlate transactions with signal and class activities . Additionally, probing HL (Hardware Language) objects for transaction recording, waveform visualizations, and value annotations allows debugging at multiple levels of abstraction, from signal to test bench levels . These innovative visualization capabilities greatly enhance the understanding and troubleshooting of complex systems involving dynamic data types during the post-processing phase ."}
UVM configuration debug in SimVision enhances the customization and verification process by providing a UVM Configuration Viewer that helps users navigate and debug configuration issues. It allows users to identify why fields in the environment received particular values, trace set()/get() calls in the source code, and recognize mismatches in resource names and set() with no get() situations. This tool simplifies the process of understanding configuration precedence and identifying locations in the code where fields are configured, thus reducing confusion and enhancing the debugging process . Additionally, the interactive GUI and scripting modes streamline the analysis, allowing users to query the configuration database effectively and to address configuration-related challenges more efficiently .
Command line debug in SimVision's batch mode facilitates effective simulation control by allowing users to query object and signal values, print drivers of signals, and set breakpoints, which enhance the debugging process . This mode is advantageous because it can be used in both batch and GUI modes, offering flexibility in various simulation environments . Key benefits of using command line debug include the ability to stop execution at precise points, a feature enhanced by setting breakpoints shortly before an error scenario, which allows users to step forward to the failure . Additionally, command line debug supports managing complexities involved in hardware verification languages, such as dealing with polymorphism, object partitioning, and coverage aspects, which are crucial for controlling and debugging simulations effectively ."}
The main steps involved in waveform signal comparison using SimCompare in HDL waveform inspection include: 1. Opening the waveform databases for comparison in the SimCompare Manager. 2. Dragging and dropping the scopes from the sidebar into the comparison area. 3. Clicking "Submit Compare" once the scopes are added. 4. Viewing results by clicking "View Results" after the comparison is completed. Mismatches are highlighted in red in the waveform area, and the SimCompare sidebar contains hyperlinks to each mismatch detected, facilitating easy navigation .
Mnemonic mapping in SimVision enhances the efficiency of waveform inspection by allowing users to apply highly customizable mnemonics to signals, providing a more intuitive and visually appealing representation of data. This customization helps in distinguishing signal states and understanding waveform navigation more quickly and accurately, facilitating easier identification of mismatches or areas of interest during waveform signal comparison . Mnemonic mapping ensures that users can efficiently apply these customizations to other signals through options in the Format-Radix/Mnemonic menu, further streamlining the inspection process .
Effectively managing the complexity introduced by UVM's phased execution and factory overrides involves several key strategies. First, leverage breakpoint and step-through capabilities to halt simulation at critical points like the start or end of phases, as this helps in understanding phase-specific behaviors and user extensions . Use tools like SimVision's UVM Phase Debug to set and explore breakpoints and observe post-phase execution to ensure the environment is constructed correctly . Additionally, handle factory overrides by printing factory information to the console and understanding the specific instance/type overrides and registered classes involved, which reduces confusion about unexpected class behaviors .
'Follow Signal' in connectivity tracing is used to trace signal connectivity upward or downward through the signal hierarchy. It allows the user to understand how a signal flows across the design without focusing on the full path through each driver and load, which can be complex and add unnecessary clutter . In contrast, full signal driver/load tracing involves identifying all possible drivers and loads that affect a particular signal. This can provide a comprehensive picture but is more detailed and involved, capturing all possible intermediate connections .