Professional Documents
Culture Documents
Hands-on Training
SpyGlass_vL-2019.06
Getting Started with SpyGlass®
Hands-on Training
Table of Contents
1 INTRODUCTION....................................................................... 3
1.1 Nomenclature ................................................................................ 3
8 GENERATING DASHBOARD/DATASHEET.......................................... 29
9 SHARING YOUR STATUS (LAB #5) ............................................... 30
9.1 Block Hand-off ............................................................................. 30
10 TOOLS ............................................................................ 31
1 Introduction
This document is the companion to the Getting Started with SpyGlass
training. This document provides instructions on running SpyGlass through
different design stages to gain hands-on experience on SpyGlass setup
and debugging/analysis of SpyGlass results.
1.1 Nomenclature
The following nomenclature is used throughout this document:
2.1.1 SPYGLASS_HOME
This variable is not mandatory to be set to run software but is useful for
supporting functions, such as path setup, moving to the top of the install
hierarchy, and so on.
(csh)
(sh, bash)
export SPYGLASS_HOME=<install_path>/SPYGLASS_HOME
2.1.2 PATH
2.1.3 EDITOR
You can invoke your favorite text editor directly from the SpyGlass
environment. To set up the text editor, set the EDITOR environment
variable as follows:
(csh)
setenv EDITOR <full-path-name-to-editor>
(sh, bash)
export EDITOR=<full-path-name-to-editor>
WB Connmax
(Verilog)
AHB2WB
(Verilog)
WB_Subsystem
For the purposes of this lab, the design is built as follows to highlight
specific features in SpyGlass:
• Top level USB controller block is available as a regular RTL but all of
its design files are read as a Verilog library component
• IMA_ADPCM block is pre-compiled into its own work library
(ima_adpcm_lib) and then get referenced at the top level of the
design
• Rest of the components are read as normal RTL files
4. Click on GUI option “Add File(s)”. This will open up the ‘SpyGlass: Add
File(s)’ window and add the following RTL files from the ‘rtl’ directory
as shown below:
../rtl/ahb2wb.v
../rtl/wb_subsystem.v
5. Now select GUI option ‘Set Options’ and enter the top level design
unit name for the block (wb_subsystem) as shown below:
6. Now Select Tab “Read Design” and click on option “Run Design
Read” to start the design read. Once the SpyGlass run is completed,
let’s review the design read errors reported by SpyGlass as shown
below.
There are three errors reported for the design (wb_subsystem), read
by SpyGlass. You will notice that these all errors are of same type
and are reported by SpyGlass rule ErrorAnalyzeBBox, which indicates
that SpyGlass did not find a definition of the block and hence
marked it as a blackbox. (Note: For complete design analysis using
SpyGlass, all black boxes should be resolved first and for that reason
you may additionally like to select checkbox ‘Synthesize Netlist’
while running design read.)
The ‘Design Setup’ step enables you to start your analysis while the
blocks are still being defined. The Module View marks the blocks as
follows:
• Green to indicate that the block is ready for analysis but not
yet internally synthesized
• Black to indicate that the block can’t be analyzed (black
boxes)
• White to indicate that the block is synthesizable and you can
select that DU and open modular schematic to see the
structure (with ‘Synthesize Netlist’ option enabled in design
read)
1. Click on “Goal Setup” tab and select “lint -> lint_rtl”. The purpose of
the selected goal can be read from the Help window adjacent to
goal selection window. As you can see from the help that “lint_rtl”
checks basic connectivity issues in the design, such as floating input,
width mismatch, etc.
Note: ‘lint_rtl’ goal help will be visible only when you select the lint_rtl goal.
(By making that goal highlighted with a blue bar and you can highlight
only one at a time during setting up goal, whereas you can enable
multiple goals just by enabling (by adding a tick) the checkboxes
towards left of the goal name and they will be executed sequentially.)
2. Click on “Run Goal(s)”. Once the run completes, the tool will
automatically take you to “Analyze Results”.
Expand the ERROR messages first. They reports the same black boxes
being reported from the design read stage.
Select and expand the InferLatch ERROR.
Double-click the first violation message. Note how the related line of RTL
code is highlighted in the HDL viewer above the results display, as
shown in the window below.
Carefully analyze this rule. You can further probe this issue as follows:
First, the message tells you that a latch has been inferred for certain
signal.
As you can see there is a NAND gate symbol attached with the
violation message, which indicates that violation message also has
some debug information in terms of schematic data. You can open the
associated schematic data by pressing key <i> or by clicking button for
Incremental Schematic on above of the Message view window. The
incremental schematic window will look as follows:
In this particular example situation, you can see that signal ‘hready’ is
getting assigned inside if statement without an else part and that seems
to be the valid reason for latch inference during synthesis. If design
requires hready signal to be latched w.r.t strobe signal ‘stb_o’, then this
is not an unintended structure. For the purposes of this lab we will
assume that these latches are intentional and so you may like to waive
the violation.
On the other hand, if you needed to fix the problem, you can click the
relevant HDL source-code line in the RTL View and press the <e> key on
the keyboard (or select ‘open Editor’ from the right click pop-up menu).
Then, SpyGlass will open the RTL source file using the default text editor,
as defined by the EDITOR environment variable, with the cursor on the
line that is selected in the RTL View window. You are now ready to edit
the source file and save the modified file and can rerun the goal.
3. Save the project file (File-> “Save Project” and then put
wb_subsystem as file name) and exit (File -> Exit).
2. In an external text editor, examine the following source file list for the
‘usb’ and ‘wb_conmax’ blocks
../rtl/usb/file.list
../rtl/wb_conmax/file.list
Now, add these source file lists in the project file (wb_subsystem.prj)
as mentioned below and save the project file.
read_file -type sourcelist ../rtl/usb/file.list
read_file -type sourcelist ../rtl/wb_conmax/file.list
3. Run design read again and this time provide the following option in
the project file to enable Synthesize during design read. For better
readability, add this option under ‘##Common Options Section’ in
project file and save it
5. You will notice that adding of above source files have resolved the
blackboxes errors for USB and WB_Conmax blocks, but has still
generated more blackbox errors for cells instantiated inside the USB
block as shown in the moresimple snapshot below.
6. Let’s specify the Verilog library path and extension to read the missing
definitions in the design. Specify the Libraries directory containing
libraries ‘../rtl/usb/usb_lib’ and
Specify Library File Extension: ‘.v’
Add the following commands in the project file
set_option y { ../rtl/usb/usb_lib }
set_option libext { .v }
7. Repeat the step #1 to re-run the design read to see if all the USB black
boxes are resolved. Only one blackbox error seen in the result
summary on the terminal
8. Please add enableSV option to read the System Verilog files
Note that we are left with just one black-box error and which is
coming for block ‘IMA_ADPCM_top’.
You will notice that the ‘file.list’ includes the -libhdlfiles option along with
the logical library mapping where the HDL files are to be compiled into.
This file also defines the mapping of logical library with physical location
using option “-lib”. Read this source file list into project file as mentioned
below:
2. Rerun design read to see if that resolves the blackbox errors coming
from ‘IMA_ADPCM_top’ using following command:
% rm –rf wb_subsystem
% spyglass –project wb_subsystem.prj –designread –batch
You will see the result summary that we resolved all the black-box errors.
With that we have completed second hands-on exercise of the training.
Goal status summary can be viewed any point of time using this
command
2. Let us run the first goal i.e. “lint/lint_rtl” in the list above, using following
command:
3. Once the run is complete, Review the results in the Result Summary
generated on run completion on the terminal as shown below:
4. After looking at Result Summary, you might want to see the details on
the violations. Open moresimple report generated during run @
./wb_subsystem/wb_subsystem/lint/lint_rtl/spyglass_reports/moresimp
le.rpt. Snapshot below for your reference
Note that ‘-batch’ option is not needed while running GUI mode.
7.2 Reports
Multiple reports are generated corresponding to each goal run, which
can be accessed from the Reports section of menu bar as shown
below:
Click on the moresimple report under More Reports, to get the starting
point to analyze the violations. The moresimple report looks like:
This report provides all the pointers with a violation to debug it easily.
Let us go through all the violations reported by SpyGlass lint goal run
picking one violation at a time. We can analyze these violations either
in GUI mode or batch mode.
From the message window you can see violation for rule W415. This rule
identifies nets which can be simultaneously driven by 2 or more drivers in
the design.
• Expand the W415 rule folder in the message window and look at the
underlying violation message. The violation message indicates that net
“WB_master_data_o” is driven by multiple drivers in top-level of the
design ‘wb_subsystem’. Let’s debug this issue and find out the root
cause in the RTL code.
• You will notice that a NAND gate symbol is attached with the
violation message, which indicates that violation message also has
some debug information in terms of schematic data. You can open
the associated schematic data by pressing key <i> or by clicking
Incremental Schematic button on above of the Message view
window. The incremental schematic window will look as follows:
• From schematic data, you will see two drivers that are driving the
reported signal (WB_master_data_o[0]) and it can be confirmed that
the port ‘m0_data_i’ is driven simultaneously by o/p ports ‘dat_o’ (of
instance ahb2wb_u0 ) and ‘m0_data_o’( of instance conmax_u1).
Hence the violation reported is structurally correct.
The fix for these violation require an update to RTL. The code however
uses an “ifdef” construct to enable the fixed code. Let’s enable the
definition of “Fix_W415”.
• Review the violation message, rule and design unit (DU) details on which
the waiver is to be applied in the lower half of the Waiver window. This
Once the waivers are completed, click on ‘Edit File’ item in the waive
editor (on right click menu) and save the file as
“wb_subsystem_files/wb_subsystem.awl” for future reference.
Now when you save the project file, SpyGlass will add a waiver file read
command in the project file but saved in
./wb_subsystem/wb_subsystem/lint/lint_rtl/ as an input file to the tool.
read_file -type awl
./wb_subsystem/wbsubsystem/lint/lint_rtl/wb_subsystem_waiver_file.awl
At the same time as you just have single waiver file, so, this one becomes
the default waiver file and is dumped in the project file with following
option:
read_file -type awl
./wb_subsystem/wb_subsystem/lint/lint_rtl/wb_subsystem_waiver_file.awl
This will result in a clean block which is ready for hand-off. With that we
have completed fourth hands-on exercise of the training.
8 Generating Dashboard/Datasheet
Generation of SpyGlass DashBoard and SpyGlass DataSheet reports for
the block (wb_subsystem) as part of handoff too. These reports are a part
of default repots generation if user has set the required license in the
setup.
You can also use the DashBoard report to watch the progress of the
block during RTL development. You would be required to ensure that
Design objectives are passed. They relates to specific products like
CDC, Constraints, DFT and Power and we have not covered them as
part of this training/lab and hence ignoring that part of the report
during handoff.
firefox wb_subsystem/html_reports/dashboard.html
firefox wb_subsystem/html_reports/datasheet.html
• SGDC constraints
• SpyGlass waiver
• SpyGlass DashBoard report
• SpyGlass DataSheet report
1. The following script will capture all the required data and save it in
a new directory “wb_subsystem_package”
%source package_block.csh
% cd ../spyglass/
10 Tools
The tools directory contains a few sample scripts which are used in the
training labs. These scripts are purposely kept simple to illustrate how a
user may use those. You are welcome to use and modify these scripts to
use them in your design flows. The scripts include:
• package_block.csh : Used to assemble the files needed to
package an IP for shipment
End of Document