Synopsys Formality Workshop
Synopsys Formality Workshop
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09 1- 1
Unit Objective
Compare Points
Formality 2005.09 1- 2
Formality is an Equivalence Checker
Formality 2005.09 1- 3
4
Synopsys Smart Verification
VCS Magellan
RTL LEDA • LEDA – RTL Checker
VCS MX Vera
Timing ®
PrimeTime Functional
Formality®
Regressions
Static Timing Analysis Regressions
Equivalence Checking
ECO
SignOff
Formality 2005.09 1- 4
6
Formality® Equivalence Checker
Verifies Functionality Throughout Entire Flow
RTL
RTL Coding
Ambiguities Synthesis
Scan
BIST
JTAG
CTS
IPO
Route
ECO
Manually Generated
Bad Logic Signoff Netlist
Formality 2005.09 1- 5
7
Formality® in Your Verification Flow
RTL
RTL RTL to gate (handoff)
Simulation Check chip integration
Final verification (setup)
Gate to gate
Formality
Most common application
Faster verification
Faster debugging
Isolates errors as they occur
Formality
RTL to gate (tape out)
Final verification
Formality ECO verification
Formality
Formality 2005.09 1- 6
8
What Formality® Is Not
Formality 2005.09 1- 7
10
Two Key Concepts
Compare Point
A primary output of a circuit
A registers within a circuit
An input to a black boxes within circuit
Logic Cone
A block of combinational logic which drives a compare
point
Formality 2005.09 1- 8
12
Two Key Concepts - schematic
Compare Point
Logic
Cone
BB
BB
Formality 2005.09 1- 9
13
Breaking Design Into Cones and Points
D Q
BB
Formality 2005.09 1- 10
15
Match Compare Points
CP
CP CP
D Q
BB
Implementation Design
Formality 2005.09 1- 11
17
Verify Design
Either
Confirms same response for all possible input combinations.
Marks point as “passed”
Or
Finds a “counter example” that shows different response
Marks point as “failed”
Formality 2005.09 1- 12
19
Formality Flow Overview
Cause?
Formality 2005.09 1- 13
20
Formality Terminology - 1
Reference Design
The “golden” design under test
Implementation Design
The modified design under test that is to be checked against
the reference design
Containers
Entity which stores all elements of a design to be tested
Default reference container is named “r”
Default implementation container is named “i”
You can create other containers and use as reference or
implementation
Formality 2005.09 1- 14
21
Formality Terminology - 2
Matching
Process of aligning compare points between two designs
Verification
Process of proving / disproving that compare points are
equivalent (have same functionality)
Debug
Designer investigation of a failing verification to identify
why compare point(s) have failed verification
Formality 2005.09 1- 15
22
Summary
Formality 2005.09 1- 17
24
Day 1 Agenda
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09 2- 1
Unit Objectives
Formality (R)
Version X-2005.09 – Aug 10, 2005
Copyright (c) 1988-2005 by Synopsys, Inc.
ALL RIGHTS RESERVED
fm_shell (setup)>
Formality 2005.09 2- 3
4
Invoking Formality: GUI
Formality 2005.09 2- 4
6
Launching GUI from within fm_shell
Formality (R)
Version 2005.09 – Aug 10, 2005
Copyright (c) 1988-2005 by Synopsys, Inc.
ALL RIGHTS RESERVED
fm_shell (setup)>start_gui
Formality 2005.09 2- 5
8
.synopsys_fm.setup File
When Formality is invoked, it reads a file called
.synopsys_fm.setup, containing commands such as:
set search_path “. ./lib ./netlists ./rtl”
history keep 200
alias h history
Formality 2005.09 2- 6
9
Formality Command Syntax and Tcl
Formality 2005.09 2- 7
11
Tcl Variables in Formality
Formality 2005.09 2- 8
13
Formality’s Tcl Variables
Formality 2005.09 2- 9
15
Formality’s Tcl Variables
Formality 2005.09 2- 9
16
Getting Brief Help On Commands
fm_shell (setup)>
fm_shell (setup)>
Formality 2005.09 2- 10
18
Command Editing and Completion
NAME
FM-016 (error) Can't open file %s
DESCRIPTION
The specified file does not exist or cannot be created.
WHAT NEXT
Verify that you specified the correct filename and that
you have permission to open and create files.
Formality 2005.09 2- 12
21
Other Help Sources
Outside of Formality:
Formality documentation (release notes and user
guides) in .pdf format on the web
http://www.synopsys.com
SolvNET
Login to SolvNet
Choose a document
SOLV-IT
http://www.synopsys.com
SolvNET
Login to SolvNet
Enter your “Search SOLV-IT” question or
Choose from one of the SOLV-IT search choices
See appendix B for more information on SOLV-IT
Formality 2005.09 2- 13
23
Running Formality Scripts
Formality 2005.09 2- 14
25
Files that Formality Generates
Working files
FM_WORK directory
fm_shell_command.lck and formality.lck
Formality automatically deletes all Working files when
you exit (gracefully).
Formality 2005.09 2- 15
27
Summary
Formality 2005.09 2- 16
29
Review Questions
GUI/shell
Getting to know the
Formality environment
25 minutes printvar/help/man
source script.tcl
Report
Formality 2005.09 2- 18
33
Command Summary
fm_shell [-gui] Launch Formality from Unix
command line
formality Launch Formality GUI from
Unix command line
start_gui Launch Formality GUI from
Formality shell
printvar Display current value of a tcl
variable
set Set value of a tcl variable
Formality 2005.09 2- 19
35
Day 1 Agenda
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09 3- 1
Unit Objectives
Start
0: Guidance
3: Setup
Specify Automated Setup File
Success
2: Read Implementation ? N
Design + Libs Y
set_top End
Formality 2005.09 3- 3
4
Basic Formality Script
#Step 0: Guidance
set_svf default.svf
# Step 3: Setup
# No setup required here
DC FPGA
Third Party Tools
Xilinx ISE
Formality 2005.09 3- 5
8
Step 0: Guidance - Example
Formality 2005.09 3- 6
10
Steps 1 and 2: Reading the Designs
Formality 2005.09 3- 7
11
Setting Reference and Implementation Design
For the default “r” container the set_top command automatically sets
the reference design
The read-only variable $ref specifies the current reference design
For the default “i” container the set_top command automatically sets
the implementation design
The read only variable $impl specifies the current implementation
design
Formality 2005.09 3- 8
12
Step 1: Read the Reference - Example
Formality 2005.09 3- 9
13
Step 2: Read the Implementation Design - Example
Formality 2005.09 3- 10
14
Step 3: Setup
Formality 2005.09 3- 11
15
Step 3: Setup - Example
Formality 2005.09 3- 12
16
Step 4: Match
Before verification you must match compare points by either:
Explicitly running Formality’s matching algorithms
Allowing the “verify” command to run matching for you
Formality 2005.09 3- 13
17
Step 4: Match - Example
Recommendation:
In interactive work use the explicit match command
Gives you important feedback
Omit the match command from scripts
Reduces runtime
Formality 2005.09 3- 14
18
Step 5: Verify
Formality 2005.09 3- 16
20
Step 6: Debug
Formality 2005.09 3- 17
21
The Seven Steps and the GUI
You have learned the seven steps
using Tcl
The GUI prompts you to perform
the same seven steps:
Numbered tabs identify each
step
If you skip a step, you are
informed
Step-sensitive tabs allow you to
see detail
You do not have to remember
Tcl syntax
The GUI translates your mouse
clicks to Tcl for you
The GUI stores your preferences
in ~/.synopsys.fmg
You will work with the GUI in the
lab
Formality 2005.09 3- 18
23
Saving/Restoring Containers
Formality 2005.09 3- 19
25
Saving/Restoring Session Files
Formality 2005.09 3- 19
26
Saving/Restoring Your Work - Example
Formality 2005.09 3- 20
27
Summary
2. What are the three ASCII formats that Formality can read
design data in?
Formality 2005.09 3- 22
29
Find the problem in this script - 1
read_verilog -r alu.v
set_top alu
read_verilog -i alu.fast.vg
set_top alu
read_db –i class.db
verify
Formality 2005.09 3- 23
31
Find the problem in this script - 2
read_verilog -r alu.v
read_db –i class.db
read_verilog -i alu.fast.vg
set_top r:/WORK/alu
set_top i:/WORK/alu
verify
Formality 2005.09 3- 24
32
Lab 3: Basic Formality Flow
Formality 2005.09 3- 25
33
Command Summary - 1
set_svf Specify guidance file
Formality 2005.09 3- 27
36
Day 1 Agenda
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09
4- 1
Unit Objectives
Formality 2005.09
4- 2
Formality Flow Overview
Start
0: Guidance
3: Setup
Specify Automated Setup File
Success
2: Read Implementation ? N
Design + Libs Y
set_top End
Formality 2005.09
4- 3
4
Design Libraries
Examples:
r:/WORK/top
i:/MY_LIB/top_0
read_verilog -f sim_option_file
Simulator setup file containing file pathnames and other
commands and options
Irrelevant switches are ignored
Can load all design files and simulation models for the technology
libraries in one command
Formality 2005.09
4- 5
6
Simulation-style Verilog Design Read
Formality 2005.09
4- 6
7
Simulation-style Verilog Design Read Example
# file read.tcl
set_top –auto
Formality 2005.09
4- 7
9
Verilog Text Macros in Formality (VCS style)
VCS
vcs file1.v file2.v +define+def1
def1 applies to all files read on vcs command line
Formality
read_verilog { file1. file2.v } -vcs
"+define+def1"
def1 applies to all files in read_verilog and during
set_top commandExactly matches VCS
Formality 2005.09
4- 8
11
Verilog Text Macros in Formality (DC Style)
Design Compiler
analyze –f verilog file1.v –define {def1}
analyze –f verilog file2.v –define {def2}
Each analyze command has its own list of defines
Formality
read_verilog {file1.v} –define {def1}
read_verilog {file2.v} –define {def2}
Each read command has its own list of defines
Formality 2005.09
4- 9
13
Reading Verilog Netlist and RTL files
Formality has an optimized netlist reader
Formality tries the optimized netlist reader first, and
falls back on an RTL reader if necessary
Mixing netlists and RTL files in the same read
command will slow the reading
Use separate commands to read netlist and RTL files
Formality 2005.09
4- 10
15
Technology Libraries
Formality 2005.09
4- 11
17
Technology Library: Simulation or Synthesis?
Formality 2005.09
4- 12
18
Synopsys Synthesis Libraries
Formality 2005.09
4- 13
19
Verilog Simulation Libraries
Formality 2005.09
4- 14
20
Verilog Simulation Libraries
Formality 2005.09
4- 15
21
Verilog Simulation Libraries
For others
Leave it to the library experts
Won’t cover in this class
Formality 2005.09
4- 16
23
Reading VHDL designs – recommended flow
Formality 2005.09
4- 17
25
Reading VHDL – multiple read_vhdl commands
Formality 2005.09
4- 18
26
DesignWare: What Is It?
parameter width=256;
parameter A_width=256, B_width=256;
output [width*2-1:0] Y;
input [width-1:0] A, B;
endmodule
Formality 2005.09
4- 19
28
DesignWare: How to Deal With It
You must set variable before you read anything into the container
that will hold the RTL
Formality 2005.09
4- 20
30
Example - How not to load DesignWare
fm_shell output when user forgets to set hdlin_dwroot
Formality 2005.09
4- 21
32
Summary
Technology Libraries
Read db libraries as shared libraries
Use VCS switches to read Verilog simulation libraries
Formality 2005.09
4- 23
34
Command Summary - 1
read_verilog -f Read Verilog using VCS
simulation option file
read_verilog –vcs Read Verilog files using VCS
“<switches>” style switches
VCS switches
Formality 2005.09
4- 25
36
Day 1 Agenda
5 Matching
6 Verification
Formality 2005.09
4a- 1
Unit Objectives
Formality 2005.09
4a- 2
Black Boxes: What Are They?
Formality 2005.09
4a- 3
Black Boxes: Require Attention
Formality 2005.09
4a- 4
5
When would you want to use a Black Box?
Formality 2005.09
4a- 5
7
How to create a black box
Formality 2005.09
4a- 6
8
Black Boxes - recommendations
Formality 2005.09
4a- 7
9
Black Boxes: Wrapper Model
/*File ram.v */
endmodule;
Formality 2005.09
4a- 8
10
Black Boxes: hdlin_interface_only
Formality 2005.09
4a- 10
12
Black Boxes: why is an instance unresolved?
Formality 2005.09
4a- 11
13
Setting a Black Box property
set_black_box r:/WORK/mod
remove_black_box r:/WORK/mod
report_black_boxes “mod” is the
design name, not
the instance name
Formality 2005.09
4a- 12
14
Black Boxes: Specifying Pin Directions
Formality 2005.09
4a- 13
15
Finding Black Boxes using fm_shell
fm_shell (setup)> report_black_box
Information: Reporting black boxes for current reference and implementation designs.
(FM-184)
__________________________________________________
| |
| Legend: |
| Black Box Attributes |
| s = Set with set_black_box command |
| i = Module read with -interface_only |
| u = Unresolved design module |
| e = Empty design module |
| * = Unlinked design module |
|___________________________________________________|
##################################################################
#### DESIGN LIBRARY - i:/WORK
##################################################################
Design Name Attributes
----------- ----------
sRAM01 s
##################################################################
#### DESIGN LIBRARY - r:/WORK
##################################################################
Design Name Attributes
----------- ----------
sRAM01 i
Formality 2005.09
4a- 14
17
Finding Black Boxes with the GUI
Formality 2005.09
4a- 15
19
Black Box Summary
Method Command / Variable report_black_box
shows as
Formality 2005.09
4a- 16
21
Review Questions
Formality 2005.09
4a- 17
22
Command/Variable Summary
set hdlin_interface_only Following read operations
<Design Name(s)> will read only the interface
declaration for the design
set hdlin_unresolved_modules Determines how unresolved
<error | black_box > modules are handled
5 Matching
6 Verification
Formality 2005.09
4b- 1
Unit Objectives
4b- 2
RTL Simulation and Synthesis
4b- 3
Why Simulation / Synthesis Differences?
3. Synthesis pragmas
User directives to Design Compiler
Ignored by simulators
4b- 4
Warnings throughout Synopsys flow
4b- 5
6
Simulation-Synthesis Recommendations
4b- 6
8
No hardware implementation - list
Comparison to X or Z
Explicit
Comparison to undriven signals
Use of “===“ in Verilog
Initial statements
4b- 7
9
Incomplete Sensitivity List - RTL
input a, b;
output q;
reg q;
always @ (a)
q = a & b;
endmodule
4b- 8
12
Incomplete Sensitivity List – Formality (Overridden)
Set hdlin_warn_on_mismatch_message
4b- 9
14
No hardware implementation - checking
Comparison to X or Z
Initial statements
Timing dependent
Delay or transport (VHDL) statements
OK if total delay on path less than clock period in RTL and in gates
Example unit delay blocking assignment style is OK
Depends if difference is reachable
Assignment in multiple concurrent processes
4b- 10
16
No hardware implementation - Summary
Be very careful!
4b- 11
17
Out of range access - Verilog
4b- 12
18
Out of range access Verilog – DC (default)
Access to address 15
Write operation writes to array[7]
Read operation returns contents of array[7]
4b- 13
19
Out of range access Verilog – DC (Non default)
Access to address 15
Write operation leaves array undisturbed
Read operation returns ??
Matches simulation
In simulation read returns X
4b- 14
20
Out of range access – Formality (Verilog)
Controlled by hdlin_dyn_array_bnd_check
Important settings are:
Verilog (default)
None
Formality models
For ‘Verilog’ matches simulation
For ‘None’ matches default synthesis
4b- 15
21
Out of range access – Formality (VHDL)
Simulation
Out of range access is a VHDL runtime error
Design Compiler
As Verilog
Formality
Controlled by hdlin_dyn_array_bnd_check
Important settings are Verilog (default) and VHDL
(By default) Formality matches synthesis for VHDL Files
Since out of range access is a runtime error your RTL and
synthesized gates will not “disagree” in simulation
4b- 16
23
Out of range access - Recommendations
4b- 17
25
Synthesis Pragmas
4b- 18
26
How Does Formality Handle Pragmas?
4b- 19
27
Full_case and Parallel_case
// synopsys full_case
Asserts that all possible clauses of a case statement have been
covered
Avoids the need for default logic, and
Can avoid latch inference from a case statement by asserting that
all necessary conditions are covered by the given branches of the
case statement.
// synopsys parallel_case
Tells the synthesis tool to evaluate all case-items in parallel.
Generates multiplexer logic instead of priority encode logic.
4b- 20
29
Possible false equivalence from full_case
4b- 21
30
full_case - Example
always @ (current_state)
case (1) // synopsys full_case
current_state[0] : next_state = state2;
current_state[1] : next_state = state3;
current_state[2] : next_state = state1;
endcase
endmodule
4b- 22
31
full_case - Example
4b- 23
32
full_case - Example
4b- 24
33
full_case – Simulation Results
4b- 25
34
full_case - Simulation Results: explanation
4b- 26
35
fulll_case - Summary
4b- 27
36
Is Difference Reachable?
Example
Full case for one hot decoding driven by one hot counter
In simulation/operation no problem – provided there is a
power on reset
How to handle?
Check with Formal Vera
Apply constraint
Override warning
4b- 28
37
Simulation / Synthesis Summary
4b- 29
38
Review Questions
4b- 39
Lab 4: Design Read
Lab 4 :
1. ???
4b- 25
40
Backup Slides
4b- 30
41
VHDL Signed Division by Power of 2
4b- 31
42
Presto VHDL: Signed Division by Power of 2
4b- 32
43
Day 1 Agenda
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09 5- 1
Unit Objectives
Formality 2005.09 5- 2
Compare Point Matching
Fundamentals of Matching
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 3
4
Compare Point Matching – align designs
BB BB
a_reg[31] a_reg[31]
BB BB
Formality 2005.09 5- 4
5
Fundamental Assumptions by Formality
Formality 2005.09 5- 5
7
Matching would be trivial if ….
Formality 2005.09 5- 6
8
Compare Point Matching
Fundamentals of matching
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 7
9
DC and Formality instance names
(By default) compare point names are same in ref and impl:
(By default) Formality and DC create same names from RTL
ungroup
group
uniquify
Formality 2005.09 5- 8
10
Examples of Name Changes by DC
Formality 2005.09 5- 9
11
Cases from DC where no 1:1 Match Exists
Formality 2005.09 5- 10
12
Compare Point Matching
Fundamentals
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 11
13
Synopsys Guidance Flow
Formality 2005.09 5- 12
14
Guidance Flow - Script
Set_guidance example.svf
Read_container –r r.fsc
Read_container –i i.fsc
match
Formality 2005.09 5- 13
15
Guidance Flow - Summary
Formality 2005.09 5- 14
16
Compare Point Matching
Fundamentals
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 15
17
Compare Point Matching without SVF
User control
Compare Rules
Filter Character
Variables
User Matches
Formality 2005.09 5- 16
18
Compare Point Matching - Flow
3. Signature Analysis
4. Topological Analysis
Formality 2005.09 5- 17
20
Exact Name Matching
Advice
There are a number of control variables
In general you should only need to alter setting of
name_match_filter_char_list
Formality 2005.09 5- 18
21
Exact Name Matching example
Original names
(REF) : $ref/a_reg[1]
(IMP) : $impl/a_reg_1
Compare tokens
a == a, reg == reg, 1 == 1
Formality 2005.09 5- 19
22
Exact Name Matching - Quiz
(Insert a table)
$ref/alu/a_reg[1] and $impl/alu/a_reg_1_
$ref/alu/a_reg[1] and $impl/alu_a_reg_1_
$ref/alu/a_reg[1] and $impl/alu_a_reg_1_v
$ref/alu/a_reg[1] and $impl/alu/a_regy1y
$ref/alu/a_reg[1] and $impl/alu_1_a_reg_1_
Formality 2005.09 5- 20
23
Exact Name Matching - Quiz
Formality 2005.09 5- 21
24
Signature Analysis
Formality 2005.09 5- 22
26
Subset Name Matching
Settings of name_match_allow_subset_match
None – very safe
Strict – default
Any – some risk of incorrect matches
Formality 2005.09 5- 23
27
Regular Name Changes – a strategy
Formality 2005.09 5- 24
28
Reviewing unmatched by name points
Formality 2005.09 5- 25
29
Write Compare Rules (1/2)
Formality 2005.09 5- 26
30
Write Compare Rules (2/2)
Exercise:
Transformed name – sample 1:
RegA[1] -> RegA_10
RegA[31] -> RegA_310
Logically, how can you fix this with search and replace?
Formality 2005.09 5- 27
32
Compare Point Matching
Fundamentals
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 28
35
What can cause unmatched points?
Constant registers
Formality 2005.09 5- 29
36
Unmatched Points: Summary
If tab 4.Match->Unmatched Points shows you have
unmatched points, use the following table to determine
what action you need to take.
Symptom Possible Cause Action
Same number of unmatched Names have - set user match
points in ref and imp undergone a - write compare rule
transformation - modify name_match* variables
- turn on signature analysis
- verify the fix with match
More unmatched points in ref DC has removed - no action necessary
than in imp Redundant regs
Ignoring a full case - change hdlin_ignore_full_case
directive in rtl code to false
black box was - read missing cells into ref
created for missing - make black box in imp
cells
More unmatched points in imp design - account for design
than in ref transformation transformation
created extra logic
black box was - read missing cells into imp
created for missing - make black box in ref
cells
Formality 2005.09 5- 30
37
Compare Point Matching
Fundamentals
Unmatched Objects
Recommendations (Summary)
Formality 2005.09 5- 31
38
Matching - Recommendations
Formality 2005.09 5- 32
39
Review Questions
Formality 2005.09 5- 40
Lab 5: Matching compare points
Formality 2005.09 5- 25
41
Day 1 Agenda
4 Reading Designs
5 Matching
6 Verification
Formality 2005.09
6- 1
Unit Objectives
6- 2
Possible Results of Verification
Verify command
fm_shell (match)> verify
Possible Results
Succeeded: implementation is equivalent to the reference
6- 3
4
Successful Verification #1 (Transcript)
Status: Verifying...
6- 4
5
Classification of Points
Cut - cut-points
6- 5
7
Reporting Passing Points
6- 6
8
When will a verification pass? (Default)
6- 7
9
Successful Verification #2 (RTL)
endmodule
6- 8
11
Successful Verification #2 (Gates)
endmodule
****************************************************************************************
Status: Verifying...
6- 10
13
Unread Points
fm_shell (verify)>
6- 11
15
Successful Verification #3 (RTL)
endmodule
6- 12
16
Successful Verification #3 (Gates)
endmodule
. . . . .
********************************* Verification Results *********************************
Verification SUCCEEDED
----------------------
Reference design: r:/WORK/test
Implementation design: i:/WORK/test
2 Passing compare points
----------------------------------------------------------------------------------------
Matched Compare Points BBPin Loop BBNet Cut Port DFF LAT TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent) 0 0 0 0 1 1 0 2
Failing (not equivalent) 0 0 0 0 0 0 0 0
****************************************************************************************
fm_shell (verify)>
6- 14
18
Successful Verification #4 (Circuits)
// Reference
module test ( a, b, q1 );
input a, b;
output q1;
AN2 U2 ( .A(b), .B(a), .Z(q1) );
endmodule
//Implementation
module test ( a, b, q1, q2 );
input a, b;
output q1, q2;
wire n3, n4;
AN2 U2 ( .A(b), .B(a), .Z(q1) );
AN2 U5 ( .A(n3), .B(a), .Z(q2) );
IV U7 ( .A(b), .Z(n3) );
endmodule
6- 15
19
Successful Verification #4 (Transcript)
Status: Verifying...
Matched Compare Points BBPin Loop BBNet Cut Port DFF LAT TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent) 0 0 0 0 1 0 0 1
Failing (not equivalent) 0 0 0 0 0 0 0 0
****************************************************************************************
fm_shell (verify)>
6- 16
20
Successful Verification #5 (Circuits)
// Reference
module test (d, q, r_w, clk);
input [3:0] d;
input r_w, clk;
output [3:0] q;
endmodule
//Implementation
module test (d, q, r_w, clk, te);
input [3:0] d;
input r_w, clk, te;
output [3:0] q;
6- 17
21
Successful Verification #5 (Transcript)
Status: Verifying...
Matched Compare Points BBPin Loop BBNet Cut Port DFF LAT TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent) 6 0 0 0 4 0 0 10
Failing (not equivalent) 0 0 0 0 0 0 0 0
****************************************************************************************
fm_shell (verify)>
6- 18
23
Successful Verification #6 (Circuits)
// From Reference
case (q)
4'b0001 : q <= 4'b0010 ;
4'b0010 : q <= 4'b0100 ;
4'b0100 : q <= 4'b1000 ;
4'b1000 : q <= 4'b0001 ;
default : q <= 4'bXXXX ;
endcase
//From Implementation
FD1 \q_reg[0] ( .D(N15), .CP(clk), .Q(q[0]) );
FDS2 \q_reg[1] ( .D(q[0]), .CP(clk), .CR(n2), .Q(q[1]));
FDS2 \q_reg[2] ( .D(q[1]), .CP(clk), .CR(n2), .Q(q[2]));
FDS2 \q_reg[3] ( .D(q[2]), .CP(clk), .CR(n2), .Q(q[3]), .QN(net2));
ND2 U5 ( .A(n2), .B(net2), .Z(N15) );
IV U6 ( .A(start), .Z(n2) );
Status: Verifying...
Matched Compare Points BBPin Loop BBNet Cut Port DFF LAT TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent) 0 0 0 0 4 4 0 1
Failing (not equivalent) 0 0 0 0 0 0 0 0
****************************************************************************************
fm_shell (verify)>
6- 20
26
Failed Verification #1 (Transcript)
Status: Verifying...
6- 21
27
Reporting Failing Points
6- 22
29
When will a verification fail? (Default)
6- 23
30
Failed Verification #2 (Transcript)
verify
Reference design is 'r:/WORK/test'
Implementation design is 'i:/WORK/test'
6- 24
31
Failing Verification – Example #3
6- 25
32
Failing Verification #3 (Transcript)
----------------------------------------------------------------------------------------
Matched Compare Points BBPin Loop BBNet Cut Port DFF LAT TOTAL
----------------------------------------------------------------------------------------
Passing (equivalent) 0 0 0 0 34 0 0 34
Failing (not equivalent) 0 0 0 0 0 20 0 0
Aborted
Unver (^C/limit hit) 0 0 0 0 0 14 0 14
****************************************************************************************
fm_shell (verify)>
6- 26
33
Review Questions
6- 27
34
Lab 6: Verification
6- 28
35
Command Summary - 1
verify Verify design
6- 29
36
Command Summary - 2
set_dont_verify Exclude point(s) from
verification
remove_dont_verify Undo exclusion of point(s)
from verification
report_dont_verify Generate report listing all
points that are excluded from
verification
6- 30
37
Variables Summary
verification_failing_point_limit Determines when
verification will stop if
there are failing points
verification_passing_mode Determines if passing
points are required to be
exact matches or
consistent
verification_set_undriven_signals Determines how undriven
signals are modeled
verification_status Read only variable. Useful
for tcl scripts.
6- 31
38
Day 2 Agenda
9 Advanced Usage
Formality 2005.09 7- 1
Unit Objectives
Formality 2005.09 7- 2
Two Key Concepts - reminder
Compare Point
Logic
Cone
BB
BB
Formality 2005.09 7- 3
4
Difficult Design Transformations
Formality 2005.09 7- 4
5
Examples from Synopsys synthesis flow
DFT Compiler
Internal Scan
BSD Compiler
Boundary Scan
Power Compiler
Clock Gating
Design Compiler
Constant Register Removal
Pipeline retiming
FSM Optimization
Formality 2005.09 7- 5
6
Formality Flow Reminder
Start
Setup
Read Reference
Design + Libs
Match
set_top
Debug
Verify
Formality 2005.09 7- 6
8
Internal Scan: What Is It?
Formality 2005.09 7- 7
9
Internal Scan: Why It Requires Attention
data_in D Q D Q D Q data_out
clk
Pre-Scan
Post-Scan
data_in D Q D Q D Q data_out
scan_in si so si so si so scan_out
scan_en se se se
clk
Formality 2005.09 7- 8
11
Internal Scan: How to Deal With It
Formality 2005.09 7- 9
13
Boundary Scan: What Is It?
Formality 2005.09 7- 10
15
Boundary Scan: Why It Requires Attention
The logic cones at the primary outputs are different
The logic cones driven by primary inputs are different
The design has extra state holding elements
Pre-Boundary Scan Post-Boundary Scan
data1 out1
data1 out1
DQ
data3 out3
data3 out3 Tap
DQ
Controller
Formality 2005.09 7- 11
17
Boundary Scan: How to Deal With It
Formality 2005.09 7- 12
19
Clock Gating: What Is It?
Formality 2005.09 7- 13
21
Clock Gating
Before Clock Gating
0
1
Data In
DQ Data Out
GN
clken
Register Bank
CLK
Formality 2005.09 7- 14
23
Clock Gating: Why Is It an Issue?
Formality 2005.09 7- 15
25
Clock Gating: How to Deal with It
Formality 2005.09 7- 16
27
Clock Gating: Things to Be Aware Of
verification_clock_gate_hold_mode affects
the entire design:
It can not be placed on a single instance
Formality 2005.09 7- 17
29
Constant Register Removal – the Problem
Formality 2005.09 7- 18
31
Constant Register – The solution
Use SVF
Formality
Verifies that register can only go to 0 (or X)
For downstream verification uses constant 0
Formality 2005.09 7- 19
32
Pipeline Retiming: What Is It? (1/2)
Formality 2005.09 7- 20
33
Pipeline Retiming: What Is It? (2/2)
D Q
D Q
D Q
Formality 2005.09 7- 21
35
Pipeline Retiming: How to Deal With It
Exception
DesignWare DW02_n_stage_mult components
Formality recognizes and retimes automatically
Formality 2005.09 7- 22
37
Retiming: Things to Be Aware of
Formality 2005.09 7- 23
39
Re-encoded FSM: What is it?
Formality 2005.09 7- 25
41
Re-encoded FSM - Options
Formality 2005.09 7- 26
43
Re-encoded FSM: SVF Solution
Operation :
fsm_reencoding
Current design :
Design_A
Previous state vector :
State_reg[1]
State_reg[0]
Text version of Current state vector :
file state_info S3
S2
S1
S0
State reencoding :
begin : 2#00 -> 2#0001
state1 : 2#01 -> 2#0010
state2 : 2#10 -> 2#0100
end : 2#11 -> 2#1000
Formality 2005.09 7- 27
44
Re-encoded FSM: SVF Solution
Formality 2005.09 7- 27
45
Re-encoded FSM: DC report_fsm
.state_vector
s_reg[0]
s_reg[1]
File state_info
.encoding
rd 16#0
wr 16#1
rs 16#2
Formality 2005.09 7- 28
47
Re-encoded FSM: FM commands
Formality 2005.09 7- 29
49
Re-encoded FSM: Things to Be Aware Of
Formality 2005.09 7- 30
51
Review Questions
Formality 2005.09 7- 31
53
Day 2 Agenda
9 Advanced Usage
Formality 2005.09 8- 1
Unit Objectives
Start
0: Guidance
3: Setup
Specify Automated Setup File
Success
2: Read Implementation ? N
Design + Libs Y
set_top End
Formality 2005.09 8- 3
Debugging Flow Chart
Start
display failing 3: Setup
points
unmatche N
Problem Design Fix
identified? Error?
d
points?
design
Y
choose point
Check for failing to debug
SVF operations
display pattern
change setup window
Formality 2005.09 8- 4
Resolving Black Boxes
Formality 2005.09 8- 5
Unmatched points - example
More unmatched points in ref than FM is ignoring full case - change hdlin_ignore_full_case to false
in imp DC removed constant registers - check for failed SVF operations
- adjust FM reg init settings
- read missing cells into ref
Black box in ref
- make black box in imp
- check for failed SVF operations
Re-encoded FSM
- apply FSM reencoding manually
More unmatched points in imp than Design transformation created - check for failed SVF operations
in ref extra logic - set verification_clock_gate_hold_mode
- read missing cells into imp
Black box in ref
- make black box in ref
- check for failed SVF operations
Re-encoded FSM
- apply FSM reencoding manually
Same number of unmatched points Names have undergone a - check for failed SVF operations
in ref and imp transformation - set user match
- write compare rule
- modify name_match* variables
Formality 2005.09 8- 7
Unmatched Points – The 5 Main Causes
Formality 2005.09 8- 8
Displaying Unmatched Points
Formality 2005.09 8- 9
Display Failing Points
Formality 2005.09 8- 10
Display Failing Points - GUI
Formality 2005.09 8- 11
Diagnosis
Run diagnosis
Formality 2005.09 8- 12
Error Diagnosis Vocabulary
Formality 2005.09 8- 13
How does it work?
Formality 2005.09 8- 14
Path Trace Procedure : example
0 1 0 1 1 0 1 1 1 0 1 1 0 1 0
A B C D E A B C D E A B C D E A B C D E
X1 X2 X1 X2 X1 X2 X1 X2
0 1 1 0 0 1
X3 X4 X3 X4 X3 X4 X3 X4
0 0 1 0 1 0
X5 X6 X5 X6 X5 X6 X5 X6
O1 O2 O1 O2 O1 O2 O1 O2
0 0 0 0 0 0
Formality 2005.09 8- 15
Path Trace Procedure : example
0 1 0 1 1 0 1 1 1 0 1 1 0 1 0
A B C D E A B C D E A B C D E A B C D E
X1 X2
X3 X4 X4 X4 X4
X5 X6
O1 O2 O1 O2 O1 O2 O1 O2
Formality 2005.09 8- 16
Example: Start with a failing verification and click diagnose button
Formality 2005.09 8- 17
Diagnosed Error Window: After diagnosis completes
Formality 2005.09 8- 18
Viewing error logic cone
Formality 2005.09 8- 19
Which failing compare do you want to debug?
Formality 2005.09 8- 20
Schematic zooms to failing gate and matching region
Formality 2005.09 8- 21
Pruning button – Shows the failing path
Formality 2005.09 8- 22
Diagnosing subset of failing points
Formality 2005.09 8- 23
TCL commands and variables
Formality 2005.09 8- 24
Things to watch for…
Logic cone sizes > 50000 are not diagnosed by default. See
diagnosis_cone_size_limit
Formality 2005.09 8- 25
If Error Diagnosis is unable to isolate the problem?
Formality 2005.09 8- 27
26
Show Cone Sizes
Formality 2005.09 8- 28
27
Display Pattern Window
Formality 2005.09 8- 29
28
Display Pattern Window – Look for Clues
2 1
Formality 2005.09 8- 30
29
Display Logic Cone
Formality 2005.09 8- 31
30
Isolate Difference
Formality 2005.09 8- 32
31
Review Questions
Formality 2005.09 8- 33
32
Day 2 Agenda
9 Advanced Usage
Formality 2005.09 9- 1
Unit Objectives
Formality 2005.09 9- 3
Topics
Distributed processing
Incremental verification
Hierarchical Verification
Changing level with $ref, $impl
Problems of bottom-up
Hier-IQ
Write_hierarchical_script
Manual intervention
Formality 2005.09 9- 4
Formality® Distributed Verification
Distribute load across 4 processors for faster run time
Master process
• Reads design
• Matches design
• Sends partitions out for verification
• Debug design
Formality 2005.09 9- 6
Distributed Verification - Example
• Design contains 9 verification partitions
• One partition takes 60 minutes to verify
• Remaining partitions take 10 minute
• Sent to 3 distributed processors
Formality 2005.09 9- 7
Distributed Verification
Formality 2005.09 9- 8
Single Point Verification
Formality 2005.09 9- 9
Incremental Verification -1
To resume verification
Useful after a verification has timed out
Preserves failing and passing points
Works on inconclusive points only
Ignores changes in setup or matching
Changes may invalidate previous results
Default behavior
You do not need to enter the -incremental
Formality 2005.09 9- 10
Incremental Verification -2
To restart verification
Works on all points
Previous verification results are ignored
Respects changes in setup or user matches
Will rerun matching if there are changes
Formality 2005.09 9- 11
Changing design to be verified
Formality 2005.09 9- 12
Caution
Formality 2005.09 9- 13
Hierarchical Verification - Background
Formality 2005.09 9- 14
Hier-IQ reduces need for bottom-up verification
Formality 2005.09 9- 16
15
Why can bottom-up give false failures?
Potential problems:
Equivalent input ports (e.g. clock buffering)
Constant inputs that are optimized in implementation
More complex constraints on input ports
Unread output ports optimized in implementation
Equivalent output ports on black-boxed modules
Constant output ports on black-boxed modules
Formality 2005.09 9- 17
16
Example - Clock Tree Buffering
ff3 ff3
D Q D Q
clk clk3
Formality 2005.09 9- 18
Clock Tree Buffering: Why It Requires Attention
Formality 2005.09 9- 19
Automated Solution
Use command
write_hierarchical_verification_script
Formality 2005.09 9- 20
21
Manual hierarchical or bottom-up verification
Commands required
Set_black_box
Set_constant
Set_dont_verify
Set_user_match
Warning
Be very cautious about using set_equivalence!
Formality 2005.09 9- 21
22
Example – Hierarchical Verification
Pre-Buffering Post-Buffering
top top
ff3 ff3
D Q D Q
clk clk3
Formality 2005.09 9- 22
23
Clock Tree Buffering: How to Deal With It
Formality 2005.09 9- 23
24
Review Questions
Formality 2005.09 9- 24
26