0% found this document useful (0 votes)
549 views

Smart LEC

Uploaded by

Pinky Nahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
549 views

Smart LEC

Uploaded by

Pinky Nahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Conformal Collection: Smart LEC

Product Version: 21.10


July 2021

Copyright Statement

© 2021 Cadence Design Systems, Inc. All rights reserved worldwide. Cadence and the Cadence logo are
registered trademarks of Cadence Design Systems, Inc. All others are the property of their respective
holders
Contents
Conformal Collection: Smart LEC ................................................................................ 3
Smart LEC: Analyze Compare .................................................................................... 4
Smart LEC: Smart Instance Selection ....................................................................... 11
Smart LEC: Parallel Analyze Module ......................................................................... 16
Smart LEC: Parallel Hierarchical Comparison .......................................................... 19
Smart LEC: Parallel Datapath Analysis ..................................................................... 34
Smart LEC: Parallel Hierarchical Comparison with Shared Memory ......................... 38
Support ...................................................................................................................... 42
Feedback ................................................................................................................... 42

July 2021 2 Conformal 21.10


Conformal Collection: Smart LEC
Summary

This is a collection of user guides for using the Smart LEC verification.

• Analyze Compare: executes the entire comparison step in the most optimal
turnaround time. Based on the design's
characteristics, analyze_compare automatically executes the most appropriate
combination of commands and options to complete the comparison.

• Smart Instance Selection: utilizes an analytic engine to select instances for


hierarchical comparison with the best quality runtime and abort resolution.
Average hierarchical comparison runtimes average a 1.6x speedup without
forfeiting quality in abort resolutions.

• Parallel Analyze Module: analyze_module command supports parallelization,


uses better analysis strategies, and allows users to customize dofiles to compare
non-exact synthesis modules. Using parallelization analyze_module can
speedup runtime up to 4x, resulting in faster and improved turnaround for results.

• Parallel Hierarchical Compare: introduces parallel hierarchical comparison which


allows 3x speedup with minor changes to the existing dofile. Parallel hierarchical
comparison uses smart schedulling to reduce runtime and improve source
efficiency. This feature enables massive parallelization that utilizes multiple hosts
and cores to maximize computation results.

• Parallel Datapath Analysis: provides complete parallelization for datapath


analysis. The parallelization can speed up the datapath analysis by 6x with eight
threads when handling datapath intensive designs.

• Parallel Hierarchical Compare with Shared Memory: reduces the memory


requirements of parallel hierarchical comparison when workers are on the same
host (localhost). This feature significantly improves memory efficiency, reduces
the overall peak memory consumption, and allows a machine having twice the
memory space required by a serial run to accommodate up to eight workers.

July 2021 3 Conformal 21.10


Smart LEC: Analyze Compare
Summary
The analyze_compare command executes the entire comparison step in the most
optimal turnaround time. Based on the design's characteristics,
analyze_compare automatically executes the most appropriate combination of
commands and options to complete the comparison.

This feature is available in Conformal LEC 19.10-p100 and requires Smart LEC license.

Analyze Compare

The analyze_compare command analyzes characteristics of both golden and revised


designs such as datapath type and logic gate's distribution.

Based on the characteristics, the analyze_compare command determines which


datapath options and compare strategies will achieve the best run time.

Example

Here is an example of a comparison. The top four bars show different run time by using
different datapath and compare strategies.

July 2021 4 Conformal 21.10


The fifth bar is the run time of analyze_compare, which spent a little time for analyzing
design characteristics and then found out the best strategies to finish the comparison. In
this case, it used option 2 of the datapath command, and lower down the effort spent in
the stage 2 of the compare command.

Command Syntax
analyze_compare
[-ABORT_Stop <integer>]
[-RESOURCEFILE <filename>]
[-THREADS <integer>[,<integer>]]
[-NONEQ_Stop <integer>]
[-VERbose]
(LEC Mode)

Parameters
• -ABORT_Stop
Stops the command after finding the specified number of abort points.

• -RESOURCEFILE <filename>
Specifies the resource filename to analyze the datapath modules. This is used
for DC netlists.

• -THREADS <integer>[,<integer>]
Specifies the minimum and maximum number of threads. If
only one number entered, this specifies both the minimum and maximum number
of threads.
For example, -threads 2 specifies two threads; -thread 2, 4 specifies a minimum
of two threads, and a maximum of four threads. If -threads is not specified, LEC
honors the setting from

• -NONEQ_Stop <integer>
Stops after finding the specified number of nonequivalent points.

• -VERbose

Displays detailed comparison information, such as datapath analysis and the


circuit duplication in multithreaded comparison

July 2021 5 Conformal 21.10


Example Dofile

After reading both designs, entering LEC system mode, and adding all compare points,
just execute the analyze_compare command.

read_design rtl.v -golden


read_design netlist.v -revised
...
set_system_mode lec
add_compared_points -all
analyze_compare

Note that the analyze_compare command works only on added compared points and
should be used after the add_compared_points command.

Example Output

LEC will output the summary of datapath quality (if it invoked datapath analysis) and the
summary of compare results.
// Command: set_system_mode lec
...
// Command: add_compared_points -all
// 64 compared points added to compare list
// Command: analyze_compare
// Note: WALLLACE_CSA_DUMMY_OP28(csa): MDP quality evaluated 100% success
// Note: csa_tree_add_597_44_pad_groupi: MDP quality evaluated 100% success
// Note: mult_66: quality evaluated 76% success
// Note: mult_70: quality evaluated 76% success
// Note: mult_74: quality evaluated 81% success
// Note: mult_78: quality evaluated 100% success
=====================================================================
Compared points PO DFF Total
---------------------------------------------------------------------
Equivalent 32 32 64
=====================================================================

Note that if analyze_partition is invoked, LEC will also output messages of every
iteration in the partition run.

Benchmark Results

Here are the benchmark results between a classic LEC strategy and Smart LEC
analyze_compare.

July 2021 6 Conformal 21.10


// classic LEC // analyze_compare
analyze_datapath -module -verbose add_compared_points -all
analyze_datapath -verbose analyze_compare -verbose
add_compared_points -all
compare

Category # of Cases Classic LEC Analyze_compare Speedup


Runtime Runtime (hours)
(hours)

Both EQ 113 14.8 6.5 2.3 x


Both Abort 13 2.8 2.8 1.0 x
Abort to EQ 40 14.5 3.2 4.5 x
EQ to Abort 0 - - -
Total 166 32.1 12.5 2.6 x

Note for MDP Flow

For Genus netlists, you must read in the implementation information before switching to
LEC mode:
TCL_SETUP> read_implementation_information <dir> -revised <label>

For DC netlists, a resource file is required. Use the -resourcefile option of


the analyze_compare command or the set_datapath_option command.

TCL_LEC> analyze_compare -resourcefile <file>

Or
TCL_SETUP> set_datapath_option -resourcefile <file>

Smart LEC Dofile Template to Run with Genus Synthesis Netlist

The following is the Smart LEC dofile template to run with Genus synthesis netlist.
set_log_file ./rtl2map.lec.log -replace
usage -auto -elapse
set_verification_information ./rtl_kb_test1defaultkb_test1_mapv_db
read_implementation_information fv/kb_test2 -revised kb_test1defaultkb_test1_mapv
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hier compare workers here
#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]

July 2021 7 Conformal 21.10


# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."
...
set env(CDN_SYNTH_ROOT) "/lan/fed/rcrel/GENUS171/latest/tools.lnx86"
...
set_undefined_cell black_box -noascend -both
add_search_path -library . ..latest/tools.lnx86/lib/tech
read_library -liberty -both tsmc_25.lib
...
set_naming_rule "%s\[%d\]" -instance_array
set_naming_rule "%s_reg" -register -golden
set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -instance
set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -variable
set_undriven_signal Z -golden
set_hdl_options -VERILOG_INCLUDE_DIR "incdir:sep:src:cwd"

read_design -define SYNTHESIS -merge bbox -golden -lastmod \


-noelab -verilog2k kb_test1.v
read_design -verilog95 -revised -lastmod -noelab kb_test1_map.v
elaborate_design -revised -root {kb_test2}

report_design_data
report_black_box
uniquify -all -nolib -golden
set_flatten_model -seq_constant
set_flatten_model -seq_constant_x_to 0
set_flatten_model -nodff_to_dlat_zero
set_flatten_model -nodff_to_dlat_feedback
set_flatten_model -gated_clock
...
#add_pin_constraints 0 {SE} -revised
#add_pin_constraints 0 {TM} -revised
#add_ignored_outputs {so} -revised
#add_name_alias ./fv/kb_test2/kb_test1defaultkb_test1_mapv.singlebit.alias.json.gz -
revised
#set_mapping_method -alias -revised
#add_renaming_rule r1alias _reg((\\\[%w\\\])*(/U\\\$%d)*)$ @1 -type dff -both
set_analyze_option -auto

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart
write_hier_compare_dofile ./hier_tmp3.lec.do -noexact_pin_match \
-constraint -usage -replace -balanced_extraction \
-input_output_pin_equivalence \
-prepend_string "report_design_data; usage" \
-compare_string "analyze_compare -verbose "

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare ./hier_tmp3.lec.do -dynamic_hierarchy

July 2021 8 Conformal 21.10


report_verification -hier
...
write_verification_information
report_verification_information
...

Note: you can also obtain this dofile script template from Genus synthesis run with
'write_do_lec -smart ...'

Smart LEC Dofile Template to Run with Third Party Netlist

The following is the Smart LEC dofile template to run with third party netlist.
#**************************************************************************
#* Sets up the log file and instructs the tool to display usage information
#**************************************************************************
set_log_file lec.hier.log.$LEC_VERSION -replace
usage -auto -elapse
#**********************************************************************
#* Reads in the library and design files
#************************************************************************
read_library .... -replace -both
read_design -verilog .. -replace -golden -noelaborate
elaborate_design -golden
read_design -verilog .. -replace -revised -noelaborate
elaborate_design -revised
report_design_data
report_black_box -detail
uniquify -all -nolibrary

#********************************************************************
#* Specifies renaming rules
#********************************************************************
#add_renaming_rule [-Golden |-Revised |-BOth]

#********************************************************************
#* Specifies user constraints for test/dft/etc.
#********************************************************************
#add_pin_constraint 0 scan_en -golden/revised
#add_ignore_output scan_out -golden/revised

#********************************************************************
#* Specifies the modeling directives for constant optimization
#* or clock gating
#********************************************************************
set_flatten_model -seq_constant
set_flatten_model -gated_clock

#***********************************************************************
#* Enables auto analysis to help resolve issues from sequential
#* redundancy, sequential constants, clock gating, or sequential merging

July 2021 9 Conformal 21.10


#* This option automatically enables 'analyze abort -compare' if there
#* are any aborts to solve the aborts.
#********************************************************************
set_analyze_option -auto -report_map
#***********************************************************************
#* Specifies the number of threads to enable multithreading
#***********************************************************************
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hier compare workers here
#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]
# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart

#********************************************************************
#* Generates the hierarchical dofile script for hierarchical comparison
#********************************************************************
write_hier_compare_dofile hier.do -replace -usage \
-constraint -noexact_pin_match -verbose \
-prepend_string "report_design_data; usage;" \
-compare_string "analyze_compare -resourcefile <resourcefile> \
-verbose; usage;" \
-balanced_extraction -input_output_pin_equivalence \
-function_pin_mapping

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare hier.do -verbose

#********************************************************************
#* Generates the reports for all compared hierarchical modules
#********************************************************************
report_hier_compare_result -all -usage
report_hier_compare_result -abort -usage
report_hier_compare_result -noneq -usage
report_verification -hier -verbose

Note: you can also obtain this dofile script template using Conformal 'write_template'.

July 2021 10 Conformal 21.10


Smart LEC: Smart Instance Selection
Summary

Smart LEC has an analytic engine that selects instances for hierarchical comparison for
the best quality in runtime and aborts resolution. With the
set_hier_compare_selection -smart command, Smart LEC uses the engine to
write out the selected instances for comparison.

On average, with the smart instance selection, a 1.6X speedup can be achieved in
hierarchical comparison runtime with the same quality in abort resolution.

This feature is available in Conformal LEC 19.10-p100 and requires Smart LEC license.

Usage

Use the set_hier_compare_selection -smart command before the


analyze_hier_compare or write_hier_compare_dofile commands to enable the
feature. The following is a sample log file that shows the analysis.
// Command: set_hier_compare_selection -smart
// Command: write_hier_compare_dofile hier.do -balanced_extraction \
-replace -usage -constraint -noexact_pin_match \
-function_pin_mapping
.....
// Skip due to automatic instance selection
// Module Pair: Foo(G) and Foo(R)
// Instance Pair: Qoo/foo(G) and Qoo/foo (R)
...
9 module pairs are not written because of mismatched ports
9 modules have mismatched pin constants and unreachables
27 module pairs are written for hierarchical comparison
Root cause of auto-instance selection
17 instances contain many primitive gates
18 instances contain many datapath gates
0 instances contain multiplier
0 instances have the boundary with high similarity and high complexity
0 instances have the boundary with low similarity and high complexity
0 instances contain several hard datapath
0 instances contain many adder
0 instances contain many xor gates

Under some scenarios, smart instance selection might not have the best extraction. For
example:

• Leaf module reports aborts with a long runtime

July 2021 11 Conformal 21.10


• Top module contains many datapath, and datapath analysis dominates the long
runtime

• Global modeling analysis dominates runtime, like remodel -seq_merge -


repeat

Benchmark Result

600 regression cases were run using a threshold of 50, 500, and 5000 and the smart
selection feature. In these runs, smart selection consistently shows runtime
improvement.

Strategy Runtime (hrs)


Threshold 50 116
Threshold 500 108
Threshold 5000 127
Pseudo Best 77
Smart Selection 72

Smart LEC Dofile Template to Run with Genus Synthesis Netlist

The following is the Smart LEC dofile template to run with Genus Synthesis netlist.
set_log_file ./rtl2map.lec.log -replace
usage -auto -elapse
set_verification_information ./rtl_kb_test1defaultkb_test1_mapv_db
read_implementation_information fv/kb_test2 -revised kb_test1defaultkb_test1_mapv
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hierarchical compare workers here
#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]
# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."
...
set env(CDN_SYNTH_ROOT) "/lan/fed/rcrel/GENUS171/latest/tools.lnx86"
...
set_undefined_cell black_box -noascend -both
add_search_path -library . ..latest/tools.lnx86/lib/tech
read_library -liberty -both tsmc_25.lib
...
set_naming_rule "%s\[%d\]" -instance_array
set_naming_rule "%s_reg" -register -golden
set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -instance
set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -variable
set_undriven_signal Z -golden

July 2021 12 Conformal 21.10


set_hdl_options -VERILOG_INCLUDE_DIR "incdir:sep:src:cwd"

read_design -define SYNTHESIS -merge bbox -golden -lastmod \


-noelab -verilog2k kb_test1.v
read_design -verilog95 -revised -lastmod -noelab kb_test1_map.v
elaborate_design -revised -root {kb_test2}

report_design_data
report_black_box
uniquify -all -nolib -golden
set_flatten_model -seq_constant
set_flatten_model -seq_constant_x_to 0
set_flatten_model -nodff_to_dlat_zero
set_flatten_model -nodff_to_dlat_feedback
set_flatten_model -gated_clock
...
#add_pin_constraints 0 {SE} -revised
#add_pin_constraints 0 {TM} -revised
#add_ignored_outputs {so} -revised
#add_name_alias ./fv/kb_test2/kb_test1defaultkb_test1_mapv.singlebit.alias.json.gz -
revised
#set_mapping_method -alias -revised
#add_renaming_rule r1alias _reg((\\\[%w\\\])*(/U\\\$%d)*)$ @1 -type dff -both
set_analyze_option -auto

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart
write_hier_compare_dofile ./hier_tmp3.lec.do -noexact_pin_match \
-constraint -usage -replace -balanced_extraction \
-input_output_pin_equivalence \
-prepend_string "report_design_data; usage" \
-compare_string "analyze_compare -verbose "

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare ./hier_tmp3.lec.do -dynamic_hierarchy

report_verification -hier
...
write_verification_information
report_verification_information
...

Note: you can also obtain this dofile script template from Genus synthesis run with
'write_do_lec -smart ...'

July 2021 13 Conformal 21.10


Smart LEC Dofile Template to Run with Third Party Netlist

The following is the Smart LEC dofile template to run with DC netlist
#**************************************************************************
#* Sets up the log file and instructs the tool to display usage information
#**************************************************************************
set_log_file lec.hier.log.$LEC_VERSION -replace
usage -auto -elapse
#**********************************************************************
#* Reads in the library and design files
#************************************************************************
read_library .... -replace -both
read_design -verilog .. -replace -golden -noelaborate
elaborate_design -golden
read_design -verilog .. -replace -revised -noelaborate
elaborate_design -revised
report_design_data
report_black_box -detail
uniquify -all -nolibrary

#********************************************************************
#* Specifies renaming rules
#********************************************************************
#add_renaming_rule [-Golden |-Revised |-BOth]

#********************************************************************
#* Specifies user constraints for test/dft/etc.
#********************************************************************
#add_pin_constraint 0 scan_en -golden/revised
#add_ignore_output scan_out -golden/revised

#********************************************************************
#* Specifies the modeling directives for constant optimization
#* or clock gating
#********************************************************************
set_flatten_model -seq_constant
set_flatten_model -gated_clock

#***********************************************************************
#* Enables auto analysis to help resolve issues from sequential
#* redundancy, sequential constants, clock gating, or sequential merging
#* This option automatically enables 'analyze abort -compare' if there
#* are any aborts to solve the aborts.
#********************************************************************
set_analyze_option -auto -report_map
#***********************************************************************
#* Specifies the number of threads to enable multithreading
#***********************************************************************
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hier compare workers here

July 2021 14 Conformal 21.10


#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]
# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart

#********************************************************************
#* Generates the hierarchical dofile script for hierarchical comparison
#********************************************************************
write_hier_compare_dofile hier.do -replace -usage \
-constraint -noexact_pin_match -verbose \
-prepend_string "report_design_data; usage;" \
-compare_string "analyze_compare -resourcefile <resourcefile_-verbose; usage;" \
-balanced_extraction -input_output_pin_equivalence \
-function_pin_mapping

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare hier.do -verbose

#********************************************************************
#* Generates the reports for all compared hierarchical modules
#********************************************************************
report_hier_compare_result -all -usage
report_hier_compare_result -abort -usage
report_hier_compare_result -noneq -usage
report_verification -hier -verbose

Note: you can also obtain this dofile script template using Conformal 'write_template'.

July 2021 15 Conformal 21.10


Smart LEC: Parallel Analyze Module
Summary
In Conformal Smart LEC 20.10-s200, the analyze_module command supports
parallelization and uses better analysis strategies. In addition, users can now use
customized dofile to compare non-exact synthesis modules. Using parallelization
analyze_module can speed up the runtime up to 4x and results improved to enable
faster turnaround for the results.

This feature is available in Conformal 20.20-p100 and requires a Smart LEC license.

Parallelization for analyze_module


Parallel analyze_module simultaneously analyzes multiple modules each with multiple
strategies. Initially, LEC uses the best strategies for solving each module. LEC will then
use any threads available to run more strategies on modules that are hard to solve.

Command Usage

To enable parallelization in the analyze_module command, use the following command


option.

July 2021 16 Conformal 21.10


TCL_SETUP> set_smartlec_option -parallel_analyze_module

To specify the number of threads, use either of the following commands.


TCL_SETUP> set_parallel_option [-threads <integer>[,<integer>]]

or
TCL_SETUP> analyze_module [-threads <integer>[,<integer>]]

When the analyze_module command is enabled, LEC will show the following message.

// Command: analyze_module ...


// Note: Multithreaded module analysis is enabled.

Using Custom Comparison Dofiles


You can use customized comparison dofiles with the analyze_module command by
using the following option:
TCL_SETUP> analyze_module [-custom_dofiles <dofiles...>]

• Dofiles must be in vpxmode

• Dofiles must start after set_system_mode lec

• Comparison results must be available after the dofile execution

The following is a simple dofile example:


analyze datapath -flowgraph -verbose
add compare point -all
compare

When the -custom_dofiles option is specified, the analyze_module command will not
use its built-in strategies.

This option is available in both LEC and Smart LEC.

Benchmark Results

The following are the benchmark results in which we have compared the
analyze_module command with different configurations.

July 2021 17 Conformal 21.10


Case #module no parallelizati
s parallelizati on with 8
on threads

#abort #eqs runtime (sec) #aborts #eq runtim Speedu


s s e p (X)

1 468 40 428 > 0 468 1615 3


14 8 7
day
s
2 102 0 102 384 0 102 196 2
3 209 0 209 163 0 209 705 2
0
4 69 0 69 277 0 69 1400 2
0
5 236 0 236 245 0 236 873 3
9
6 152 0 152 242 0 152 773 3
5
7 88 0 88 121 0 88 379 3
0

July 2021 18 Conformal 21.10


Smart LEC: Parallel Hierarchical Comparison
Summary

Conformal LEC (LEC) introduces parallel hierarchical comparison which allows 3X


speedup with minor changes to the existing dofile. The feature enables massive
parallelization that utilizes multiple hosts and multiple cores to maximize computation
results. In addition, the parallel hierarchical comparison uses smart scheduling to
reduce runtime and improve resource efficiency.

This feature is available in Conformal LEC 19.10-p100 and requires Smart LEC license.

Parallel Hierarchical Comparison in Conformal LEC

LEC parallel hierarchical comparison uses computation resources effectively in order to


compare modules in parallel. For a design with an evenly distributed module complexity,
parallelizing the hierarchical comparison can significantly reduce the turnaround time.

Introduction to Conformal LEC Workers

To achieve parallel efficiency, LEC uses continuous workers to execute the module
compare. A worker is a LEC process that contains the entire design for module
comparisons. Workers can run on the localhost or remote machines.

During a run, workers collaborate with each other to compare the modules in parallel.
When switching between the different modules, workers quickly set the target module
and perform verification without reloading the design data.

Workers use all LEC multi-threading features, including compare and module datapath
analysis (MDP), to achieve maximum parallelization.

Smart Scheduling

LEC uses smart scheduling of tasks for workers during a parallel hierarchical
comparison. The following diagram shows how a worker, once completed a
comparison, immediately picks the next available module with the highest priority to
compare.

July 2021 19 Conformal 21.10


In the drawing, the size of a module represents its complexity.

Saving Runtime

LEC achieves faster turnaround time by evenly distributing tasks to the workers. The
following illustrates how go_hier_compare saves runtime over run_hier_compare.

July 2021 20 Conformal 21.10


Similar to run_hier_compare, the top module runs in the main LEC process. The user
can examine the top module after go_hier_compare has completed.

Applicability of Parallel Hierarchical Comparison

A parallel hierarchical comparison is most effective for situations with the following
properties.

• Large designs with many submodules for comparison

• The design hierarchies are well balanced

• The datapath or complex modules are isolated in the leaf modules

• No sub-module comparison dominates overall runtime

• The top module comparison has few or no dynamic flattening iterations

• Sufficient memory and CPU resources

Configuring the Resource Settings

Before running parallel hierarchical compare, some resource settings are required to
ensure the comparison runs smoothly:

• Specify the number of workers and the resource from which the workers will be
activated.

This is specified through the set_parallel_option -workers option.

• Specify the number of threads each worker can use.

This is specified through the set_parallel_option -threads option.

You can resource the parallel comparison from the current machine or through remote
servers (using either the batch command or rsh command).

The following sections will show examples of how to configure for each.

Resourcing Workers from Current Machine

The following configures a parallel hierarchical comparison from the current machine.

July 2021 21 Conformal 21.10


TCL_SETUP> set_parallel_option -workers localhost localhost localhost localhost

The above example specifies 4 workers on the current machine.

Resourcing Workers from a Cluster

The following configures a parallel hierarchical comparison from a cluster of remote


machines using a batch command.
TCL_SETUP> set_parallel_option -cluster LSF
TCL_SETUP> set_parallel_option -batch_command \
\"/farm/bin/bsub -q super -R 'OSNAME==Linux && SFIARCH==EM64T'\"
TCL_SETUP> set_parallel_option -workers batch batch batch batch

In above example specifies 4 workers from an LSF cluster.

The -cluster option specifies the type of the cluster for the batch mode. LEC supports
LSF (Load Sharing Facility) and SGE (Sun Grid Engine) cluster queuing systems. The
default is LSF.

The -batch_command option specifies the batch command to use for submitting the job
to the cluster.

Resourcing Workers from Remote Machines

The following configures a parallel hierarchical comparison from remote machines using
the rsh command to log into the servers:
TCL_SETUP> set_parallel_option -workers server1 server2
TCL_SETUP> set_parallel_option –rsh_command \"rsh\"

The above example uses rsh to login server1 and server2 and invokes 2 workers.

Note that the remote machines must have the same Linux distribution for parallel
hierarchical comparison. You can execute the Linux command uname -mrs to check
whether the Linux distributions are the same.

go_hier_compare Command Syntax

The following is the go_hier_compare command syntax. It generally supports the same
set of options as run_hier_compare with a few exceptions discussed in the next
section.
go_hier_compare
<dofile_name>

July 2021 22 Conformal 21.10


[-ROOT_module <golden_module> <revised_module>]
[-DYNamic_hierarchy | -NODYNamic_hierarchy]
[-NOREStart | -REStart]
[-NOANALYZE_abort | -ANALYZE_abort]
[-RETIMED_modules [-TOP | -NOTOP]]
[-CHECK_NONEQ]
[-COMPARE_String <string>]
[-HIER_STATUS <file>
[-VERBOSE]
(Setup Mode)

Options/Features Not Supported

Some options in run_hier_compare are not supported in go_hier_compare:

• break_noneq: we plan to support NONEQ_STOP. The difference is that LEC stops


the process and goes back to SETUP mode, unlike BREAK_NONEQ of
run_hier_compare stops in LEC mode.

• break_abort: we may support ABORT_STOP instead.

• analyze_boundary_conditions: we do not change the hierarchical constraint


during the parallel hierarchical compare. Therefore, this option will not be
supported in go_hier_compare (it has no effect).

The -conditional option for the write_hier_compare_dofile command is not


supported. Use the -DYNamic_hierarchy option if you want to dynamically flatten the
Non-Equivalent modules.

Running Parallel Hierarchical Compare

Once the resource settings are set, you can run the parallel hierarchical compare with a
usage similar to run_hier_compare. The output will also be similar as running
run_hier_compare. The following is a sample log file.

// Command: write_hier_compare_dofile x.do ...


....
// Command: set_parallel_option -worker localhost localhost localhost localhost
// Command: go_hier_compare x.do
....
Temp directory was create at /home/.../LEC.tmp.5833
// Command: APP saveenv /home/.../LEC.tmp.5833/gohier.0/env.csh
// Command: checkpoint /home/.../LEC.tmp.5833/gohier.0/ckp -rep
...
// Note: Checkpoint file /home/.../LEC.tmp.5833/gohier.0/ckp saved successfully
...
// Command: submit hier -dir .... (This is internal command)

July 2021 23 Conformal 21.10


// Command: !cfm_env gohier .... (This is internal command)
// Finish loading 4 workers
// Job1 (G) sub and (R) sub1 starts on worker 0
// Job0 (G) sub and (R) sub0 starts on worker 1
// Job1 (G) sub and (R) sub1 finished
// Job2 (G) sub and (R) sub2 starts on worker 2
// Job0 (G) sub and (R) sub0 finished
// Job2 (G) sub and (R) sub2 finished
// All remote run finish(100%)
// Workers exit
// Comparing top top (G) and top(R)
....

Reporting Parallel Options


To report the worker setting, use the set_parallel_option command without any
arguments.
TCL_SETUP> set_parallel_option
Current parallel processing options: ('*' indicates non-default value.)
=====================================================================
Keep directory : NO

Multithreaded processing options:


---------------------------------------------------------------------
Number of threads : 0,0
Starting port : 50100
License list : XL CCDXL LP LPGXL ECO ECOGXL RCV
Hold license : NO

Massive parallelization options:


---------------------------------------------------------------------
Workers : * localhost localhost batch
Cluster type : LSF
Batch command : * /farm/bin/bsub -W 1000 -q super \
-R 'OSNAME==Linux && SFIARCH==EM64T'
Rsh commmand : rsh

Guidelines for Effectiveness

Here are some guidelines to help the parallel hierarchical compare be more effective.

• No sub-module dominates the runtime over than 50%, better to less than 30%.

• Top module has few or no dynamic flattened iterations. Dynamic-flattening on top


module would cause the significant runtime there.

• The design hierarchy is a good balanced tree.

July 2021 24 Conformal 21.10


• Datapath or difficult component is isolated in the leaf modules.

• Enough memory and CPU resource.

• Smooth machine acquisition.

• Large design.

Writing Verification Information

After the comparison is completed, LEC computes the results of the flattened view, also
called the top-level view, from the modules compared as verification information. The
verification information mainly consists of mapping, compare, and modeling information.

Both the write_verification_information and analyze_project commands can write the


verification information in the flattened view. We recommend
write_verification_information. It writes out the unified verification information
(UVI) in the JSON format to streamline the verification flow.

Beware of Concurrent Operations when Using -append_string

When using -append_string in write_hier_compare_dofile, beware that the


commands are executed by remote workers concurrently. As a result, writing to the
same file will be problematic.

The following is an example of incorrect usage. The following results inaccurate data or
will cause a conflict when writing data by -append_string.

write_hier_compare hier.do \
-append_string "write_verification_information"
go_hier_compare hier.do

For verification information, go_hier_compare collects the verification result from the
module result. Therefore, after hierarchical compare, you can write the UVI as the
following example.
write_hier_compare_dofile hier.do
go_hier_compare hier.do
write_verification_information

July 2021 25 Conformal 21.10


Beware of Verification Results
Do not combine the usage of the commands go_hier_compare, run_hier_compare,
and save_hier_compare_result. Also, do not to mix with the usage of the option -
nodynamic_hierarchy.

go_hier_compare would ignore and overwrite the result from


save_hier_compare_result.

You can use go_hier_compare multiple times with a different root module. However,
never change the design data between the hierarchical compare.

Diagnosis: Checking Efficiency

LEC tracks the timestamp when -verbose is used with


the go_hier_compare command. When the efficiency is not as good as expected,
check the timeline from the following files:
LEC.tmp.<pid>/gohier.<N>/timeline.htm
LEC.tmp.<pid>/gohier.<N>/timeline.json

Open them using a browser. The browser used must have internet access. The
following diagram shows the example of timeline chart.

timeline.htm

July 2021 26 Conformal 21.10


Diagnosis: Checking Progress and Debugging Stalled Processes
The following log indicates that remote worker 0 runs Job33, and remote worker 2 runs
Job22.
...
// Job0 (G) suba and (R) suba starts on worker 0
// Job2 (G) subb and (R) subb starts on worker 2
// Job0 (G) subc and (R) subc finished
// Job2 (G) subd and (R) subd finished
// Job33 (G) sube and (R) sube starts on worker 0
// Job22 (G) subf and (R) subf starts on worker 2
// 2 module-pairs to go (33%)

To check on the progress of Job33, view the log in the following directory:
% vim LEC.tmp.5833/gohier.0/33/1.log

If the tools hangs as illustrated in the following log file, it means LEC is taking some time
to start the workers.
...
// Note: Checkpoint file /home/.../LEC.tmp.5833/gohier.0/ckp saved successfully
...
// Command: submit hier -dir ....
// Command: !cfm_env gohier .... <--hanging here

Possible causes:

• Checkpoint restart: often from the large design. Please wait.

• Server pending: check the setting of batch_command, or run the remote process
on the localhost.

Debug: RPC

Both localhost and remote servers use the same protocol: RPC over HTTP. If you find
the following message:
// Finish loading 4 workers
// Warning: RPC out of order ['HTTP request fails', 'HTTP request fails'...

• Contact Cadence support/AEs

• Execute command
rpc run -startr -allow_e -report_url x.info x.check

• Paste the content of x.info to AE and to R&D

July 2021 27 Conformal 21.10


http://156.142.173.35:50003
1046815013
Finish

• Ping the address shown in above (do not include the port), to see if this is an IT
issue.

Debug: batch_command

If you suspect there is problem with cluster setting and batch_command, follows the
debug steps, and send feedback to R&D.

Step 1: Find the path of the worker configuration in log


// Command: go_hier_compare x.do
...
// Command:!cfm_env gohier.py ...-workers xxx/LEC.tmp.123/gohier.0/workers.json

Step 2: Execute the following python with


cfm_env python3 test.py xxx/LEC.tmp.123/gohier.0/workers.json

test.py
from subprocess import *
import sys, json
j = json.load(open(sys.argv[1]))
cmd = j['workers'][0][:-1] + \
['uname -mrs > log; pwd >> log; lec -nogui < /dev/null >> log']
print(cmd)
p = Popen (cmd)

The highlight index here is the number of worker you want to test.

Step 3: Check the log file 'log'

Advanced Worker Configuration File

You can save the settings required to invoke workers to a configuration file. To execute
the configuration file:
TCL_SETUP> go_hier_compare -configure <worker configuration file>

A worker configuration file is a json file containing the arguments needed to invoke
workers. Here is an example that calls two workers from the configuration file.
{
"workers" : [
[

July 2021 28 Conformal 21.10


"special_submit_script",
"arg1",
"arg2",
...
"cd PWD; __LEC_EXEC__ -nogui -gxl \
-restart_checkpoint __LEC_CHECKPOINT__ -dofile __LEC_DOFILE__ ... "
],
[
"special_EC_script",
"-nogui",
"-xl",
"-restart_checkpoint",
"__LEC_CHECKPOINT__",
'-dofile",
"__LEC_DOFILE__",
"--rpc_remote",
"__LEC_HOST_URL__"
]
]
}

Here __LEC_EXEC__, __LEC_CHECKPOINT__, __LEC_HOST_URL__ , and


__LEC_DOFILE__ are reserved keywords to indicate LEC executable, internal
checkpoint, URL, and the dofile for workers communication, the __LEC_EXEC__ is
optional if you specify the correct version and LEC path.

Note that only checkpoint can only be restarted on the same Linux distribution. (using
%> uname -mrs)

Self Testing Example

You can evaluate the capability of this feature with the following sample testcase.

design g.v dofile.tcl


module sub (a,b,o); set_log_file gohier.log -replace
input a,b; read_design g.v
output o; read_design g.v -revised
assign o = a&b; set_parallel_option -worker localhost
endmodule localhost \
localhost localhost
module top (a,b,o); uniquify -all -nolibrary -force -golden
input [3:0] a,b; uniquify -all -nolibrary -force -revised
wire [3:0] x; write_hier_compare_dofile hier.do -
output o; threshold 0 \
sub s0(a[0], b[0], x[0]); -constraint -balanced_extractions
sub s1(a[1], b[1], x[1]);

July 2021 29 Conformal 21.10


sub s2(a[2], b[2], x[2]); go_hier_compare hier.do
sub s3(a[3], b[3], x[3]); report_verification -hier
assign o = |x;
endmodule
If you get the following result, that means you are able to run the parallel hierarchical
compare. Try it on your on-going project.
// Command: go_hier_compare hier.do
....
// Job2 (G) sub_2 and (R) sub_6 finished
// Job3 (G) sub_3 and (R) sub_7 finished
// All remote run finish(100%)
// Workers exit
// Comparing top top(G)&top(R)
....
Total Equivalent modules = 5
...
TCL_SETUP> report_verification -hier
...
---------------------------------------------------------------------
6. Compare Results: PASS
Total Equivalent modules = 5
====================================================================

Smart LEC Dofile Template to Run with Genus Synthesis Netlist

The following is the Smart LEC dofile template to run with Genus Synthesis netlist
set_log_file ./rtl2map.lec.log -replace
usage -auto -elapse
set_verification_information ./rtl_kb_test1defaultkb_test1_mapv_db
read_implementation_information fv/kb_test2 -revised kb_test1defaultkb_test1_mapv
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hier compare workers here
#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]
# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."
...
set env(CDN_SYNTH_ROOT) "/lan/fed/rcrel/GENUS171/latest/tools.lnx86"
...
set_undefined_cell black_box -noascend -both
add_search_path -library . ..latest/tools.lnx86/lib/tech
read_library -liberty -both tsmc_25.lib
...
set_naming_rule "%s\[%d\]" -instance_array
set_naming_rule "%s_reg" -register -golden
set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -instance

July 2021 30 Conformal 21.10


set_naming_rule "%L.%s" "%L\[%d\].%s" "%s" -variable
set_undriven_signal Z -golden
set_hdl_options -VERILOG_INCLUDE_DIR "incdir:sep:src:cwd"

read_design -define SYNTHESIS -merge bbox -golden -lastmod \


-noelab -verilog2k kb_test1.v
read_design -verilog95 -revised -lastmod -noelab kb_test1_map.v
elaborate_design -revised -root {kb_test2}

report_design_data
report_black_box
uniquify -all -nolib -golden
set_flatten_model -seq_constant
set_flatten_model -seq_constant_x_to 0
set_flatten_model -nodff_to_dlat_zero
set_flatten_model -nodff_to_dlat_feedback
set_flatten_model -gated_clock
...
#add_pin_constraints 0 {SE} -revised
#add_pin_constraints 0 {TM} -revised
#add_ignored_outputs {so} -revised
#add_name_alias ./fv/kb_test2/kb_test1defaultkb_test1_mapv.singlebit.alias.json.gz -
revised
#set_mapping_method -alias -revised
#add_renaming_rule r1alias _reg((\\\[%w\\\])*(/U\\\$%d)*)$ @1 -type dff -both
set_analyze_option -auto

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart
write_hier_compare_dofile ./hier_tmp3.lec.do -noexact_pin_match \
-constraint -usage -replace -balanced_extraction \
-input_output_pin_equivalence \
-prepend_string "report_design_data; report_unmapped_points -not" \
-compare_string "analyze_compare -verbose "

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare ./hier_tmp3.lec.do -dynamic_hierarchy

report_verification -hier
...
write_verification_information
report_verification_information
...

Note: you can also obtain this dofile script template from Genus synthesis run with
'write_do_lec -smart ...'

July 2021 31 Conformal 21.10


Smart LEC Dofile Template to Run with Third Party Netlist

The following is the Smart LEC dofile template to run with third party netlist
#**************************************************************************
#* Sets up the log file and instructs the tool to display usage information
#**************************************************************************
set_log_file lec.hier.log.$LEC_VERSION -replace
usage -auto -elapse
#**********************************************************************
#* Reads in the library and design files
#************************************************************************
read_library .... -replace -both
read_design -verilog .. -replace -golden -noelaborate
elaborate_design -golden
read_design -verilog .. -replace -revised -noelaborate
elaborate_design -revised
report_design_data
report_black_box -detail
uniquify -all -nolibrary

#********************************************************************
#* Specifies renaming rules
#********************************************************************
#add_renaming_rule [-Golden |-Revised |-BOth]

#********************************************************************
#* Specifies user constraints for test/dft/etc.
#********************************************************************
#add_pin_constraint 0 scan_en -golden/revised
#add_ignore_output scan_out -golden/revised

#********************************************************************
#* Specifies the modeling directives for constant optimization
#* or clock gating
#********************************************************************
set_flatten_model -seq_constant
set_flatten_model -gated_clock

#***********************************************************************
#* Enables auto analysis to help resolve issues from sequential
#* redundancy, sequential constants, clock gating, or sequential merging
#* This option automatically enables 'analyze abort -compare' if there
#* are any aborts to solve the aborts.
#********************************************************************
set_analyze_option -auto -report_map
#***********************************************************************
#* Specifies the number of threads to enable multithreading
#***********************************************************************
set_parallel_option -threads 4

#*****************************************************************
# Specifies the parallel hier compare workers here

July 2021 32 Conformal 21.10


#*****************************************************************
# set_parallel_option -cluster [LSF | SGE]
# set_parallel_option -workers [localhost | batch | ...]
# set_parallel_option -batch_command "..."
# set_parallel_option -rsh_command "..."

#********************************************************************
#* Enables smart instance selection
#********************************************************************
set_hier_compare_selection -smart

#********************************************************************
#* Generates the hierarchical dofile script for hierarchical comparison
#********************************************************************
write_hier_compare_dofile hier.do -replace -usage \
-constraint -noexact_pin_match -verbose \
-prepend_string "report_design_data; usage;" \
-compare_string "analyze_compare -resourcefile <resourcefile> \
-verbose; usage;" \
-balanced_extraction -input_output_pin_equivalence \
-function_pin_mapping

#********************************************************************
# Executes the hier.do script with parallel hier compare
#********************************************************************
go_hier_compare hier.do -verbose

#********************************************************************
#* Generates the reports for all compared hierarchical modules
#********************************************************************
report_hier_compare_result -all -usage
report_hier_compare_result -abort -usage
report_hier_compare_result -noneq -usage
report_verification -hier -verbose

Note: you can also obtain this dofile script template using Conformal 'write_template'.

July 2021 33 Conformal 21.10


Smart LEC: Parallel Datapath Analysis
Summary

Smart LEC provides the complete parallelization for datapath analysis. The
parallelization can speed up the datapath analysis by 6X with eight threads when
handling datapath intensive designs.

This feature is available in Conformal LEC 19.10-p100 and requires Smart LEC license.

Background

Parallel datapath analysis before 19.10 is not supported in RTL side analysis. There are
two kinds of datapath analysis, RTL analysis and Netlist analysis (Module Base
Datapath, MDP). In LEC 18.10-p100, when set_datapath_option -threads N is
applied, LEC only parallelizes MDP analysis.

For RTL side analysis, LEC has three datapath engines, Conformal DP (CDP, default
engine), wordlevel, and flow graph. Wordlevel and flow graph engines perform complex
datapath analysis, which can dominate overall runtime for datapath intensive designs.

Name Command Type Parallel DP Parallel DP


in 18.10 in 19.10

MDP analyze_datapath Netlist Yes Yes


-module
CDP analyze_datapath RTL NA NA (*fast)
Wordlevel analyze_datapath RTL NA Yes
-wordlevel
Flowgraph analyze_datapath RTL NA Yes
-flowgraph
Smart LEC enables parallel datapath analysis for wordlevel and flow graph engine.
When analyzing datapath intensive netlists, Smart LEC can have significant 2X speed-
up with 4 threads.

Usage

To enable the feature, you can specify the following in either LEC or SETUP mode.
TCL_SETUP> set_datapath_option -enable_parallel_datapath_analysis

July 2021 34 Conformal 21.10


The number of multithreads is given by the following commands, in the order of priority.

• analyze_datapath -threads

• set_datapath_option -threads

• set_parallel_option -threads

The following note will be shown if the feature is enabled:


// Note: Multithreaded datapath analysis is enabled

Parallelization in analyze_compare

This feature also enables parallel datapath analysis in Smart LEC analyze_compare.
The analyze_compare command analyzes characteristics of designs including
datapath type. Based on the characteristics, analyze_compare chooses the best
datapath engines that would be parallelized when user enables this feature.

Example Dofiles for Smart LEC Run

Below are example dofile scripts using parallel datapath analysis in a Smart LEC run. It
can be used in either hierarchical or flat comparison.

Flat comparison sample script:


read_design <goldendesign> -golden
read_design <reviseddesign>-revised
set_datapath_option -enable_parallel_datapath_analysis
set_parallel_options 4
...
set_system_mode lec
add_compared_points -all
analyze_compare

Hierarchical comparison sample script:


read_design <goldendesign> -golden
read_design <reviseddesign> -revised
set_datapath_option -enable_parallel_datapath_analysis
set_parallel_options 4
...
set_hier_compare_selection -smart
write_hier_compare_dofile hier.do -replace -usage \
-constraint -noexact_pin_match -verbose \
-balanced_extraction -input_output_pin_equivalence \
-function_pin_mapping -verbose \

July 2021 35 Conformal 21.10


-prepend_string "report_design_data; report_unmapped_point -sum" \
-compare_string "analyze_compare -resourcefile <resourcefile>

go_hier_compare hier.do -verbose


...

Example Dofiles for Classic LEC Run

The following are example dofile scripts using parallel datapath analysis in Classic LEC
runs. After reading the designs and libraries, this feature can be enabled in SETUP or
LEC mode before datapath analysis. It can be used in either hierarchical or flat
comparison.

Flat comparison sample script:


read_design rtl.v -golden
read_design netlist.v -revised
set_datapath_option -enable_parallel_datapath_analysis
set_parallel_options 4
...
set_system_mode lec
analyze_datapath -flowgraph -verbose
add_compared_points -all
compare

Hierarchical comparison sample script:


read_design <goldendesign> -golden
read_design <reviseddesign> -revised
set_datapath_option -enable_parallel_datapath_analysis
set_parallel_options 4
...

write_hier_compare_dofile hier.do -replace -usage \


-constraint -noexact_pin_match -verbose \
-balanced_extraction -input_output_pin_equivalence \
-function_pin_mapping -verbose \
-prepend_string "report_design_data; report_unmapped_point -sum; \
analyze_datapath -module ; analyze_datapath -flowgraph -verbose"

run_hier_compare hier.do -verbose


...

Usage Output Example

When enabling the multithreaded datapath analysis, the following note will be shown
during the run if it is executed successfully:

July 2021 36 Conformal 21.10


TCL_SETUP> set_datapath option -enable_parallel_datapath_analysis
...
TCL_LEC> analyze_datapath -flowgraph -threads 4 -verbose
// Note: Multithreaded datapath analysis is enabled
// Note: add_2637_2: quality evaluated 99% success
// Note: add_2322: quality evaluated 100% success
// Note: add_2403_2: quality evaluated 100% success
// Note: add_2481_2: quality evaluated 100% success
// Note: add_2559_2: quality evaluated 100% success
// Note: sub_3998: quality evaluated 100% success
// Note: sub_2750: quality evaluated 100% success

Benchmark Results

In this experiment, we compared the default flow graph datapath analysis with its 8-
threaded parallelization counterpart on 900 regression testcases. The results showed
that the runs with parallel DP analysis reduced runtime up to 8X with 8 threads used.

Testcase # Default DP Parallel DP (Secs) Speedup


(Secs)

case 1 4957 659 7.5X


case 2 1739 287 6.0X
case 3 1022 282 3.6X
case 4 3164 1193 2.6X
case 5 1990 359 5.5X
case 6 1733 406 4.3X
case 7 251 92 2.7X
case 8 1234 389 3.2X
case 9 386 139 2.8X
case 10 1062 298 3.6X

July 2021 37 Conformal 21.10


Smart LEC: Parallel Hierarchical Comparison with
Shared Memory
Summary

Conformal Smart LEC reduces the memory requirements of parallel hierarchical


comparison when workers are on the same host (localhost). This feature significantly
improves memory efficiency and reduces the overall peak memory consumption.

Benchmark results show a 90% reduction in incremental memory consumption for each
additional worker. This feature allows a machine having twice the memory space
required by a serial run to accommodate up to eight workers.

This feature is available in Conformal LEC 19.10-p100 and requires Smart LEC license.

Memory Requirements of Workers

In parallel hierarchical comparison, a worker compares a module independently and


requires RTL and netlist information. To facilitate the rapid assignment and switching of
modules for comparison, each worker has access to the entire design database for the
duration of the entire parallel comparison session.

As a result, each worker has the same memory requirement as the main program and
works well when the workers are distributed to multiple machines.

However, running N workers on the localhost would use N+1 copies of design data on
the same host, leading to memory consumption issues for comparing large designs on a
single host.

Memory Usages for Workers on Localhost

The following chart shows the four-worker memory usages in version 18.10 on localhost
(go_hier_compare) versus a serial comparison (run_hier_compare). The parallelized
runs require from 3.1X to 5.6X memory of the serial run. For example, case 18 shows
that a serial run using 24 GB requires 123 GB for a four worker parallelized run.

July 2021 38 Conformal 21.10


Using the Shared Memory Feature

You enable the shared memory feature, when all workers are specified as localhost by
specifying set_hier_compare_option ‑gohier_shared_memory.

TCL_SETUP> set_parallel_option -workers localhost localhost localhost localhost


TCL_SETUP> set_hier_compare_option -GOHIER_SHARED_MEMORY
...
TCL_SETUP> go_hier_compare hier.do

You will see the following message:


// Command: go_hier_compare x.do
// Note: Using shared memory for GO Hier_compare
// Note: Kernal Information Linux 2.6.32-431.11.2.el6.x86_64 x86_64
// Note: Available system memory 70029 MB
// Note: Available system swap 129642 MB
// Note: Free space of gohier DIR 6629 MB (/DIR/LEC.tmp.5644/gohier.0)
// Note: Current memory usage 367 MB
...
// Loading 4 workers
// Note: Gohier progress shows in LEC.tmp.5644/gohier.0/remote_status.txt

If you specify other than localhost for the workers, Smart LEC will show the following
warning messages and will not enable the shared memory feature.
// Command: set_parallel_option -cluster LSF
// Command: set_parallel_option -batch_command \
// \"/farm/bin/bsub -q super -R 'OSNAME==Linux && SFIARCH==EM64T'\"
// Command: set_parallel_option -workers batch batch batch batch
// Command: set_hier_compare option -GOHIER_SHARED_MEMORY

July 2021 39 Conformal 21.10


SETUP> go_hier_compare hier_hdl2chk.do -hier_status gohier.rpt
// Warning: worker 'batch' is not localhost
// Warning: Not enable shared memory for GO HIer_compare
...

Memory Reduction with Shared Memory

The following chart highlights the advantage of the shared memory feature. The total
memory usage for a 4-worker shared memory run is only 1.8X of the serial run instead
of an average of 4.3X. On average, the shared memory feature reduces the memory
usages by 2X.

Incremental Memory Requirements with More Workers

The following chart shows the memory usages with an increasing number of workers
from four to eight. The incremental memory requirements of increasing 4 workers to 8
workers ranges from 5% to 60%.

July 2021 40 Conformal 21.10


Incremental Memory Usages

The following table shows the incremental memory usage for each worker. We compute
the incremental memory as:

• Incremental memory = (8-workers - 4-workers) / 4

• Incremental memory% = Incremental memory / 4-workers memory

Case 4 Workers 8 Workers Incremental Incremental


# (GB) (GB) Memory (GB) Memory(%)

case1 12.0 13.0 0.2 2.00


case2 8.10 12.5 1.1 13.4
case3 8.90 14.2 1.3 15.0
case4 8.80 13.5 1.2 13.4
case5 9.70 14.7 1.2 12.7
case6 10.5 16.0 1.4 13.1
case7 21.8 28.8 1.7 8.00
case8 15.3 27.7 3.1 20.3
case9 24.9 32.7 1.9 7.8
case10 14.7 21.9 1.8 12.2
case11 25.7 39.6 3.5 13.5
case12 25.7 39.7 3.5 13.5
case13 14.3 19.7 1.4 9.6

July 2021 41 Conformal 21.10


case14 29.3 44.5 3.8 13.0
case15 25.0 31.8 1.7 6.8
case16 18.2 29.9 2.9 16.1
case17 49.2 71.9 5.7 11.5
case18 45.7 75.4 7.4 16.2

The result shows that the incremental memory requirement with the addition of one
worker averages about 10%.

Support
Cadence Support Portal provides access to support resources, including an extensive
knowledge base, access to software updates for Cadence products, and the ability to
interact with Cadence Customer Support. Visit https://support.cadence.com.

Feedback
Email comments, questions, and suggestions to content_feedback@cadence.com.

July 2021 42 Conformal 21.10

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy