0% found this document useful (0 votes)
173 views17 pages

Mapping LEC

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 17

Cadence Design Systems, Inc.

Application Note

Understanding
Key Points Mapping
In
Logic Equivalence Checker (LEC)

Version – Conformal 13.1


April – 2014
Understanding Key points Mapping in 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

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 2
Understanding Key points Mapping in LEC

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.

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 3
Understanding Key points Mapping in LEC

What are key points?


Designs consist of combinational logic cones bounded by key points. In
order to compare the two designs, each of the key points should be
mapped.

Key points consist of the following:


• Primary inputs (PIs)
• Primary outputs (POs)
• D flip-flop (DFF)
• D latches (DLAT)
• Blackboxes
• Tie-E gates
• Tie-Z gates
• Cut gates

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 4
Understanding Key points Mapping in LEC

What is key point mapping?


Key point mapping pairs Golden key points to their corresponding Revised
key points.

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

Combinational logic Key points

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 5
Understanding Key points Mapping in LEC

Why is mapping necessary?

Mapping is necessary because it identifies the corresponding logic cones


between the Golden and Revised designs.

Corresponding logic cones are compared

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).

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 6
Understanding Key points Mapping in LEC

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.

In addition, the ANALYZE SETUP command tends to be more successful


with name-based mapping versus function-based mapping. Also, the name
effort (set in the SET MAPPING METHOD command) is high by default and
can take care of most changes in delimiters.

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.

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 7
Understanding Key points Mapping in LEC

When for-generate statement is used in VHDL and/or Verilog, the naming


convention of the resulting instances depend on the synthesis tool as well
as the name setting.

For example, consider the following piece of code:


{{{
generate
begin: blkA
for (i=0;i<=0;i=i+1) begin: forblkB
or n1(a,b,c);
for (j=23;j<=23;j=j+1) begin: forblkC
and n2(d,e,f);
end
begin : blkD
nor n3 (g,h,i);
end8ifdf

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

• Using {{{set naming rule "%L_%s" "%L[%d].%s" "%s" -instance}}} would


rename the instances as:n1, n2 and n3 as blkA_forblkB[0].n1,
blkA_forblkB[0].forblkC[23].n2, and blkA_forblkB[0].blkD_n3

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 8
Understanding Key points Mapping in LEC

 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

Renaming rule structures

• %d – matches 1 or more digits (0-9)


• #(expr) – expr evaluates to a constant integer
• %s- matches 1 or more alpha-numeric characters
• Refer to the Conformal reference manual for more renaming
structures.

Renaming rule for the above example will be as stated below:


add renaming rule R1 “%d_reg\[%d\]” “reg[@1][@2]” –rev

@1 refers to the first %d, @2 refers to the second %d and so on.

The escape character “\” is required preceding the special characters to


cancel out any special meaning in these characters.

 Reading in change name files generated by the synthesis tool


(either RC or DC) using change name command

Usually, ASIC vendor naming rules and synthesis-specific modifications


change net names, port names, and cell names after the synthesis. For

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 9
Understanding Key points Mapping in LEC

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:

dc_shell> report_names -hierarchy > name_changes.rpt

There is a new switch associated with change_names, namely, -


log_changes. The format is as follows:

change_names -rules vendor_rules -hier -verbose \


-log_changes name.change.rpt

NOTE: Make sure that the Correct header format is intact.

Using the change name command


=============================

Execute the following LEC command right after you read in the design:

SETUP> change name name_changes.rpt -revised > /tmp/dump

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.

For multiple change names setup


===============================

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 10
Understanding Key points Mapping in LEC

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

 Using the ADD MAPPED POINTS command

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:

add mapped points <gate_id | instance_pathname | pin_pathname>


<gate_id | instance_pathname | pin_pathname> -invert | noinvert –type –
golden_type

For instance, following key points are not mapped with no common pattern
in them:

Golden : 465718 DFF /abc/x[0]


Revised: 424316 /x_1_yz_2 /y[0]

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 11
Understanding Key points Mapping in LEC

So in the above case one can manually map the key points in the following
manner:

add mapped points 465718 424316 –noinvert

For more information on above command refer to conformal reference


guide.

 Using the UNIQUIFY command

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.

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 12
Understanding Key points Mapping in LEC

Abc0/X[1]
D Q PO

Golden In this example, the names of the DFF


are different. The tool will first map the
POs being driven by these flops, then it
will back trace and will undergo the
function based mapping of the DFFs
Xyz0/X[1] having different names.

D Q PO

Revised

Since function-based mapping can produce incorrect mapping of key


points, it’s best to map most of the key points using name-based mapping.
Mapping run time is also higher in the case of function-based mapping.

Available Mapping Method Options

There are various mapping options available which can be used in different
scenarios as stated below.

• set mapping method –name first

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.

• set mapping method -name only

With this method, the tool maps only the key points with matching
names in the Golden and Revised designs; the remaining key points are

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 13
Understanding Key points Mapping in LEC

not mapped. These notmapped points can be reported using command


report unmapped points > notmapped and accordingly apply renaming
rules to map them.

This approach is generally used if function-based mapping generates


incorrect mappings results or takes long time to map the key points.

• set mapping method –noname

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.

• set mapping method –nobbox_name_match

By dhhhefault, Conformal checks both module names and instance


names to ensure only blackboxes with the same module and instance
name are paired. So, even though a set of blackboxes have the same
instance names, Conformal will not map them if their module names
differ. This method maps blackboxes that have different module names,
but the same instance names.

• set mapping method –sensitive

By default, Conformal is case insensitive with regards to key point


names. For example, by default, the following key points would not be
mapped:

(G) 73747 DFF /FWD_CORE.T_FWD_RX/FRRX_Read_Data_R_reg_95/i0


(G) 74497 DFF /FWD_CORE.T_FWD_RX/FRRX_READ_DATA_R_reg_95/i0
(R) 83482 DFF /FWD_CORE.T_FWD_RX/FRRX_Read_Data_R_reg_95/i0

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 14
Understanding Key points Mapping in LEC

(R) 84232 DFF /FWD_CORE.T_FWD_RX/FRRX_READ_DATA_R_reg_95/i0

Use this mapping method so that Conformal is case sensitive.

• set mapping method –phase

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.

By default, Conformal first maps key points by name followed by


function. To determine the current mapping method, use the following
command:

report environment -mapping

which displays a report similar to the following:

Mapping method:
Name usage : name first
Inverted mapping : not used
Case sensitivity : OFF
Name effort : HIGH

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 15
Understanding Key points Mapping in LEC

Unmapped Key Point Categories

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:

report unmapped points -extra

Unreachable: Unreachable points are key points that do not


propagate to any output or to any other key points (flops, latches).

For instance, a DLAT is marked as unreachable after gated clock modeling


because the signal controlling the latch was moved to the MUX control;
therefore, the latch is no longer needed. In this case, Conformal reports it
as an unreachable key point.

To view a list of unreachable key points, use the following command in LEC
mode:

report unmapped points –unreachable

Not-mapped: Not-mapped key points are reachable, but do not


have corresponding point in the other design. For complete mapping, there
should not be any not-mapped points. Not mapped points may be resolved
with renaming rules if corresponding points exist in the other design under
different names. Otherwise, not-mapped points, in particular DFF/DLAT,
need to be remodeled away.

To view a list of not-mapped key points, use the following command in LEC
mode:

report unmapped points –notmapped

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 16
Understanding Key points Mapping in LEC

Recommendations
• Do not use set mapping method –unreach as a default command in
production/generic scripts as it may lead to false NEQs.

• Add set mapping method -auto as a default command in generic


scripts as it can take care of commonly encountered setup issues,
such as sequential constants, sequential merge, loop cutting, phase
mapping, and clock gating. Better modeling helps in mapping.

• 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.

COPYRIGHT © 2014, CADENCE DESIGN SYSTEMS, INC.


ALL RIGHTS RESERVED. PAGE 17

You might also like