Logic Synthesis: Hsi-Pin Ma (馬席彬)
Logic Synthesis: Hsi-Pin Ma (馬席彬)
Logic Synthesis
Hsi-Pin Ma ()
http://larc.ee.nthu.edu.tw/~hp/EE4292/ Department of Electrical Engineering National Tsing Hua University
Memory Module
sdf
Hsi-Pin Ma
Hsi-Pin Ma
NC-Verilog
Cadence NC-Verilog Simulator Help
Hsi-Pin Ma
Logic Synthesis
Hsi-Pin Ma
References
Design Compiler User Guide, SOLD. Synthesis, CIC Training documents.
Hsi-Pin Ma
Synthesis
Translate
HDL Sources
Optimize + Map
Library Objects
link_library target_library symbol_library synthetic_library
compile
Hsi-Pin Ma
write
% dc_shell -f synthesis.scr %
Hsi-Pin Ma
10
Design Objects
Design : A circuit that performs one or more logic functions Cell : An instance of a design or library primitive within a design Reference : The name of the original design that a cell instance points to Port : The input or output of a design Pin : The input or output of a cell Net : The wire that connects ports to pins and/or pins to each other Clock : A timing reference object in DC memory which describes a waveform for timing analysis
Hsi-Pin Ma
11
Design Objects
Design module TOP (A, B, C, D, CLK, OUT1); input A, B, C, D, CLK; output [1:0] OUT1; Port wire INV1, INV0, bus1, bus0; ENCODER U1(.AIN(A), ..., .Q1(bus1)); Reference Cell INV U2(.A(BUS0), .Z(INV0)), U3(.A(BUS1), .Z(INV1)); Net
Clock
Pin
Hsi-Pin Ma
12
find
Search current design for names of the given object type Syntax
find type [name_list] [-hierarchy] type : design, port, reference, cell, clock, pin or net name_list
List of design of library object names, use brackets ({lists}) for multiple names If no name_list is given, find lists all the names of specified object type
Hsi-Pin Ma 13
find
List all ports of the current design
find (port, *);
List all the pins of the FD1 cell of the class library
find (pin, class/FD1/*)
Hsi-Pin Ma 14
Design Constraints
Hsi-Pin Ma
15
Optimization constraints
design goals and requirements, eg., maximum delay, minimum delay, maximum area, maximum power
Hsi-Pin Ma 16
Hsi-Pin Ma
17
Hsi-Pin Ma
18
set_max_transition
Set a maximum transition time on ports or design (Smaller than the librarys definition)
set_max_transition 5 all_inputs() set_max_transition 3 all_outputs()
Hsi-Pin Ma
19
Optimization Constraints
Hsi-Pin Ma
20
Hsi-Pin Ma
21
Hsi-Pin Ma
22
Sequential Logics
create_clock
Define clock
dc_shell> create_clock CLK -period 20 -waveform {0 8}
set_fix_hold
Correct hold time violations
dc_shell> set_fix_hold CLK
set_dont_touch_network
Preserve clock network
dc_shell> set_dont_touch_network CLK
Hsi-Pin Ma 23
Input Delay
Clock-cycle >= DFFclk-Qdelay + a + b + DFFsetup Input delay = DFFclk-Qdelay + a
Hsi-Pin Ma
24
Input Delay
dc_shell> set_input_delay -clock clk -max 6.4 in1 dc_shell> set_input_delay -clock clk -min 4.4 in1
Hsi-Pin Ma
25
Output Delay
Clock-cycle >= DFFclk-Qdelay + d + e + DFFsetup Output delay = e + DFFsetup
Hsi-Pin Ma
26
Output Delay
Hsi-Pin Ma
27
Hsi-Pin Ma
28
Compile Strategy
Hsi-Pin Ma
29
Drive Characteristics
dc_shell> current_design top_level_design dc_shell> set_drive 1.5 {I1 I2} dc_shell> current_design sub_design2 dc_shell> set_driving_cell -cell IV {I3}
Hsi-Pin Ma
30
/* Constraints File for Design TOP (defaults.con) */ set_operating_conditions WCCOM set_wire_load_model 20x20 create_clock -period 25 clk set_input_delay 3 -clock clk all_inputs() -find(port, clk) set_output_delay 2 -clock clk all_outputs() set_load 1.5 all_outputs() set_driving_cell -cell IV all_inputs() set_drive 0 clk
Hsi-Pin Ma 31
Top-Down Compile
/* read in the entire design */ read_file -format verilog E.v read_file -format verilog D.v read_file -format verilog C.v read_file -format verilog B.v read_file -format verilog A.v read_file -format verilog TOP.v current_design TOP link /* apply constraints and attributes */ include defaults.con /* compile the design */ compile
Hsi-Pin Ma
32
Bottom-Up Compile
all_blocks = {E,D,C,B,A} /* compile each subblock independently */ foreach (block, all_blocks) { /* read in block */ block_source = block + .v read_file -format verilog block_source current_design block link /* apply global constraints and attributes */ include defaults.con /* apply constraints and attributes */ block_script = block + .con include block_script /* compile the block */ compile } /* read in the entire compiled design */ read_file -format verilog TOP.v current_design TOP link write -hierarchy -output first_pass.db /* apply top-level constraints */ include defaults.con include top_level.con /* check for violations */ report_constraint /* characterize all instances in the design */ all_instances = {U1,U2,U2/U3,U2/U4,U2/U5} characterize -constraint all_instances /* save characterize information */ foreach (block, all_blocks) { current_design block char_block_script = block + .wscr write_script > char_block_script }
33
Hsi-Pin Ma
Bottom-Up Compile
/* recompile each block */ foreach (block, all_blocks) { /* clear memory */ remove_design -all /* read in previously characterized subblock */ block_source = block + .v read_file -format verilog block_source /* recompile subblock */ current_design block link /* apply global constraints and attributes */ include defaults.con /* apply characterization constraints */ char_block_script = block + .wscr include char_block_script /* apply block constraints and attributes */ block_script = block + .con include block_script /* recompile the block */ compile
Hsi-Pin Ma
34
Hsi-Pin Ma
35
Hsi-Pin Ma
36
dc_shell> current_design top dc_shell> characterize U2/U3 dc_shell> current_design C dc_shell> compile dc_shell> current_design top dc_shell> set_dont_touch {U2/U3 U2/U4} dc_shell> compile
Hsi-Pin Ma
37
dc_shell> current_design B dc_shell> ungroup {U3 U4} dc_shell> current_design top dc_shell> compile
Hsi-Pin Ma
38
Hsi-Pin Ma
39