Lab1 Scan Chain Insertion and Atpg Using Design Compiler and Tetramax
Lab1 Scan Chain Insertion and Atpg Using Design Compiler and Tetramax
2
Outline
o Introduction
o Design Compiler
o TetraMax
o Lab
3
Outline
o Introduction
o Design Compiler
o TetraMax
o Lab
4
Introduction
o This lab compares impact on circuit after
scan-chain insertion.
o Items to be compared include area, power,
test coverage and pattern count.
o Synopsys Design Compiler is the most
common synthesis tool.
o Synopsys TetraMax is used to perform
ATPG (Automatic Test Pattern Generation)
and fault simulation.
5
DFT compiler to TetraMAX
write –f verilog –hierarchy \ read netlist design_dft.v
–output “design_dft.v” design_dft.v
DC Simulation TetraMAX
Library read netlist library.v
write_test_protocol design.stil
run drc design.stil
–out design.stil
Simulation Fault
ATE Vectors
Testbenches Reports
6
Outline
o Introduction
o Design Compiler
o TetraMax
o Lab
7
Setup Tool Environment
o Defined in .synopsys_dc.setup
(it’s a hidden file, so use command $ ls –al to find it)
set link_library "l90sprvt_typ.db"
set target_library "l90sprvt_typ.db"
8
Invoke Design Compiler
o Change working directory
$ cd lab1
o Invoke design compiler
$ dc_shell-t
9
Read File, Link, Uniquify
o Read in RTL verilog source files
dc_shell> read_file -format verilog pre_norm.v
o Show library details
dc_shell> list_libs
o Specify the current module to synthesize
dc_shell> current_design pre_norm
n pre_norm : top module
o Link
n Resolve the design reference based on reference names
n Locate all design and library components, and connect them
dc_shell> link
o Uniquify
n Remove multiply-instantiated hierarchy in the current design
by creating a unique module for each instance
dc_shell> uniquify
10
Wire Model, Scan Style, Clock
o Set up wire load model define in library
n dc_shell> set_wire_load_model -name wl10 -library
l90sprvt_typ
o Use `report_lib l90sprvt_typ` to view library information
o Specify the scan style. Three styles are supported
n Multiplexed flip-flop (multiplexed_flip_flop)
n Clocked scan (clocked_scan)
n Level-sensitive scan design (lssd)
o dc_shell> set_scan_configuration –style
multiplexed_flip_flop
o Specify clock
n dc_shell> create_clock clk -period 10
o clk : the signal name defined in top module
11
Compile(1/2)
o Use command ”compile” to perform logic
level and gate level synthesis and
optimization on current design
n -map_effort
specify the relative amount of CPU time
spent during the mapping phase of
“compile”
12
Compile(2/2)
n -scan
Specify command to consider the impact of
scan insertion on mission mode constraints
during optimization. This option causes the
command to implement all flip-flops with
scan flip-flops.
n Example:
o dc_shell> compile -scan -map_effort medium
13
Identify Scan-Chain Count,
Generate Test Protocol (Method 1)
o Set scan-chain count considering the
limitation of ATE or software, multiple clock
domain, test time limitation
dc_shell> set_scan_configuration -chain_count 10
o Define clocks in your design, then generate a
test protocol
n -infer_clock: infer test clocks in design
n -infer_asynch: infer asynchronous set/reset
signals in design
dc_shell> create_test_protocol -infer_clock
-infer_asynch
14
Identify Scan-Chain Count,
Generate Test Protocol (Method 2)
o If you want to specify some PI/POs to be
normal inputs at operation mode and scan
inputs during test mode use following
commands
n dc_shell> set_scan_configuration
-chain_count 1
n dc_shell> set_dft_signal -port add -type
scandatain
n dc_shell> set_dft_signal -port sign -type
scandataout
n dc_shell> create_test_protocol -infer_clock
-infer_asynch
15
Identify Scan-Chain Count,
Generate Test Protocol (Method 3)
o If you want to specify scan-chain order, use
the following command
n dc_shell> set_scan_configuration
-chain_count 1
n dc_shell> set_scan_path ch1 -ordered_elements
{ DFF_1 DFF_2 … DFF_50 } -complete true
n dc>shell> create_test_protocol -infer_clock -
infer_async
n -complete
indicate whether a specified scan chain is
complete so that Design Compiler cannot add
components to it
16
Preview Design, Scan-Chain
Synthesis
o Preview the scanned design for scan
chain information
n dc_shell> preview_dft
o Check test design rules according to
the scan style chosen
n dc_shell> dft_drc
o Insert scan chain
n dc_shell> insert_dft
17
If clock is gated (DRC violation)
o -----------------------------------------------------------------
o DRC Report
o Total violations: 1
o -----------------------------------------------------------------
o 1 PRE-DFT VIOLATION
o 1 Uncontrollable clock input of flip-flop violation (D1)
18
If clock is gated (DRC violation)
o Add additional signal TM (test mode) for testability
n dc_shell> create_port -direction "in" {TM}
n dc_shell> set_dft_configuration -fix_clock enable
n dc_shell> set_dft_signal -view exist -type ScanClock -
timing {50 100} –port clk
n dc_shell> set_dft_signal -view spec -type TestData -port
clk
n dc_shell> set_dft_signal -view spec -type TestMode -port
TM
n dc_shell> set_autofix_configuration -type clock -control TM
-test_data clk
19
Report Area, Time, and Power
o Report area, timing, and power
n dc_shell> report_area
n dc_shell> report_timing
n dc_shell> report_power
20
Result (1/2)
o Area
n Number of ports: 147
n Number of nets: 594
n Number of cells: 474
n Number of references: 52
21
Result (2/2)
o Power
n Global Operating Voltage = 1
n Power-specific unit information :
n Voltage Units = 1V
n Capacitance Units = 1.000000pf
n Time Units = 1ns
n Dynamic Power Units = 1mW (derived from V,C,T units)
n Leakage Power Units = 1uW
22
Post Scan Check, Report Scan Path
o Recheck a design against the design
rules of a chosen scan style
n dc_shell> dft_drc
o Report the configuration of scan
paths
n dc_shell> report_scan_path
23
Write Out Synthesized Verilog And
STIL Files
o Save the scanned gate level netlist
n dc_shell> write -hierarchy -format
verilog -output pre_norm_scan.v
o Save scan chain configuration
n dc_shell> write_test_protocol -output
pre_norm_scan.stil
n dc_shell> write_sdc pre_norm_scan.sdc
n dc_shell> exit
24
Outline
o Introduction
o Design Compiler
o TetraMax
o Lab
25
Invoke TetraMax
o In tsch, invoke TetraMax
$ tmax –s
o Initial state is “BUILD”
BUILD>
26
Read Netlist and Library
o Read verilog netlist file
BUILD> read_netlist pre_norm_scan.v
o Read library file
BUILD> read_netlist l90sprvt.v -library
27
Reporting Modules
o -summary
Generate a summary report on all modules
o -error
Report all modules that have at least one violation of a
rule with severity of "error“
o -undefined
report all modules that are referenced but not defined
o Example:
n BUILD> report_modules -summary
n BUILD> report_modules -error
n BUILD> report_modules -undefined
28
Building ATPG Design Model
o Builds the in-memory simulation
model from the design modules that
have been read in
n BUILD> run_build_model pre_norm
o It will change into DRC command mode
29
Set DRC Parameters And Run
o Set the parameters that control DRC
process. You can display the current
settings with "report_settings" command
o Perform Design Rule Checking, which is
required to enter the TEST command mode,
where test generation and fault simulation
can be performed
n DRC> run_drc pre_norm_scan.stil
o pre_norm_scan.stil : scan chain configuration file
30
Add Faults
o Select the fault model for ATPG
n TEST > set_faults –model stuck
n TetraMAX supports test pattern generation for five
fault models
o Stuck-at
o Transition
o Path delay
o IDDQ
o Bridging
o Create a list of faults for fault simulation and
test generation
n TEST > add_faults -all
31
ATPG (1/3)
o Set the parameters that control the ATPG
processes
n -merge
Specify whether to perform pattern merging during
ATPG. The arguments indicates how much effort to
spend doing merging (default: none)
n -verbose
With -verbose enabled, extra messages are
displayed during the pattern merge operation
n -abort_limit
Specify the max number of remade decisions before
terminating a test generation effort during ATPG
(default: 10)
32
ATPG (2/3)
n -coverage
Specify a test coverage limit at which to terminate
the ATPG effort. Ranging from 0~100 (default: 100)
n -decision
When backtracking, using specific way to determine
(default: norandom)
n -time
Specify the maximum CPU time, in seconds, allowed
per fault or per run. The time limit can be turned off
again by specifying a 0 for the time values.
o Note for Tcl mode:
Multiple values specified by the -time option must appear as a list and
be enclosed by braces “{}”.
33
ATPG (3/3)
n -full_seq_time
Similar to “-time” option, but applies to the
Full-Sequential ATPG algorithm. (default: 0)
n Example for scan chain design:
o TEST> set_atpg -merge high -verbose -abort_limit 250
-coverage 100 -decision random
TEST> run_atpg
34
During ATPG
o ATPG performed for stuck fault model using internal pattern source.
o ----------------------------------------------------------
o #patterns #faults #ATPG faults test process
o stored detect/active red/au/abort coverage CPU time
o --------- ------------- ------------ -------- --------
o Begin deterministic ATPG: #uncollapsed_faults=5472, abort_limit=250...
o Patn 1: #merges=320 #failed_merges=9 #faults=2977 #det=877 CPU=0.03 sec
o Patn 2: #merges=213 #failed_merges=12 #faults=2755 #det=323 CPU=0.07 sec
o Patn 3: #merges=315 #failed_merges=15 #faults=2438 #det=460 CPU=0.12 sec
o Patn 4: #merges=133 #failed_merges=18 #faults=2286 #det=226 CPU=0.15 sec
o Patn 5: #merges=225 #failed_merges=10 #faults=2060 #det=323 CPU=0.19 sec
o Patn 6: #merges=171 #failed_merges=9 #faults=1888 #det=255 CPU=0.22 sec
o Patn 7: #merges=190 #failed_merges=6 #faults=1697 #det=272 CPU=0.25 sec
o Patn 8: #merges=64 #failed_merges=11 #faults=1631 #det=92 CPU=0.27 sec
o Patn 9: #merges=106 #failed_merges=4 #faults=1515 #det=193 CPU=0.29 sec
o Patn 10: #merges=103 #failed_merges=5 #faults=1411 #det=150 CPU=0.31 sec
35
ATPG Result
o Test coverage
n Uncollapsed Stuck Fault Summary Report
n -----------------------------------------------
n fault class code #faults
n -------------------------- ------ ---------
n Detected DT 5912
n Possibly detected PT 0
n Undetectable UD 101
n ATPG untestable AU 1
n Not detected ND 44
n -----------------------------------------------
n total faults 6058
n test coverage 99.24%
n -----------------------------------------------
n Pattern Summary Report
n -----------------------------------------------
n #internal patterns 168
n #basic_scan patterns 168
n -----------------------------------------------
36
Fault Class
o Detected (DT) o ATPG Untestable (AU)
n Guarantee a detectable n Cannot be found using
difference between the ATPG, but may be
expected value and the detected by other
fault effect value methods(functional tests)
o Possibly Detected (PT) o Not Detected (ND)
n A faulty machine n Cannot be found due to
response will simulate ATPG iterations limits or
an “X” rather than a 1 or designs too complex
0
o Undetectable (UD)
n Cannot be tested by any
means
37
Test Coverage
,- + (0- ∗ 2"$_5("36$)
T"#$ %&'"()*" =
)88 9):8$# − (<, + (=< ∗ ):_5("36$))
38
Reporting Faults
o Sets the parameters that control the fault
manager
n TEST > set_faults -summary verbose
o Set which kind of faults you want to see
collapsed/uncollapsed
n TEST > set_faults -report collapsed
n TEST > report_summaries
o Display fault data
n “-class”: Specifies a specific fault class to be
reported
o TEST > report_faults -class UD
39
Writing Faults
o Writes fault data to external file
n TEST > write_faults pre_norm_faults.rpt
-all -replace
o Writes patterns to external file
n TEST > write_patterns
pre_norm_test_patterns.stil -format stil
-replace
n TEST > exit
40
Outline
o Introduction
o Design Compiler
o TetraMax
o Lab
41
Goal
o Compare the following for circuit with
and without inserting scan chain
n Area
n Power
n Fault count
n Pattern count
n Test coverage
n ATPG runtime
42
Notice – DC (w/o Scan-chain)
o For circuit without scan-chain, don’t set any
command related to scan in design compiler,
includeing: compile -scan, preview_dft,
insert_dft, set_scan_configuration,
report_scan_path, create_test_protocol,
write_test_protocol, write_scan_def
43
Notice – Tmax (w/o Scan-chain)
o For circuit without scan-chain running ATPG,
only use the following command: (page 31)
n DRC> run_drc
o For ATPG without scan-chain, please remember
to add an ATPG constraint.
n TEST> set_atpg -full_seq_time {600 86400}
o For circuit without scan-chain doing ATPG, use
option: -full_seq_atpg
n TEST> set_atpg -full_seq_atpg
44
Result
pre_norm Area Power Coverage ATPG Pattern
(collapsed) Run
Time
Non- 100956 238uw 98.02% 211.50 539
Scanned
(-full seq
atpg)
Scanned 107248 240uw 99.63% 1.57 168
45
Homework
47