Dmsa 2018.06
Dmsa 2018.06
IMPORTANT NOTICE
In the event information in this presentation reflects Synopsys’ future plans,
such plans are as of the date of this presentation and are subject to
change. Synopsys is not obligated to develop the products with the features
and functionality discussed in these materials. In any event, Synopsys’
products may be offered and purchased only pursuant to an authorized quote
and purchase order or a mutually agreed upon written contract.
Configuring Multi-Scenario
Defining Scenarios
Limitations
DMSA PT PT
MASTER host host
network connection
PT
host
PT PT
host host
• Each scenario in a DMSA run is a full PrimeTime analysis which can have its own unique:
– delay and slew timing
– detailed parasitics
– PrimeTime variable settings
– constraints
– etc.
CLK333 CLK333 CLK333 CLK333 CLK333 CLK333 CLK333
min: 0.8 min: 0.9 min: 1.8 min: 1.9 min: 3.2 min: 3.3 min: 4.3
CLK333 CLK333 max: 0.9
CLK333 max: 1.7
CLK333 max: 2.1
CLK333 max: 2.2
CLK333 max: 3.5
CLK333 max: 3.7 max: 4.8
min: 0.8 min: 1.0 min: 1.9 min: 2.0 min: 3.5 min: 3.8 min: 4.9
CLK400 CLK400 max: 1.0
CLK400 max: 1.2
CLK400 max: 2.2
CLK400 max: 2.3
CLK400 max: 3.9
CLK400 max: 4.3 max: 5.5
min: 0.8 min: 0.9 min: 1.9 min: 2.0 min: 2.9 min: 3.3 min: 4.4
max: 0.9 max: 1.7 max: 2.2 max:FF1
2.4 max: 3.6 max: 3.8 max: 4.9
FF1 scenario N
FF1 scenario 2
scenario 1
• The master is a special PrimeTime process running in a "DMSA master" mode which controls
the remote worker processes
– It allocates license and machine resources, issues commands to the workers, and collects their data
– It provides the user with a single user interface to perform analysis across all scenarios
DMSA PT PT
MASTER worker worker
network connection PT
worker
PT
PT
worker
worker
• The remote process is a remote PrimeTime process that is controlled by the master
– A worker is also referred to as a worker process
– It is created by the master, and is given tasks to complete by the master
– At any given time, a worker process can only be performing a task on a single scenario
DMSA PT PT
MASTER worker worker
network connection
PT
worker
PT PT
worker worker
S1 S3
PT
worker
S2 S4
• Consider a design with four operating modes, analyzed at three PVT corners
– This would result in 12 scenarios as shown below
typical
func_tc scanshift_tc scancap_tc jtag_tc
(25ºC, 1.50V)
best-case
func_bc scanshift_bc scancap_bc jtag_bc
(0ºC, 1.65V)
• A task is the name for any unit of work which the master gives to a remote worker process for
execution
• Tasks are "atomic" operations
– Tasks complete uninterrupted at the remote process
– Scenario image swapping or license reallocation can only be performed between tasks
S1
PT
DMSA report_timing worker
MASTER
report_timing S2
PT
worker
DMSA PT PT
MASTER worke worke
network connection r r
PT
worker
PT PT
worker worker
• This master pt_shell is a special DMSA control shell, not a regular PrimeTime shell
– different commands
– different warnings/errors
– different man pages
– does not require an extra license
• A "DMSA analysis" Tcl script is run at the master to perform the analysis
• The following directories are automatically created inside the working directory:
– command_log/
– pt_shell command log files for each remote process
– a "scenario directory" for each scenario
– contains any temporary scenario images
– contains scenario output logfile named "out.log“
– system_log/
– Contains log files which have messages that can be useful for Synopsys to debug
$multi_scenario_working_directory/
• Next, a farm of remote processes must be specified using one or more set_host_options
commands
– Supports discrete machines and compute farms (Sun Grid, LSF, custom farms)
– Any mix of individual machines and farm types can be specified
– Multiple commands can be issued
– The combined set of hosts will be used
• When using specific machines, simply specify the hostname and number of processes:
#
# create eight 64-bit processes on 'suse25'
set_host_options -num_processes 8 suse25
• Compute farms submission options are specified using the –submit_command option
– The master process must be running on a valid submission host
• The submission command should include the full path
– The example below shows how to determine it automatically
• The number of threading cores used by the remote processes can be specified with the
–max_cores option in the master script:
# use 4 remote processes with 8 cores each
set_host_options –num_processes 4 –max_cores 8 ...
– Compute farm submission options should request the desired core count to avoid CPU contention
create_scenario –name S1 …
PT
S3 PT S4 create_scenario –name S2 …
worker worker create_scenario –name S3 …
W2 W4 create_scenario –name S4 …
current_session {S1 S2 S3 S4}
• The sh_launch_dir variable contains the directory where PrimeTime was invoked
– If PrimeTime is launched in /user/myaccount/DMSA:
$sh_launch_dir
– $sh_launch_dir returns that directory, even if PrimeTime's current directory is moved somewhere
else:
pt_shell> cd /tmp
pt_shell> echo $sh_launch_dir
/user/myaccount/DMSA
• The start_hosts command launches the remote pt_shell processes on the specified
remote machines
– Command lines are printed as processes are invoked
pt_shell> start_hosts
1] Launched : /global/pt/bin/pt_shell \
-env_start LM_LICENSE_FILE ‘[email protected]' \
DISPLAY ‘snps:1.0' -env_end -multi_scenario \
-native -max_cores 4 -__zdpp_worker snps1 3799 3786 1 1 \
/home/snps_user/pt_dmsa/work \
PrimeTime 60225 /home/snps_user/pt_dmsa/
Status : Forking successful
Stdout : Process group is (4781)
Stderr : **<<EMPTY>>**
– Status messages are displayed as remote worker processes notify the master of success
• The report_host_usage command can be used to report information about the remote host
processes
– hostname, process ID, core count, etc.
Options Name Host Name Num Processes Protocol
--------------------------------------------------------------------
AUTO_0 >>farm<< 3 auto
• First, if a .synopsys_pt.setup file exists in the launch directory, a filesystem link to it will be
placed in the working directory
$sh_launch_dir $multi_scenario_working_directory/
out.log
• Next, the master launches the remote pt_shell processes in the working directory
– The current directory of a pt_shell process at this point is shown in red below
– The linked .synopsys_pt.setup file (from the launch directory) is automatically executed, if
present
$sh_launch_dir $multi_scenario_working_directory/
out.log
• When it's time for a remote pt_shell to do work for a scenario, it changes directory to that
scenario's directory and performs work for that scenario
– The analysis output for that scenario goes to its out.log file
$sh_launch_dir $multi_scenario_working_directory/
out.log
• Use the $sh_launch_dir variable for the search_path in the scenario analysis scripts
– This ensures the scenarios can find files while running from within the scenario directories
– This method also works when the script is run in a regular non-DMSA PrimeTime analysis
MASTER
read_verilog
wc {set_operating_conditions SLOW design.v.gz
–analysis_type read_verilog
wc {set_operating_conditions SLOW design.v.gz
–analysis_type
on_chip_variation} current_design eth_top on_chip_variation} current_design eth_top
} link } link
read_parasitics design.sbpf read_parasitics design.sbpf
switch $corner { switch $corner {
switch $mode { bc {set_operating_conditions FAST
switch –analysis_type
$mode { bc {set_operating_conditions FAST –analysis_type
func { on_chip_variation} func { on_chip_variation}
...functional constraints... wc {set_operating_conditions SLOW –analysis_type
...functional constraints... wc {set_operating_conditions SLOW –analysis_type
} on_chip_variation} } on_chip_variation}
test { } test { }
...test constraints... read_parasitics design.sbpf ...test constraints... read_parasitics design.sbpf
} }
} switch $mode { } switch $mode {
func { func {
...functional constraints... ...functional constraints...
} }
test { test {
...test constraints... ...test constraints...
} }
} }
DMSA S1 S2
MASTER
S3 S4
• If you have a different script for each scenario, just point to the proper script for that scenario
definition:
set link_path "* lib_${corner}.db" set link_path "* lib_${corner}.db" set link_path "* lib_${corner}.db" set link_path "* lib_${corner}.db"
read_verilog design.v.gz read_verilog design.v.gz read_verilog design.v.gz read_verilog design.v.gz
current_design eth_top current_design eth_top current_design eth_top current_design eth_top
link link link link
• The more common case is a single analysis script using variables to control which
mode/corner is analyzed
– Below, mode and corner control the analysis
switch $corner {
bc {set_operating_conditions FAST –analysis_type on_chip_variation}
wc {set_operating_conditions SLOW –analysis_type on_chip_variation}
}
read_parasitics design.sbpf
switch $mode {
func {
...functional constraints...
}
test {
...test constraints...
}
}
• In this case, we simply vary these variables across their different combinations and create
scenarios:
corner=bc
foreach corner {bc wc} { mode=func
foreach mode {func test} {
set link_path "* lib_${corner}.db"
read_verilog design.v.gz
current_design eth_top
link
mode=test
analysis_type on_chip_variation}
-name ${mode}_${corner} \
}
read_parasitics design.sbpf
switch $mode {
func {
...functional constraints...
corner=wc }
}
...test constraints...
– The -specific_variables option “pushes” a variable’s current value at the master into the
scenario
– How does this work?
• Environmental shell variables can be passed to the scenarios using Tcl's env() array
– In Tcl, env(foo) represents environmental variable foo
– Simply include the desired environmental variable entries in the variable list
• You can also define scenarios using saved sessions with the –image option:
create_scenario \
-name func_wc –image sessions/func_wc sessions/
create_scenario \
func_wc func_bc
-name func_bc –image sessions/func_bc
• SolvNet article 018039 provides a Tcl procedure to define scenarios for a directory of saved
sessions:
sessions/
restore_dmsa_session sessions/
S1 S2 S3 S4
• The current session is the list of scenarios which should be analyzed by DMSA
• Only scenarios in the current session are analyzed
– There is no resource penalty for defining many more scenarios than needed
current_session
• The merged error log allows information, warning, and error messages to be summarized
across all scenarios
– All messages are collected during each task's execution
– The master determines which messages are common to which scenarios
./work/merged_errors.log:
Information: Related clock set 0 has base period 8000.00. (PTE-065)
( func_bc func_tc func_wc )
Information: Related clock set 0 has base period 100000.00. (PTE-065)
( atpg_capture_bc atpg_shift_bc atpg_capture_tc atpg_shift_tc )
Information: Related clock set 0 has base period 50000.00. (PTE-065)
( jtag_bc jtag_tc jtag_wc )
• Once the current session has been defined, the command focus can be restricted to a subset
of scenarios at any time using the current_scenario command
– The command focus controls which scenarios are used for task execution
current_session
current_scenario
• In DMSA, merged reports are reporting commands that report across the set of scenarios in
command focus
– Duplicate or subcritical information is suppressed, according to the merging rules for each report
– This dramatically reduces the time needed to analyze and interpret the results
• The merged reporting commands are:
– report_timing
– report_constraint
– report_global_timing
– report_qor
– report_analysis_coverage
– report_clock_timing
– report_si_bottleneck
– report_noise
• Merged report_timing shows the worst paths across the scenarios in focus
– This avoids looking at repetitive paths across the scenarios
Note: The -max_paths behavior applies across all path groups, not per path group (behavior before F-2011.12)
• Merged report_timing works just like a normal report_timing, but across scenarios in
focus:
– Paths are obtained from all scenarios in focus
– The usual options such as -max_paths, -nworst, and -unique_pins are available
• …but when duplicate paths are found across multiple scenarios, only the most critical path is
kept
– This is called duplicate path merging
– What is a "duplicate path?"
• Paths from different scenarios are considered to be duplicates if they have the:
– Same sequence of pins along data portion of the path
– Same transition directions at every pin along the data path
– Same launch clock
– Same capture clock
– Same constraint type
• Once the subcritical duplicates have been removed, the –max_paths and –nworst limits are
reapplied to the merged set
• Duplicate merging can be disabled with:
report_timing –dont_merge_duplicates
• Each merged timing report's header includes the name of the scenario that supplied the path:
• The -path_type end format shows path summaries with endpoint, scenario, and slack
columns:
• The merged report_constraint command shows the worst constraint slack for each
design object across scenarios
– The scenario providing the worst slack is displayed
– Other subcritical slacks for that design object are suppressed
– Supports path violations based on path based timing also (-pba_mode path | exhaustive)
pt_shell> report_constraint -nosplit -all_violators -max_transition
...
Required Actual
Pin Scenario Transition Transition Slack
-------------------------------------------------------------------------------
RxStatusInLatched_reg[2]/E wc 1.001 1.026 -0.025 (VIOLATED)
LatchedRxLength_reg[11]/E wc 1.001 1.026 -0.025 (VIOLATED)
RxStatusInLatched_reg[5]/E wc 1.001 1.025 -0.024 (VIOLATED)
rx_fifo/U201/B2 bc 0.554 0.571 -0.017 (VIOLATED)
rx_fifo/U197/B2 bc 0.554 0.571 -0.017 (VIOLATED)
rx_fifo/U210/B2 bc 0.554 0.570 -0.016 (VIOLATED)
rx_fifo/U202/B2 bc 0.554 0.570 -0.016 (VIOLATED)
LatchedRxLength_reg[5]/E tc 0.801 0.794 -0.007 (VIOLATED)
LoadRxStatus_reg/Q tc 0.801 0.794 -0.007 (VIOLATED)
• This constraint merging behavior ensures that each check is exercised in at least one scenario
– This allows constraint coverage to be assessed across dissimilar scenarios
• In the example below, a flip-flop is analyzed in both functional and scan shift scenarios
– When SE==0, CLK→SD is untested in functional mode
– When SE==1, CLK →D is untested in scan shift mode
– …but the entire flip-flop is fully tested across both scenarios
• The merged report_clock_timing command reports the worst clock latencies, skews, and
transitions across all scenarios
– The worst skews and worst latencies may exist in different scenarios
Clock: mrx_clk_pad_i
Clock: mtx_clk_pad_i
• The merged report_si_bottleneck shows the worst SI victims across all scenarios
– This makes it easy to find and fix the worst crosstalk problems across the scenarios
• Generates a merged report showing pins that have the worst slack
over all scenarios
• Additional column scenario reports the scenarios that contributed
to the worst slack
• Supports all existing options of report_noise
Report : noise
…
Design : multi-scenario design
…
slack type: height
scenarios: scen01, scen02, scen03
noise_region: above_low
pin name (net name) width height slack scenario
----------------------------------------------------------------------------------
ethreg1_MIICOMMAND1_DataOut_reg_0_/SI (n7483) 0.1788 0.4488 -0.0255 scen01
wishbone_rx_fifo_fifo_reg_2__22_/SI (n1412) 0.1487 0.5106 -0.0193 scen02
wishbone_TxLength_reg_3_/SE (n7726) 0.1936 0.4258 -0.0192 scen01
wishbone_StartOccured_reg/SI (net19402) 0.1503 0.4455 -0.0156 scen01
wishbone_RxByteCnt_reg_1_/SI (net31416) 0.1016 0.5286 -0.0151 scen03
• fix_eco_timing
– setup
– hold
– path based (-pba_mode path | exhaustive)
– path collection based
• fix_eco_drc
– max_capacitance 1583172: "PrimeTime Automated Physically-Aware
– max_transition ECO Flow With IC Compiler Application Note"
– max_fanout
https://solvnet.synopsys.com/retrieve/1583172.html
– noise
• fix_eco_power
– Vt swapping
– Cell downsizing
• All three commands support both logical and physical ECO
© 2018 Synopsys, Inc. 66 Synopsys Confidential Information
Master/Scenario Variable Communication
set v 456
scenB
get_distributed_variables v
DMSA
MASTER $v == bar
scenA
$arr == 1
$v == bar
scenB
set v {bar} $arr == 2
set arr(scenA) 1
set arr(scenB) 2
$v == bar
set arr(scenC) 3 scenC
$arr == 3
set_distributed_variables {v arr}
• All the modes at the same corner share the same parasitic file
• This common information is saved in a separate common directory to reduce the total disk
usage of the save_session database
Directory structure without data sharing Directory structure with data sharing
Save_session directory
Directory structure without data sharing Directory structure with data sharing
• remote_execute can be used to execute any valid PrimeTime commands at the scenarios:
# generate some non-merged reports in the scenario log files
remote_execute {
report_design
report_clocks
check_timing
}
• If double quotes are used, normal Tcl soft-quoting rules are followed
– Allows variable substitution at the master
– Allows command substitution at the master using [...]
• If curly braces are used, normal Tcl hard-quoting rules are followed
– No variable substitution
– No command substitution using [...]
– String is passed exactly as-is to the scenarios
• The default multi-scenario licensing mode is scenario-based: one license to run each scenario
• When (# licenses) < (# remote processes):
– Licenses are allocated to workers by master
– When a task finishes at a remote process, the master can immediately reclaim the license for use by
another waiting task
– Remote processes are not terminated to free license
PT license
PT PT
worke worke
r r
active (waiting)
DMSA
MASTER
PT PT
worke worke
r PT license r
(waiting) active
© 2018 Synopsys, Inc. 80 Synopsys Confidential Information
Core-Based Licensing for DMSA
Each PrimeTime ADV Key Enables 32 Cores
• One PrimeTime-ADV license is required for running up to 32 cores, regardless of the number
of scenarios
• By default, licenses are checked out as needed by scenarios, and no license controls are
required
• But if desired, license controls are available:
– The set_license_limit command can be used to specify an upper limit on each license feature's
usage:
# limit licenses to 4 PrimeTime and PrimeTime SI licenses
set_license_limit PrimeTime -quantity 4
set_license_limit PrimeTime-SI -quantity 4
setenv SNPSLMD_ENABLE_INCREMENTAL_LICENSE_HANDLING 0
time
• License auto-reduction:
– ...can be good for long tasks like update_timing if runtimes are dissimilar across the scenarios
– ...can be bad for interactive work if your license server is slow
– You could spend more time waiting for checkins/checkouts than doing work
– You may not get all your licenses back
• DMSA virtual worker multiplexes scenarios on the same host without save/restore operation
• When number of cores is limited, DMSA virtual workers reduces runtime by avoiding
save/restore for unloading/loading scenarios
• When number of machines is limited, DMSA virtual worker allows more scenarios per machine
– Memory allocation increases proportionally to load factor for each host to account for virtual workers
– Minimal runtime increase
Benefit for DMSA limited host user Benefit while reducing # core usage
Run time reduction # core reduction vs performance
18000 140 140 150 3.5
140
160
289.5% 140
3
15000
120
2.5
12000 100
-65% reduction 2 70
192.2% 100
9000 80
1.5 48
6000 50 99.9% 98%
60
1 36
67% 40
3000
0.5 34%
20
0 0 0 0
0 0
Baseline Load factor=2 Baseline Load factor 2 Load factor 3 Load factor 4
Run time # cores total run time increase % peak slave memory increase % # cores
192 cores
Virtual workers
pt_shell> set_host_options -num_processes 24 -max_cores 4 –load_factor 2 \
-submit_command {qsub -l mem_free=32G ….. } 96 cores
• Not all PrimeTime commands and variables exist at the DMSA master
– Use remote_execute as needed
• Limited to 256 remote processes
• GUI functionality is not available
• Beware of conflicts when running multiple runs in same directory
– Use different-named work directories to avoid overwriting files
• To try distributed multi-scenario analysis on your own, an example design is included in the
following SolvNet article: