Professional Documents
Culture Documents
Thiet Ke Vi Mach So Nang Cao Truong Quang Vinh Asic&Ip Ch3 p2 (Cuuduongthancong - Com)
Thiet Ke Vi Mach So Nang Cao Truong Quang Vinh Asic&Ip Ch3 p2 (Cuuduongthancong - Com)
Thiet Ke Vi Mach So Nang Cao Truong Quang Vinh Asic&Ip Ch3 p2 (Cuuduongthancong - Com)
HỒ CHÍ MINH
TRƯỜNG ĐẠI HỌC BÁCH KHOA
KHOA ĐIỆN-ĐIỆN TỬ
BỘ MÔN KỸ THUẬT ĐIỆN TỬ
om
.c
ng
ASIC CHIP AND IP CORE DESIGN
co
an
th
ng
Chapter 3: Architecture Design – Part 2
o
du
1 CuuDuongThanCong.com https://fb.com/tailieudientucntt
3.3 Optimizing The Design
• Objectives: maps the design to an optimal combination of
om
specific target library cells, based on the design’s functional,
speed, and area requirements
.c
1. The Optimization Process
ng
2. Selecting and Using a Compile Strategy
co
3. Resolving Multiple Instances of a Design Reference
an
4. Preserving Subdesigns
5.
th
Understanding the Compile Cost Function
ng
6. Performing Design Exploration
o
du
om
optimization:
.c
– Architectural optimization
– Logic-level optimization
ng
– Gate-level optimization
co
• Architectural Optimization
an
th
– Sharing common subexpressions ng
– Sharing resources
o
– Selecting DesignWare implementations
du
– Reordering operators
u
only).
om
A
.c
B
A*B + C*D F1
C
ng
D
?
co
an
A*B + C2 F2
th
o ng
X0
Mul
du
Y0
X1
u
X2
Mul Y1
cu
X3
?
X4
X5
Mul Y2
X6
X7
Mul Y3
om
– Structuring
.c
• adds intermediate variables and logic structure to a design
• Design Compiler searches for subfunctions that can be factored out and
ng
evaluates these factors
co
– Flattening
an
• convert combinational logic paths of the design to a two-level, sum-of-
th
products representation ng
• Design Compiler removes all intermediate variables, and therefore all its
associated logic structure, from a design.
o
du
u
cu
om
A
B
.c
F1
ng
C
D ?
co
an
F2
th
o ng
A
du
B
C ?
u
D
cu
E
F
G
H Y
om
– Mapping
.c
• This process uses gates from the target technology libraries to generate a gate-level
implementation of the design whose goal is to meet timing and area goals. Use the
ng
compile_ultra command or the compile command to control the mapping algorithms
co
used by Design Compiler.
– Delay optimization
an
• The process goal is to fix delay violations introduced in the mapping phase. Delay
th
optimization does not fix design rule violations or meet area constraints.
ng
– Design rule fixing
o
• The process goal is to correct design rule violations by inserting buffers or resizing
du
existing cells. Design Compiler tries to fix these violations without affecting timing
and area results, but if necessary, it does violate the optimization constraints.
u
cu
– Area optimization
• The process goal is to meet area constraints after the mapping, delay optimization,
and design rule fixing phases are completed. However, Design Compiler does not
allow area recovery to introduce design rule or delay constraint violations as a means
of meeting the area constraints.
Bộ môn Kỹ Thuật Điện Tử
CuuDuongThanCong.com https://fb.com/tailieudientucntt
7
3.3.2 Selecting and Using a Compile Strategy
• Top-down compile: the top-level design and all its subdesigns
om
are compiled together
.c
• Bottom-up compile: the individual subdesigns are compiled
separately, starting from the bottom of the hierarchy and
ng
proceeding up through the levels of the hierarchy until the top-
co
level design is compiled
an
th
• Mixed compile: the top-down or bottom-up strategy,
ng
whichever is most appropriate, is applied to the individual
o
subdesigns
du
u
cu
om
– Only top level constraints are needed.
– Takes care of interblock dependencies automatically
.c
– Better results due to optimization across entire design.
ng
• Disadvantages
co
– Long compile time
an
– Incremental changes to the sub-blocks require complete re-synthesis.
th
– Does not perform well, if design contains multiple clocks or generated
ng
clocks.
o
du
om
/* read in the entire design */
read_verilog E.v
.c
read_verilog D.v
ng
read_verilog C.v
co
read_verilog B.v
read_verilog A.v
an
read_verilog TOP.v
current_design TOP
th
ng
link
o
du
om
– Compiles large designs by using the divide-and-conquer approach
.c
– Requires less memory than top-down compile
– Allows time budgeting
ng
• Disadvantages:
co
– Complex constraints
an
th
– Reduce compile time ng
• Requirements
o
– Iterating until the interfaces are stable
du
om
set all_blocks {E D C B A} # read in entire compiled design
# compile each subblock independently read_file -format verilog TOP.v
.c
foreach block $all_blocks { current_design TOP
ng
link
# read in block write -hierarchy -format ddc -output
co
set block_source "$block.v" first_pass.ddc
an
read_file -format verilog $block_source
current_design $block # apply top-level constraints
th
link source defaults.con
ng
# apply global attributes and constraints source top_level.con
o
source defaults.con
du
om
# save characterize information # recompile subblock
foreach block $all_blocks { current_design $block
.c
current_design $block link
ng
set char_block_script "$block.wscr"
write_script > $char_block_script # apply global attributes and constraints
co
} source defaults.con
an
# recompile each block # apply characterization constraints
th
foreach block $all_blocks { set char_block_script "$block.wscr"
ng
# clear memory source $char_block_script
o
remove_design -all
du
om
2. Compile the subdesigns independently.
.c
3. Read in the top-level design and any compiled subdesigns not already in memory.
ng
4. Set the current design to the top-level design, link the design, and apply the top-
level constraints. If the design meets its constraints, you are finished. Otherwise,
co
continue with the following steps.
an
5. Apply the characterize command to the cell instance with the worst violations.
th
6. Use write_script to save the characterized information for the cell.
ng
7. Use remove_design -all to remove all designs from memory.
o
8. Read in the RTL design of the previously characterized cell.
du
9. Set current_design to the characterized cell’s subdesign and recompile, using the
saved script of characterization data.
u
cu
om
– Use the top-down compile strategy for small hierarchies of blocks.
.c
– Use the bottom-up compile strategy to tie small hierarchies together
ng
into larger blocks.
co
Example of the mixed compilation strategy
an
th
o ng
du
u
cu
om
design can occur.
.c
ng
co
an
th
o ng
du
u
om
design for each instance.
.c
• From the version V-2004.06, the tool automatically uniquifies
design as part of the compile process
ng
co
– dc_shell> uniquify -cell mid1/bot1
an
th
o ng
dc_shell> current_design top
du
dc_shell> compile
u
cu
om
– check_design -multiple_design: report information messages realted to
multiply-instantiated designs
.c
– set_dont_touch : preserve the compiled sybdesign while the remaining
ng
design are compiled
co
• Steps:
an
1. Characterize the subdesign’s instance that has the worst-case
th
environment.
ng
2. Compile the referenced subdesign.
o
du
om
• which has already been compiled,
• dc_shell> current_design C indicates that the dont_touch attribute
.c
has been set. This design is not
• dc_shell> compile
ng
modified when the top-level design is
• dc_shell> current_design top compiled.
co
• dc_shell> set_dont_touch {U2/U3 U2/U4}
an
• dc_shell> compile
th
o ng
du
u
cu
om
• Example: After ungrouping the instances of a subdesign,
.c
recompile the top-level design.
ng
– dc_shell> current_design B
co
– dc_shell> ungroup {U3 U4}
an
– dc_shell> current_design top
th
– dc_shell> compile
o ng
du
u
cu
om
1 Uniquify •Requires more memory
.c
•Takes longer to compile
ng
2 Compile- •Compiles the reference design once
co
once-don’t- •Requires less memory than the uniquify method
an
touch •Takes less time to compile than the uniquify method
th
ng
3 Ungroup •Requires more memory and takes longer to compile
o
than the compile-once-don’t-touch method
du
om
optimization.
.c
• It places the dont_touch attribute on cells, nets, references,
and designs in the current design to prevent these objects from
ng
being modified or replaced during optimization.
co
• Example:
an
th
– dc_shell> get_nets *my_net* ng
– dc_shell> set enable_keep_signal_dt_net true
o
– dc_shell> set_dont_touch [get_nets *my_net*] true
du
– dc_shell> compile_ultra
u
cu
om
a) Design rule costs
.c
b) Connection class
ng
c) Multiple port nets
co
d) Maximum transition time
an
e) Maximum fanout
th
f) Maximum capacitance ng
g) Cell degradation
o
• Optimization costs
du
a) Maximum delay
u
cu
b) Minimum delay
c) Maximum power
d) Maximum area
om
maximum design rule costs and the delay costs
.c
• compile -no_design_rule : disable evaluation
ng
co
of the design rule cost function
an
• compile -only_design_rule : disable evaluation
of the optimization cost function th
o ng
du
u
cu
om
the compile command with no options:
.c
– dc_shell> compile
ng
co
• Use options:
an
– map_effort medium
– area_effort th
o ng
du
u
cu
om
a) Optimizing High-Performance Designs
.c
b) Optimizing for Maximum Performance
ng
co
c) Optimizing for Minimum Area
an
d) Optimizing Datapaths
th
o ng
du
u
cu
om
– Compile_ultra
.c
• Apply the best possible set of timing-centric variables
ng
or commands during compile for critical delay
co
optimization as well as improvement in area quality of
an
results (QoR)
th
ng
• Need DC Ultra license and DesignWare Foundation
o
license
du
u
cu
om
– Create path groups: using group_path command
.c
– Fix heavily loaded nets
ng
co
– Auto-ungroup hierarchies on the critical path
an
– Perform a high-effort incremental compile
– Perform a high-effort compile th
o ng
du
u
dc_shell> group_path -name group3 -from in3 -to FF1/D -weight 2.5
cu
om
– Use the set_critical_range command.
.c
ng
Example:
co
create_clock -period 20 clk
set_critical_range 3.0 $current_design
an
set_max_delay 10 {A B C}
th
group_path -name group1 -to {A B C}
ng
o
du
u
cu
om
– Script to create a path group for each endpoint.
.c
set endpoints \
ng
[add_to_collection [all_outputs] \
co
[all_registers -data_pins]]
an
th
foreach_in_collection endpt $endpoints {
ng
set pin [get_object_name $endpt]
o
du
}
cu
om
– If the large load resides in a single module and the module
contains no hierarchy
.c
• source constraints.con
ng
• compile_ultra
co
• balance_buffer -from [get_pins buf1/Z]
an
– If the large loads reside across the hierarchy from several
th
modules, apply design rules to fix the problem
ng
source constraints.con
o
•
du
• compile_ultra
u
• set_max_capacitance 3.0
cu
• compile_ultra -only_design_rule
om
Path
.c
– compile_ultra –auto_ungroup
ng
• Performing a High-Effort Compile
co
– dc_shell> elaborate my_design
an
– dc_shell> compile -map_effort high
th
ng
• Performing a High-Effort Incremental Compile
o
du
om
– Disabling Total Negative Slack Optimization
.c
• dc_shell> set_max_area -ignore_tns max_area
ng
– Boundary Optimization
co
• dc_shell> compile -boundary_optimization
an
or
th
• dc_shell> set_boundary_optimization subdesign
o ng
du
u
cu
om
be implemented by a datapath generator.
.c
• This transformation improves the QoR by utilizing the carry-save
ng
arithmetic technique.
co
• DC Ultra enables datapath extraction and explores various
an
datapath and resource-sharing options during compile
– Use: compile_ultra
th
ng
• Benefits:
o
du
om
• To restrict the library cells to be used in a particular block:
.c
– set_target_library_subset -object_list design_cells -top {library_list} -
ng
dont_use lib_cells -only_here lib_cells
co
• -object_list lists the hierarchical cells
an
• -top specifies to use the set_target_library_subset command at the top
th
level.
• library_list is a space-separated list of target library file names
ng
• -dont_use lib_cells specifies library cells that cannot be used for
o
du
optimization
• -only_here lib_cells specifies library cells that can only be used for
u
cu
optimization
• To remove a target library subset constraint from the design:
– remove_target_library_subset
– Reset_design
Bộ môn Kỹ Thuật Điện Tử
CuuDuongThanCong.com https://fb.com/tailieudientucntt
35
3.3.8 Using Target Library Subsets
• Checking target library subsets
om
– check_mv_design -target_library_subset : searches the design for any
cells that do not follow the rules for the subset.
.c
– check_target_library_subset: check for the following conditions
ng
• Conflicts between target library subsets and the global target_library
co
variable
an
• Conflicts between operating condition and target library subset
th
• Conflicts between the library cell of a mapped cell and target library subset
ng
• Example:
o
– dc_shell-topo> set target_library "lib1.db lib2.db"
du
\[get_cells u1]
cu
om
– dc_shell-topo> define_libcell_subset -libcell_list {SDFLOP1 SDFLOP2} \
.c
– -family_name specialflops
dc_shell-topo> set_libcell_subset -object_list [get_cells {reg01 reg02}] \
ng
–
-family_name specialflops
co
–
• report_libcell_subset: report information about the library cell
an
subset
th
– dc_shell-topo> report_libcell_subset -object_list [get_cells reg01]
ng
****************************************
o
Report : library cell subset
du
Design : chip
Version: G-2012.06
Date : Wed Mar 21 16:16:58 2012
u
cu
****************************************
Libcell Family Libcells
-------------------------------------------------------------------------
specialflops sff0 sff1 sff2
-------------------------------------------------------------------------
Object Reference Libcell Family
-------------------------------------------------------------------------
reg01 sff0 specialflops
om
– remove_libcell_subset command removes a library cell subset
constraint from specified sequential cells or removes a user-defined
.c
library cell subset.
ng
co
• Ex1: the library subset constraint is removed from the reg01
an
and reg02 instances:
th
– dc_shell-topo> remove_libcell_subset -object_list [get_cells reg01
ng
reg02]
o
du
u
removed:
– dc_shell-topo> remove_libcell_subset -family_name specialflops
om
– Verilog
.c
• Developed by Advanced Integrated Design Systems
ng
– VHDL (Very High Speed Integrated Circuits HDL)
co
an
• was developed by committee under government
th
sponsorship ng
o
du
u
cu
om
module carry( input logic a, b, c,
.c
output logic cout);
ng
logic x, y, z;
co
and g1(x, a, b);
an
th
and g2(y, a, c); ng
and g3(z, b, c);
o
du
or g4(cout, x, y, z);
u
endmodule
cu