Mapping LEC
Mapping LEC
Mapping LEC
Application Note
Understanding
Key Points Mapping
In
Logic Equivalence Checker (LEC)
Table of Contents
Purpose ....................................................................................................................... 3
Audience ...................................................................................................................... 3
What are key points? ................................................................................................... 4
What is key point mapping? ......................................................................................... 5
Why is mapping necessary? ........................................................................................ 6
Types of Mapping ........................................................................................................ 7
Name-Based Mapping ............................................................................................. 7
Function-Based Mapping ....................................................................................... 12
Available Mapping Method Options ........................................................................... 13
Unmapped Key Point Categories............................................................................... 16
Recommendations ..................................................................................................... 17
Purpose
When performing formal verification using the Conformal Equivalence
Checker (EC), mapping plays a key role. This document studies the various
aspects of mapping, including the types of mapping, and the available
options that cover the various scenarios of mapping. This application note
also gives a brief picture regarding handling of not mapped key points.
Audience
This document is intended for conformal users who are looking for better
picture of mapping in terms of mapping of key points, mapping types,
handling of not mapped points and categories of not mapped points along
with usage of available mapping options.
You cannot pair different types of key points. For example, a DFF cannot
be mapped to DLAT or BBOX. You can map a Golden DFF key point
ff_reg1 to its counterpoint ff_reg1 in the Revised design.
Golden Revised
PI PI
PO PO
DFF DFF
DLAT DLAT
BBOX BBOX
CUT CUT
Z Z
E E Corresponding key points are mapped
Mapping is done so that the tool knows which Golden combinational logic
cone to compare to which Revised combinational logic cone. When
mapping is complete, the two designs are ready for comparison. The
comparison is done between two corresponding key points (called the
compare points) in the Golden and Revised designs for the combinational
logic feeding these compare points. If the logic cones between the two
compare points are not the same, the tool returns a non-equivalent point
(NEQ).
Types of Mapping
There are two types of mapping: name based and function based.
Name-Based Mapping
In name-based mapping, the tool maps key points based on their name—
looking for key points with the same name in both the Golden and Revised
designs. Name-based mapping is the preferred mapping approach
because, as compared to function-based mapping, it takes less time and
the chances of an incorrect mapping are negligible.
After name-based mapping is performed, the left over key points will have
different names between the Golden and Revised designs. There are
several ways you can make their names similar in both designs:
Naming rules
Naming rules will be applied in RTL and facilitates in name based mapping
with netlist. Naming rules should be applied before reading designs and
libraries.
For instance, naming rules are highly useful in case of generate blocks.
end
end
endgenerate
}}}
• Using {{{set naming rule "%s" "%s_%d" "%s" -instance}}} (the default
Conformal setting) would rename the instances as:
n1, n2 and n3 as n1_0, n2_0_23, and n3_0
• Using {{{set naming rule "%s" "%L[%d].%s" "%s_INS" -instance}}} would
rename the instances as:
n1, n2 and n3 as forblkB[0].n1_INS,forblkB[0].forblkC[23].n2_INS, and
forblkB[0].n3_INS
Renaming rules
Renaming rules are applied when the instance names are different in
golden and revised however shares a common pattern.
For instance :
Unmapped points in golden: Unmapped points in revised:
Abc/fifo_reg[0][0] Abc/fifo_0__reg[0]
Abc/fifo_reg[0][1] Abc/fifo_0__reg[1]
Command usage:
Add renaming rule <rule_id> <search_string> <replacement_string> \
-gol|rev
many name changes, it is not practical to use regular expressions with the
"add renaming rule" command or function-based mapping.
In such case one can use the change name report generated from the
synthesis tool in order to retain the original names.
In Synopsys DC, you can report the renamed signals using the following
command:
Execute the following LEC command right after you read in the design:
This will eliminate screen dump and reduce significantly the amount of
time needed for the name change operation.
This command forces the netlist with the modified names back to the
original names implicitly or permanently. Retaining the original names aids
in the debugging process.
The renaming will apply to cell names and net names for the purpose of
mapping, and for port names for the purpose of optimal hierarchical
verification.
The LEC "change name" command will also take in multiple modified
names that have been applied in several steps through DC. So make sure
to save the change name report at each step in DC. Since in Conformal
LEC, we are trying to retrieve the original names, you must make sure that
the "change name" commands are applied in the reverse sequence of the
commands that were executed in DC.
Example
=======
dc_shell> report_names -hierarchy > TI_core_rules.rpt
dc_shell> change_names
dc_shell> report_names -hierarchy > TI_module_rules.rpt
dc_shell> change_names
In Conformal LEC, you will use the following order for the "change name"
commands:
SETUP> change name TI_module_rules.rpt -revised
SETUP> change name TI_core_rules.rpt -revised
When the number of key points having different names do not have
common pattern and are less in number then it is good to manually map
those key points using add mapped points command.
Command usage:
For instance, following key points are not mapped with no common pattern
in them:
So in the above case one can manually map the key points in the following
manner:
Uniquify command can take care of some basic renaming rules when used
in hierarchical compare. Hence it is recommended to use uniquify
command as it aids in name based mapping.
Function-Based Mapping
Function based mapping uses heuristic methods to map key points on the
basis of logic cone functionality. The tool uses a built-in algorithm to map
key points that have different names in the Golden and Revised designs.
Conformal EC cannot map PIs and POs functionally. If PIs and POs have
different names in the Golden and Revised design, they will turn to extra
key points. Extra key points are points that exist only on one side (Golden
or Revised). In most cases, extra key points do not affect the circuit.
However, extra PIs and POs are a cause for concern and should be
mapped. To map PIs and POs with different names, make their names
similar using renaming rules and then use name based mapping.
Abc0/X[1]
D Q PO
D Q PO
Revised
There are various mapping options available which can be used in different
scenarios as stated below.
This is the default method used by Conformal to map key points. Key
points having same path names in both Golden and Revised are
mapped first, then the remaining key points are mapped by function.
With this method, the tool maps only the key points with matching
names in the Golden and Revised designs; the remaining key points are
With this method, tool will not map the key points based on the path of
the gates. This mapping method is used when the names do not yield
good correlation (custom circuits, implementation tool completely
renames instances), name-based mapping will not work, and functional
based mapping is needed. Mapping run time can be long with this
method due to the function based mapping.
This method maps the key point with an inverted phase. One way to
evaluate if a pair of key points should be phase mapped is to consider
the simulation result for the key point. If the simulation result at the end
of the Golden or Revised cones is always inverted, they should be
phase mapped. Phase mapping is recommended when the synthesized
netlist has gone through sequential inversion or inverter push.
Golden: PI------buff------DFF------buff------PO
Revised: PI------inv-------DFF------inv-------PO
In this case, the DFF should be mapped using set mapping method
-phase. Phase mapping can require a lot of CPU time. One strategy is
to do non-phase mapping first, then—after the first comparison—delete
the NEQ points from the mapped list and remap with phase-mapping
turned on. So in above case DFF will be inverted equivalent after
comparison.
Mapping method:
Name usage : name first
Inverted mapping : not used
Case sensitivity : OFF
Name effort : HIGH
Extra: Extra key points are the points that exist only on one side of
the design (Golden or Revised). Extra key points generally do not affect the
functionality of the design; extra PIs and Pos, however, are matter of
concern and should be mapped.
To view a list of extra key points, use the following command in LEC mode:
To view a list of unreachable key points, use the following command in LEC
mode:
To view a list of not-mapped key points, use the following command in LEC
mode:
Recommendations
• Do not use set mapping method –unreach as a default command in
production/generic scripts as it may lead to false NEQs.
• If mapping takes too long, use set mapping method –name only and
then use renaming rules to map the remaining not-mapped points.
• If there are noneqs other than phase mapping then deleting the
mapped points contributing to noneqs and remapping them does not
work. In other words this technique only works f noneqs are due to
phase inversion.