Overview of Formality Labs For Debugging Failing Verifications
Overview of Formality Labs For Debugging Failing Verifications
Purpose: These labs are designed for you to find, analyze, and solve
common equivalency checking problems using Formality. You can use
these labs to increase your awareness of Formality and to practice
debugging skills.
Content: These labs use public-domain RTL source. The netlists were
generated using Design Compiler F-2011.09 release software.
Procedure:
There is a README file for every lab describing what to do.
Each lab has a “runme.fms” FM Tcl script you can use initially.
Each lab has a “hint” directory containing a README file if you
need some helpful pointers on what to do.
If you find that a lab is too difficult, there is a “.solution”
sub-directory with the correct solution.
Please compare your results with the correct results when you
finish each lab.
This lab document will guide you through each lab.
Lab flow:
When faced with a missing piece of the reference design, you can either
find the missing piece and try verification again. Or, you can try to
black-box the equivalent sub-design in the implementation design, if
the hierarchy was retained during synthesis.
3.) For this lab, you can find the missing RTL by quickly browsing in
the “rtl” sub-directory and include the missing file in your FM Tcl
script. Re-run verification.
4.) After running verification again, notice that the transcript still
has these messages:
3
set_top i:/WORK/mR4000
Setting top design to 'i:/WORK/mR4000'
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U32' to its reference
design 'fa2a0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U31' to its reference
design 'fa1b0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U30' to its reference
design 'fa2a0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U29' to its reference
design 'fa1b0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U28' to its reference
design 'fa2a0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U27' to its reference
design 'fa1b0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U26' to its reference
design 'fa2a0'. (FE-LINK-2)
Warning: Cannot link cell '/WORK/mR4000/DP_OP_94J1_124_8045_U25' to its reference
design 'fa1b0'. (FE-LINK-2)
5.) Since verification already ran, if you run the “Analyze” command,
Formality will indicate that there are unmatched black-box nets in the
implementation design that do not exist in the reference design. This
is another indication of something missing in the implementation
design.
4
6.) Find the missing library and include it in the FM Tcl script. Re-
run verification.
7.) During this verification run, Formality located all of the design
pieces and library information. However, verification is still
failing. The only clue for this issue is the following statement in
the transcript:
Info: Formality Guide Files (SVF) can improve verification success by automating
setup.
You need to include the SVF guidance file in the FM Tcl script:
set_svf mR4000.svf
9.) You can automatically create a FM Tcl script by using UNIX command
“fm_mk_script”. Try the following:
fm_mk_script mR4000.svf
Lab flow:
Under the Debug tab, run "Analyze". Formality knows that the logic
cones are different, but cannot pinpoint the specific problem.
6
View the pattern window of one of the failing compare points. Notice
that the logic just seems to be different even though the logic cone
inputs are the same:
7
In many situations where one compare point is holding a value while the
other compare point is loading a different value, this is an indication
of RTL interpretation differences between Formality and Design
Compiler. It is likely that something like parallel/full case pragma
interpretation is making a difference in the verification of this
design.
3.) Resolve the RTL interpretation issue. You can set these variables:
4.) Fix up the FM TCL script and re-run verification. If you do not
get a successful verification, view the .solution directory.
8
Lab flow:
Unless the Auto Setup Mode is enabled, Formality will ignore scan_input
guidance found in the SVF file. You will need to disable scan mode in
your FM Tcl script. Continue on with the debugging first.
2b) Using the GUI, run “Analyze” on the failing compare points. You
will see the following:
9
3.) Before changing the FM Tcl script, view the Match tab. Look at the
unmatched points listed for the implementation design.
11
Also note that the “clk_gate_...” latches are of type “LAT” and not
“CGLAT” denoting clock-gating latches.
setup
set_constant i:/WORK/aes_cipher_top/test_se 0
set verification_clock_gate_hold_mode low
verify
5.) Fix up the FM TCL script and re-run verification. If you do not
get a successful verification, view the .solution directory.
6.) Note that if you use the Auto Setup Mode with “set
synopsys_auto_setup true”, Formality will automatically disable scan
and turn on clock-gating. You would not have to do anything else for
setup.
12
Key ideas:
a.) Practice using these Formality SVF debugging command:
“analyze_points” with the option “-failing”
Lab flow:
2b) Here is a picture of the GUI unmatched points tab. Notice the
single unmatched register in the reference design that does not exist
in the implementation design. Sometimes this is fine. We need to
confirm with using either the “analyze” command or the pattern viewer
to see if this register contributes to failing compare points.
-----------
--------------------------------
Found 1 Rejected Guidance Command
--------------------------------
The rejection of some SVF guidance commands will almost invariably
cause verification failures. For more information use:
'report_svf_operation -status rejected -command command_name
--------------------------------
reg_constant
-----------
--------------------------------
**********************************************************************************
******
15
4.) Now, let’s look at the reason for Formality rejecting the SVF
reg_constant guidance.
6.) After modifying the svf.txt file, rename the directory from
“formality_svf” to “modified_svf”. Change the Formality TCL script to
point to the new directory. Formality will look for SVF files in the
specified directory.
7.) After running with the modified SVF file, the Guidance Summary
should be clean. You should have a successful verification.
8.) Instead of modifying the SVF, you could have verified this register
against a constant1, and found that it was truly a constant 1. Then,
you could use the set_constant command to manually set this register to
a constant1 value. This will also give a successful verification
result.
17
Lab flow:
Status: Verifying...
Compare point u1/LOCKUP failed (is not equivalent)
Bring up the GUI and view the Match tab. Here is a picture of the GUI
unmatched points tab.
18
Here we see some hints about what is happening. The failing compare
point r:/WORK/core/u1/LOCKUP is affected by a globally unmatched latch
i:/WORK/core/u1/clk_gate_stage1_reg2/latch1.
3.) Viewing the pattern viewer for the failing compare point:
19
It appears that even though these latches are clk-gating latches, they
are not acting like clock-gating latches for this failing compare
point. It appears that the failures are happening if FM places
opposite values on them. Normally, clock-gating latches do not act as
“active” logic cone inputs.
4.) The logic cones confirm that Formality is placing and using
different values on these supposed clock-gating latches:
20
At this point you can see that these clk-gating latches are not driving
the clk-pin of a rising edge DFF, but rather are going into the lockup
latch instead.
Objective: This lab will help you identify and repair a design
difference. You must correctly change the gate-level netlist to get a
successful verification.
Lab flow:
The reference design has two input ports that are named “global_rst”
and “reset”. These seem to be missing in the logic cone for this
compare point. Notice the “X” on the D-input of this implementation
register compare point.
Note the undriven net in the implementation design. This is the key to
the verification difference. The net name is "internal_reset".
6.) Search for this net in the Verilog netlist. You will need to edit
the netlist. Use your favorite editor to view and repair the netlist.
(FYI - You can bring up a browser window by selecting the component
this net drives, bringing up the menu (right mouse click), and
selecting View Source. However, cannot edit using this browser.)
You might also want to view the netlist object for this net using the
menu item View Object.
7.) Trace this net in the netlist to the components it connects with.
Ponder why it is not working and fix it.
Lab flow:
…
set signature_analysis_match_compare_points false
…
Info: Formality Guide Files (SVF) can improve matching performance and success by
automating setup.
…
If you got this script from another engineer in your company, please
ask them why they are turning off signature analysis? Ask them why
they are not using the SVF file?
4.) Run “Analyze”. Formality indicates that there are logic cone
inputs that exist in the implementation design that do not exist in the
reference design. This could be caused by clock-gating or by scan, or
other problems.
26
There are several unmatched compare points. This can be one of the
problems with this verification.
6.) At this point we are confident that at least some of the failures
are due to matching problems. Try one of the following to correct this
issue:
7.) After correcting the script, run through verification again to see
what problems remain. Notice that the number of unmatched points has
significantly diminished.
8.) Matching now looks good; however, there are still failing compare
points. Try using the “Analyze” feature to get clues for debugging.
28
9.) Formality indicates that test logic is not disabled, but should be
for RTL vs Gate verification.
11.) Fix up the FM TCL script and re-run verification. View the
example “runme.fms” under the .solution directory.