Introduction To Xcelium Gate Level Simulation
Introduction To Xcelium Gate Level Simulation
Introduction to Xcelium®
Simulator (XLM)
Gate Level Simulation
Agenda
SDF Annotation
SDF Annotation Flow
Gate-Level Sim. Debug
Summary
• You need to simulate fast clock with slow data, slow clock with fast
data.
• Most event simulators cannot directly do this.
4 May 16, 2017 Cadence Confidential
Timing Data Flow
Design Floorplan Delay Delay
Capture Refinement Calculation Calculation
• It is an IEEE standard.
– Originally developed by Cadence Design Systems as SDF 1.0.
– Updated and Maintained by Open Verilog International (OVI) with SDF
2.0, SDF 2.1 and SDF 3.0.
– Standardized as IEEE 1497-2001 DASC Standard Delay Format (SDF)
as SDF 4.0.
• Important
– IEEE 1076.4-1995 is based on SDF 2.1 while
IEEE 1076.4-2000 is based on a draft version
of the SDF 4.0 (IEEE P1497 Draft Standard
Delay Format).
• You can annotate the Verilog portions of your design with the
$sdf_annotate built-in system task.
– Task arguments correspond to command file entries.
– Only the SDF file name argument is required:
$sdf_annotate (“sdf_file”
{, module_instance}
{, “config_file”}
{, “log_file”}
{, “mtm_spec”}
{, “scale_factors”}
{, “scale_type”});
– The three parameters used regularly are the SDF filename, the module
instance and the log file.
– The SDF Config file contains commands that can alter SDF information
on its way into the simulation
– Important
• Use the –noautosdf xmelab’s option if you does not want to apply/use
sdf_annotate system task
vlog/vhdl
-sdf_simtime
COD
-sdf_orig_dir
Or xmelab
-sdfdir <dir>
– Simulation options SSS
+usemindelays
Or xmsim
+usemaxdelays
• You can annotate the Verilog portions of your design with the
$sdf_annotate built-in system task or any portions using the SDF
command file. GRAPHIC_EDIT
SDF Annotation
SDF Annotation Flow
Gate-Level Sim. Debug
Summary
• Examples
– You can also repeat the option to specify more than one command file.
For example:
% xmelab top -sdf_cmd_file cpu.sdf_cmd -sdf_cmd_file ebox.sdf_cmd
Important
• You can enter the statements in any order.
• Use commas to separate statements
• Use a semicolon after the last statement of the record.
• When multiple definitions for the same statement exist, the last definition
takes over.
20 May 16, 2017 Cadence Confidential
Preparing the SDF Command File
23
-sdf_verbose
May 16, 2017 Cadence Confidential Display detailed SDF annotator activity
Annotating SDF Data
SDF Annotation
SDF Annotation Flow
Gate-Level Sim. Debug
Summary
Error limit
Reject limit
• Transport delay mode
– all pulses transported to output Filtered/Inertial X
Simulator default delay modes differ. Simulators may provide command-line options
or simulator-specific compiler directives to manipulate the delay mode.
– enable the ability to specify unique delays for each source-load path
• Verilog-1995 used the onevent • For Verilog-2001 you can select the
pulse filtering style. ondetect pulse filtering style.
• pulsestyle_onevent • pulsestyle_ondetect
specify Not available in Verilog-1995 specify
pulsestyle_onevent outp; pulsestyle_ondetect outp;
(inp => outp) = 5 ; (inp => outp) = 5 ;
specparam specparam
PATHPULSE$inp$outp = (2,4); PATHPULSE$inp$outp = (2,4);
endspecify endspecify
inp inp
outp outp
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
– More generally, just check to see that you don't exceed 1000 warnings!!
• Use -warnmax 0 to print all warnings
31 May 16, 2017 Cadence Confidential
Setting up SDF Annotation
• These are some general rules that you should be aware of:
– Each SDF version reflects significant changes
• Cadence defined SDF version 1.0
• OVI defined SDF versions 2.0, 2.1, 3.0
• IEEE std. 1497-2001 defines SDF version 4.0
• IEEE std. 1076.4-2000 (VITAL) supports SDF version 4.0
– The annotator must apply SDF data in file order
• Subsequent LABEL, TIMINGCHECK, TIMINGENV replace previous
• Subsequent ABSOLUTE delays replace previous delays
• Subsequent INCREMENT delays add to previous delays
– The annotator must apply cell path data only to existing constructs
• Edge-qualified SDF cell paths do not map to unqualified cell paths
• Conditional SDF cell paths do not map to unconditional cell paths
• These are some tool-related issues that you should be aware of:
– The SDF escapes only individual identifier characters
– The SDF allows a port to be an internal node
– Annotators can convert INTERCONNECT delay to PORT delay
• Annotators can ignore INTERCONNECT delay
– Annotators must attempt to apply DEVICE delays to cell timing paths
• If unsuccessful, must apply to all primitives driving output port
– Simulation tools do not use TIMINGENV data
– Not all annotators use negative values
• Shall substitute 0 in ABSOLUTE clauses
• May substitute 0 in INCREMENT clauses
• Simulators typically do not use negative delay
• You use timing checks to verify that signals obey timing constraints
– Stability window checks
• $setup Setup data sufficiently before active clock edge
• $hold Hold data sufficiently after active clock edge
• $setuphold Combined setup and hold check permits a negative time limit
• $recovery Remove asynchronous control sufficiently before active clock edge
• $removal Remove asynchronous control sufficiently after active clock edge
• $recrem Combined recovery and removal check permits a negative time limit
– Event interval checks
• $nochange Second signal does not change while first signal in specified state
• $width Pulse width is sufficiently long
• $period Period is sufficiently long
• $skew Time between two signals is sufficiently short
• $timeskew Time between two signals is sufficiently short (variation)
• $fullskew Time between two signals is sufficiently short (variation)
clk clk
setuphold setuphold
data data
rst_ rst_
recrem recrem
clk clk
Keyword Specifies
-NTC_Tolerance 1. Specify the tolerance value for a negative
tolerance_value timing check timing window.
2. Suppress the warning messages that are
generated for $setuphold and $recrem timing
checks in which the negative value is greater than
the positive value, and in which the difference
between the two is less than the value specified
in the tolerance_value argument.
Keyword Specifies
-NTC_NEglim Adjust the negative limit for an invalid negative
timing check timing window.
-NTC_Poslim Adjust the positive limit for an invalid negative
timing check timing window.
• tfile
-TFile timing_file (Verilog only)
– Use the specified timing file. A timing file is a text file that lets you turn
off timing for particular instances or portions of a design.
• List of keywords
Keyword Specifies
DEFAULT timing_spec Specifies the default timing behavior for all inst.
BASENAME [path] [timing_spec] Specifies the starting point for the path in all
subsequent PATH statements.
PATH path timing_spec Specifies whether timing is on/off for all matches
CELLINST timing_spec Specifies whether timing is on/off for all instances
that are tagged as cells and their subhierarchy.
CELLLIB lib.cell:view timing_spec Specifies whether timing is on/off
INCLUDE timing_file Include the contents of the specified timing file
• Note: If the HDL contains a $setuphold statement and the user has specified in timing file to disable the $setup timing
check in the tfile, then that $setup portion of the $setuphold will be disabled. Any potential timing violation for the setup
portion will not be seen in the simulation run.
– The reverse is not true. If the HDL contains $setup or $hold statement and tfile contains the statement to disable the $setuphold timing check,
none of the individual timing checks of $setup or $hold will be disabled.
– The same rules apply to $recrem with respect to $recovery and $removal.
• For the RETAIN SDF keyword data that is a part of IOPATH constructs, the annotator tool that runs during elaboration will
ignore the RETAIN data ( and thus disable it ) through the use of the -sdf_ignore_retain switch for xrun or the xmelab
tool.
50 May 16, 2017 Cadence Confidential
Setting up GLS
Disabling specific timing checks @ elab time
// Disable timing checks in top.foo
• Example
// Disable timing checks in all scopes below top.foo
PATH top.foo.bar +tcheck // Disable timing checks for all objects in the library
mylib
CELLLIB mylib -tcheck
// No module path delays for all instances in the 2nd l
evels of hierarchy
PATH *.* -iopath
• tcheck
– The tcheck command turns timing check messages and notifier updates
on or off for a specified Verilog instance. The specified Verilog instance
can be an instance of a Verilog module instantiated in VHDL.
– tcheck Command Syntax
• tcheck instance_path -off | -on
Error Message
xmelab: *W,SDFNEP: Failed Attempt to annotate to non-existent path
xmelab: *W,SDFNET: Failed Attempt to annotate to non-existent timing check
Problem
• The annotator follows strict rules when it matches Verilog timing checks to the
corresponding SDF checks
Solution
– The SDF timing check translation rules are as follows:
1. 1. If you specify a module path delay or timing check that does not already exist in
the Verilog model, the simulators cannot annotate the timing information.
2. If there is an edge specifier in an IOPATH statement in an SDF file, there must be
an exact match of the same edge specifier in the HDL model.
3. If there is an edge specifier in a TIMINGCHECK statement in an SDF file, there
must be an exact match in the HDL code.
4. If there is no edge specifier in an IOPATH or TIMINGCHECK statement in an SDF
file, then the simulator annotates data to any path (or timing check) in the HDL
code that has the same reference, and data nets specified in the SDF IOPATH or
TIMINGCHECK statement. Therefore, non-edge specified IOPATH and
TIMINGCHECK SDF statements overwrite their corresponding edge-specified
paths and checks in HDL.
5. SETUPHOLD statements in your SDF file do not annotate data to corresponding
but separate $setup and $hold statements in your Verilog code. However, you
can use the +sdf_splitvlog_suh command-line option to cause the SETUPHOLD
checks in an SDF file to be split into their component SETUP and HOLD checks,
provided there are no negative values in those checks.
54 May 16, 2017 Cadence Confidential
Debugging GLS
An SDF 2 limit …
Error Message
xmelab: *W,SDFNG2: An SDF 2 limit timing check request (SETUPHOLD (negedge D)
(posedge CLK) (0.317) (-0.014)) contains a negative limit and was matched to 2
single limit timing checks. Negative limit will be set to 0.
xmelab: *W,SDFNL1 (dff_ars_seu2_1x.v,57|10):
Attempt to annotate a negative value to a 1 limit timing check in
instance(:STATE_reg_2), setting to 0.
Problem
• A negative timing check delay can only be applied to a two-limit timing check
specify block task. For example, a negative hold time must be matched by a
positive setup time in a single $setuphold timing system task call.
– Even if there exist corresponding individual $setup and $hold tasks, negative numbers
may not be annotated except to a single $setuphold task. These two warning types,
SDFNG2 and SDFNL1, cover the cases where an attempt is made to annotate
negative times to anything other than a two-limit timing check system task.
55 May 16, 2017 Cadence Confidential
Debugging GLS
The interconnect src …
Error Message
xmelab: *W,SDFINC: The interconnect src top.Q is not connected to the destination
top.A3 in instance <./slow.sdf, line 95>. The interconnect request will be replaced with
a port annotation at the destination.
xmelab: *W,SDFSDM: Annotating delays from a source on net test.Q to a port on
different net test.A3, annotation performed anyway.
Problem
• SDFINC / SDFSDM warnings indicate that the two ports mentioned in an SDF
INTERCONNECT statement are not connected to the same net in a design.
– The SDF annotator assigns the given delay to the destination port anyway.
– Indicates a difference between the data used to create the SDF file and the
information in the Verilog model.
– Different warning codes.
• SDFCAI / SDFCAP if a destination pin is connected to a single driver through a continuous
assignment
• SDFINC / SDFSDM If the source and destination are truly on different nets
• These warnings can be disabled
56 May 16, 2017 Cadence Confidential
Debugging GLS
Glitch
Error Message
Warning! Glitch suppression
Scheduled event for delayed signal of net "DD" at time 6FS was canceled!
Problem
• A schedule is cancelled when a delay schedules a transition to occur before a
previously scheduled transition. The message can only be generated for
Negative Timing Check delayed signals that have different rise and fall delays
calculated. In this case it is possible for the input events to cause a scheduled
output event to be cancelled. To better see what is going on:
• Add the option -ntc_verbose to the invocation. For the signals of interest compare the
calculated delays.
• Place monitors on the primary inputs for these delayed signals to see what they are doing
and to look at the input events to see how they compare to calculated delays for them
• If you want to see a glitch that happens in n FS, you'll need to do this by observing a
waveform that's dumped with event enabled
Solution
• Use the -nontcglitch switch when you run xmsim (three-step) or the
+ncnontcglitch switch when running xrun.
57 May 16, 2017 Cadence Confidential
Debugging GLS
Pulse
Error Message
Warning! Pulse flagged as an error, value = StE
File: …/….v, line = 3935, pos = 8
Node: ….Z
Time: 1828852 PS + 0
Problem
• This warning message can be caused by the use of the +pulse_r/0 and
+pulse_e/100 options. They will control when to report the messages. In
this case, using 0% and 100%, any pulse that is smaller than the delay from
the input to the output of any gate is detected, it will report a warning.
Solution
• Use the -epulse_no_msg option of xmsim when you invoke the simulator
to suppress the display of error messages for pulses smaller than
error_percent.
• Change the percentages to allow different amount of glitches to pass
through. However you should consult whoever’s in charge of the library for
the recommended amount of pulse rejection to set.
58 May 16, 2017 Cadence Confidential
Gate Level Simulation
SDF Annotation
SDF Annotation Flow
Gate-Level Sim. Debug
Summary
-OVERRIDE_PRECISION -- Override the timescale precision in Verilog modules with the timescale precision value
provided in -timescale commandline arg
-OVERRIDE_TIMESCALE -- Override the timescale directives in Verilog modules with the timescale value provided in -
timescale commandline arg
-PATHPULSE -- Set pulse limits according to PATHPULSE$
-PATHTRAN -- Kill pathdelays that are touching to many tran gates
-PRINT_HDL_PRECISION <arg> -- Prints VHDL timescale.
-PULSE_E <arg> -- Sets percentage of delay for pulse error limit for both specify paths and interconnect
-PULSE_INT_E <arg> -- Sets percentage of delay for pulse error limit only for interconnect
-PULSE_INT_R <arg> -- Sets percentage of delay for pulse reject limit only for interconnect
-PULSE_R <arg> -- Sets percentage of delay for pulse reject limit for both specify paths and interconnect
-SDF_FILE <arg> -- Specifies the SDF file to use
-SDF_NOCHECK_CELLTYPE -- Don't check accuracy of CELLTYPE field
-SDF_NOPULSE -- Ignore SDF pulse information
-SDF_SIMTIME -- Allow SDF annotation to happen during simulation
-SDF_SPECPP -- Use PATHPULSE parameters in specify block for pathpulse calculation
-SDF_WORSTCASE_ROUNDING -- For SDF annotation, truncate min delays, round max delays up
-SEQ_UDP_DELAY <arg> -- Specify a constant delay for sequential UDPs
-TFILE <arg> -- Timing file.
-TIMESCALE <arg> -- Set default timescale on Verilog modules
-XLIFNONE -- Emulate XL's ifnone SDF annotation implementation.