Spy Glass Quick Guide
Spy Glass Quick Guide
Spy Glass Quick Guide
QuickStart Guide
Contents
June 2008 1
SpyGlass QuickStart Guide
Reading-in a Design
Getting Started
Analyze and improve your designs quickly and easily using SpyGlass Predictive Analyzer.
Pre-Requisites
• RTL or netlist design data for the chip, IP block, or any part of the chip or IP
• A simulation script if possible, to define what source files are needed, in the proper order
• Build scripts for any VHDL libraries used
• Synopsys .lib files for instantiated gates and blocks
HDL Compatibility
• HDL (Verilog and VHDL) library mapping can be achieved by spyglass –lib <logicalname>
<physical_directory> <other_args>
June 2008 2
SpyGlass QuickStart Guide
• The library mapping is specified using the following style, under: [LIBRARY] section L1 =
./L1_path --> -lib L1 ./L1_path
Translate your modelsim script file as follows:
• DEFINE foo <path> --> -lib foo <path>. Add to file libmap.f
Now, translate your NCSim script commands as follows:
• ncvhdl -WORK <lib> ..vhdl files.. --> spyglass -mixed work <lib>…vhdl files…–f libmap.f
• ncvlog -WORK <lib> ...verilog files --> spyglass -mixed -enable_precompile_vlog work <lib>
..verilog files ..-f libmap.f
• NCSim, default is VHDL87 while for SpyGlass, it is VHDL93, hence:
- ncvhdl ent87.vhd.... --> spyglass -87 ent87.vhd..., and,
- ncsim -V93 ent93.vhd.. --> spyglass ent.93.vhdl...
• Compile a library using SpyGlass in normal manner with –lib option to specify library:
• spyglass <args> –lib <logicalname> <libdirectory> -work <logical name>
• Add –enable_precompile_vlog while compiling Verilog libraries
• Use –dump64bit option to create libraries for 64 bit platforms
• Do not move compiled libraries
June 2008 3
SpyGlass QuickStart Guide
• Obtain the list of all Verilog and VHDL files, by looking at commands:
- read_verilog/read_vhdl (for TCL shell scripts)
- read –format verilog / read –format vhdl - for tool’s native shell scripts (–format could also
be written as –f)
- analyze –format vhdl “<design_files>”/analyze –format verilog “<design_files>” (DC
command to analyze VHDL and Verilog files). The equivalent SpyGlass commands for
analyzing the VHDL and Verilog design files are as follows:
%> spyglass –vhdl
%> spyglass -verilog
- the files can be specified on the command line, or, put into a file, which is then specified
as –f option to SpyGlass
Handling Designware™
Design Ware Components
June 2008 4
SpyGlass QuickStart Guide
Troubleshooting
Syntax, elaboration, or out-of-date errors:
Verilog: Re-check the file order. Include files may be out of order. Also, the files containing
parameters should be placed in the file list before the files that reference those parameters.
VHDL: While compiling, check file order, if not sorted, add –sort on the command-line
Sorting via GUI: Select the option in GUI – Window->Options-Verilog or VHDL->sort
• Multiple tops are usually an indication of something wrong (For example, missing hierarchy).
Multiple tops may also indicate that testbench files have been inadvertently included in the
file list
• –top option can still be used to select only the top-level you want to run (through SpyGlass):
-top <top-design-name>
Blackboxes:
• If design is showing blackboxes (Rule: DetectBlackBoxes), check, if they are intentional, or,
something has been missed from the design description
Hang or abnormal exit:
• Re-run, adding –w switch and note where problem occurs (spyglass.log will be helpful). If in
analysis or synthesis, note module/entity name and add command line option –stop <module
name>
• If problem in a rule, add command-line option –ignorerules <rulename>
• If design contains large inferred memories, use –handlememory option
June 2008 5
SpyGlass QuickStart Guide
Getting Started
Pre-Requisites
• Ability to read-in the design for simpler (for example, BlockDesign/Create) analysis
• Compiled gate library for instantiated library cells
• SDC file or SpyGlass constraints file describing clocks and resets
• Create an SGDC file containing sdcschema –file <your_sdc_file> (e.g., sdcschema top.sdc)
• Add –sdc2sgdc option to SpyGlass run
• Translation converts clocks and set_case_analysis statements and will use them for CDC
analysis
• Translated file can be viewed under spyglass_reports/sdc2sgdc
June 2008 6
SpyGlass QuickStart Guide
• If you have mutually exclusive clocks (for example, test, system), add set_case_analysis
constraints to SGDC on controlling signal
• Add constraints.sgdc to analysis using File >Source > Constraints
Synchronization Checks
Select Sync_checks template and run. Check Clock_sync01 violations. Control analysis:
Schematic Debugging
If a rule shows a gate in policy tab, it has a related schematic view. Click the Incremental
Schematic icon to bring up the incremental schematic. Cross-probe from RTL to schematic
(double-click a signal in RTL) or from schematic gate to RTL (single-click an instance in schematic).
• Check Report >Clock-Reset-Summary for flops which will not be checked – either
unconstrained or constant D-input
• Check the parameter one_cross_per_dest. By default, only one crossing per destination is
reported
If too many domain crossings are reported:
June 2008 7
SpyGlass QuickStart Guide
Analyzing Testability
Getting Started
Find and fix testability problems before they become difficult to resolve at the gate level through
SpyGlass’ unique DFT capabilities.
Pre-Requisites
June 2008 8
SpyGlass QuickStart Guide
• If you want to accurately test propagation of testmodes to memory, use DFT memory related
constraints (see DFT documentation)
• Start with the same constraints file used for Clocks analysis
• For each clock used as a testclock, add option –testclock to that constraint, e.g.,
clock –name CLK –domain domain1 –value rtz -testclock
• Add testmode constraints to reflect correct settings for testmode signals, e.g.,
testmode –name top.scanmode –value 0
June 2008 9
SpyGlass QuickStart Guide
Schematic Debugging
If a rule shows a gate in Msg Tree tab, it has a related schematic view. Click v to bring up a
schematic. Cross-probe from RTL to schematic (double-click a signal in RTL) or from schematic
gate to RTL (right-mouse-click->Probe to RTL).
Overlay testmode or testclock info by holding down Ctrl then double-click Infotestmode/testclock
message.
Troubleshooting
Can’t get coverage above 0.0?
Getting Started
Obtain design inputs, create constraints files and let the tool do the rest.
Pre-Requisites
June 2008 10
SpyGlass QuickStart Guide
Constraints File
SDC Constraints (and, most of the commonly used non-SDC but supported by the native shell of
DC, PT, Magma) should be usable as is.
If the constraints files have reference to .db files, the corresponding library’s .lib description
should be made available. Please refer to “Resolving Library Elements” section under “Reading
in a Design”.
Commands which drive the actual execution of some tools (such as those related to actually
synthesize, perform timing-analysis, or report its results) are ignored by the policy.
Run
June 2008 11
SpyGlass QuickStart Guide
Schematic Debugging
If a violation shows a gate, it has a related schematic view. Click i to bring up an incremental
schematic. Cross-probe from RTL to schematic (double-click a signal in RTL) or from schematic
gate to RTL (right-mouse-click->Probe to RTL).
Troubleshooting
• First check for SDCPARSE errors. An error here means constraints have not been read
correctly
• Note that SpyGlass does not interpret read_verilog or read_vhdl commands. Design source
must be supplied on the command line, as for other SpyGlass analyses
• SpyGlass Constraints supports a wide range of SDC commands, however, if you see a
violation stating that one or more commands is not supported, read your constraints into the
native tool (e.g., PT), use write_sdc to elaborate the constraints and run SpyGlass on
elaborated constraints
Getting Started
Find voltage and power domain issues in a design having multiple voltage/power domains.
Pre-Requisites
• RTL, gate netlist with .lib or post layout netlist with .plib
• SpyGlass constraints file describing voltage and power domains
• Define voltage domains which are always-on parts of the design and are specified using the
voltagedomain constraint
• Define power domains which are parts of design that can be switched on and switched off
and are specified using the voltagedomain constraint
June 2008 12
SpyGlass QuickStart Guide
• Define isolation cells which are used to isolate the outputs of power domains and are defined
using the isocell constraint
• Define level-shifters which are used at the junction of parts of design that are working at
different voltages and are specified using the levelshifter constraint
• Supply rails for a design are specified using the supply constraint.
• Define power switches which are used to control the power domain supply and are specified
to SpyGlass LP using the powerswitch constraint
Special Features
The following special features can be used while specifying values of important nametype
arguments:
• Wildcards like * and ?. This feature is especially useful in specifying gate instance names
from flattened netlists and cell names from libraries
• Vector signal names as whole name, part-selects, or bit-selects
Important Rules
• Open the report lp_rule_req.rpt and see if any mandatory constraint is needed for the rules
run
• Set options to check on more domain crossings
- Set –lp_flag_unconnected_nets for flagging unconnected domain crossings
- Set –lp_flag_undriven_nets for flagging the undriven domain crossings
If too many domain crossings are reported:
June 2008 13
SpyGlass QuickStart Guide
- Specify the ports and terminals of Analog Block in correct voltagedomain using portname
field
- Specify any missing Level-Shifter and Isolation cells
- Specify –enableTerm in levelshifter constraint if level-shifter is with isolation capability
- Specify supply constraint for supply rails for ignoring violations reported on them
• Use waivers to drop violations such as violations in previously validated IPs
- Add waive –ip <ip_du_name> in your SGDC file
• Set options to filter out groups of violations:
- Set –lp_skip_buf and –lp_skip_buf_isocell for ignoring the violations on
SpyGlass generated buffers
- Set –lp_skip_pwr_gnd to ignore violations on supply nets and supply rails
Getting Started
There is more than one way to view analysis results in SpyGlass. The most convenient way is to
view results graphically.
Viewing Results
• The Msg Tree tab organizes the issues in different orders based on the user preference. For
example, issues are organized by policy (clock, dft, etc), then by rule if the grouping order
“Policy” is selected. You can change the grouping order according to your requirements.
• By Module/Entity: Select the Module tab and double-click required module in Design View
• By Source file: select the File tab and double-click required file in File View
All violations/messages can be cross-probed to source HDL by double-clicking the violation.
• The Reports menu pull-down lists a variety of pre-defined reports which can be viewed,
searched, printed, and saved
• Some of these reports are always available, for example, simple and moresimple reports
provide standard tabular report formats
June 2008 14
SpyGlass QuickStart Guide
• Some reports become available after certain runs, for example, Clock-Reset-Summary report
becomes available after running the Clock policy or methodology
Schematic Viewing
If a rule message in the policy window has a small AND gate on the left, violations on that rule
have associated schematic data. You can also use schematic viewing independently of
violations.
There are two schematic views available:
June 2008 15
SpyGlass QuickStart Guide
Getting Started
You just ran SpyGlass and had a huge number of issues reported and you don’t know what to
do next.
June 2008 16
SpyGlass QuickStart Guide
Suppress Messages
Use the Waive capability to suppress individual messages or groups of messages
• Select waive for given line or block of lines (selected by mouse drag) to suppress messages
for selected file contents
Noisy Rules
If you find a particularly noisy rule, chances are that there are parameters you can set to control
the behavior of the rule. However, you cannot control STX or WRN rules in this way.
To find which parameters might affect the rule, right-click a violation. This will often (but not
always) tell you which parameters are relevant.
A more reliable guide is the on-line documentation for the rule. Select on-line help and pick the
appropriate policy documentation.
To change a rule parameter, select a violation on the rule then right-mouse click and select
Setup… to find parameters for that rule. Clicking in the entry field for a parameter will give help
on use of parameter and allowed values.
June 2008 17
SpyGlass QuickStart Guide
Atrenta, Inc.
2077 Gateway Place
Suite 300
San Jose, California 95110
1-866-ATRENTA (1-866-287-3682)
http://www.atrenta.com
June 2008 18