Skip to content

Commit df1f7b4

Browse files
authored
Merge pull request #1322 from The-OpenROAD-Project-staging/ma@update4
Update SDC constraints to address hold buffer
2 parents a059a1b + 1035fe2 commit df1f7b4

File tree

3 files changed

+233
-211
lines changed

3 files changed

+233
-211
lines changed

flow/designs/asap7/mock-array/Element/constraints.sdc

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,66 @@ set cols [expr {[info exists ::env(MOCK_ARRAY_COLS)] ? $::env(MOCK_ARRAY_COLS) :
44

55
set clk_name clock
66
set clk_port_name clock
7-
set clk_period 1000
7+
set clk_period 300
8+
set clk_imax_pct 0.75
9+
set clk_imin_pct 0.10
10+
set clk_omax_pct 0.80
11+
set clk_omin_pct 0.10
812

913
set clk_port [get_ports $clk_port_name]
1014
create_clock -period $clk_period -waveform [list 0 [expr $clk_period / 2]] -name $clk_name $clk_port
1115
set_clock_uncertainty -setup 20.0 [get_clocks $clk_name]
12-
set_clock_uncertainty -hold 20.0 [get_clocks $clk_name]
16+
set_clock_uncertainty -hold 20.0 [get_clocks $clk_name]
17+
18+
create_clock -period $clk_period -waveform [list 0 [expr $clk_period / 2]] -name ${clk_name}_vir
19+
set_clock_uncertainty -setup 20.0 [get_clocks ${clk_name}_vir]
20+
set_clock_uncertainty -hold 20.0 [get_clocks ${clk_name}_vir]
21+
set_clock_latency 100 [get_clocks ${clk_name}_vir]
22+
23+
set_max_transition 250 [current_design]
24+
set_max_transition 100 -clock_path [all_clocks]
25+
26+
# Not used -- Keep this for syntax
27+
set non_clk_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]
1328

1429
# io_ins_x -> REG_x in neighbouring element or just outside of the array
15-
set_input_delay -clock $clk_name [expr $clk_period * 0.05] [get_ports {io_ins_*}]
30+
set_input_delay -max -clock ${clk_name}_vir [expr $clk_period * $clk_imax_pct] [get_ports {io_ins_*}]
31+
set_input_delay -min -clock ${clk_name}_vir [expr $clk_period * $clk_imin_pct] [get_ports {io_ins_*}]
1632

1733
# REG_x in neighbouring element or just outside of the array -> io_outs_x
18-
set_output_delay -clock $clk_name [expr $clk_period * 0.05 ] [get_ports {io_outs_*}]
34+
set_output_delay -clock ${clk_name}_vir [expr $clk_period * $clk_omax_pct] [get_ports {io_outs_*}]
1935

2036
# For combinational buses routed through the elements, IO delays need to be set to accomodate requirements
2137
# for each instance's position across the entire array. For simplicity, we budget the clock period evenly
2238
# between all elements (with some headroom).
2339
set budget_per_element [expr $clk_period / $cols]
2440
set headroom [expr $budget_per_element * .2]
41+
2542
# For in -> reg and reg -> out paths, min delay captures the case where a signal hasn't flowed through any
2643
# other element before this one
2744
set min_delay $headroom
45+
2846
# For in -> reg and reg -> out paths, max delay captures the case where a signal has flowed through all
2947
# other elements before this one
30-
set max_delay [expr $budget_per_element * ($cols - 1) + $headroom]
48+
#set max_delay [expr $budget_per_element * ($cols - 1) + $headroom]
49+
set max_delay [expr $budget_per_element * 0.8]
50+
3151

3252
# REG[0] (io_outs_left[0] in the source) -> io_lsbOuts_7
33-
set_output_delay -clock $clk_name -min $min_delay [get_ports {io_lsbOuts_7}]
34-
set_output_delay -clock $clk_name -max $max_delay [get_ports {io_lsbOuts_7}]
53+
set reg_lsbOuts {io_lsbOuts_3 io_lsbOuts_7}
54+
55+
set_output_delay -clock ${clk_name}_vir [expr $clk_period * $clk_omax_pct] [get_ports $reg_lsbOuts]
56+
57+
# In --> out combinational paths
58+
set_max_delay $max_delay -from [get_ports {io_lsbIns_*}] -to [get_ports {io_lsbOuts_*}]
59+
3560

36-
# All remaining non-clock IOs are only connected to one another without going through any
37-
# registers (in -> out paths). Such paths should not be checked for setup/hold violations
38-
# and do not need to be constrained.
39-
set non_clk_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]
40-
set_false_path -from $non_clk_inputs -to [all_outputs]
4161

4262
# Set driving cell and load capacitance explicitly to ensure timing results are sufficiently pessimistic
43-
set_driving_cell [all_inputs] -lib_cell BUFx2_ASAP7_75t_R
63+
#set_driving_cell [all_inputs] -lib_cell BUFx2_ASAP7_75t_R
64+
set_driving_cell [all_inputs] -lib_cell BUFx4_ASAP7_75t_R
4465
# Assuming the load on each output is a BUFx2_ASAP7_75t_R, we pessimistically use 3 times the highest input
4566
# pin capacitance for this cell, which is 0.577042.
4667
# See platforms/asap7/lib/asap7sc7p5t_INVBUF_RVT_FF_nldm_220122.lib.gz, line 1223.
47-
set_load -pin_load 1.731126 [all_outputs]
68+
#set_load -pin_load 2.731126 [all_outputs]
69+
set_load -pin_load 10 [all_outputs]

flow/designs/asap7/mock-array/constraints.sdc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
set sdc_version 2.0
22

3-
set clk_period 500
3+
set clk_period 320
44

55
set clk_name clock
66
set clk_port_name clock
77
set clk_in_pct 0.75
88
set clk_o1_pct 0.2
9-
set clk_o2_pct 0.75
9+
set clk_o2_pct 0.75 ;# relax to see paths thru all Elements
1010

1111
create_clock -name $clk_name -period $clk_period -waveform [list 0 [expr $clk_period/2]] [get_ports $clk_port_name]
12-
set_clock_uncertainty 20 [get_clocks $clk_name]
12+
set_clock_uncertainty 10 [get_clocks $clk_name]
1313

1414
create_clock -name ${clk_name}_vir -period $clk_period -waveform [list 0 [expr $clk_period/2]]
15-
set_clock_uncertainty 20 [get_clocks ${clk_name}_vir]
16-
set_clock_latency 250 [get_clocks ${clk_name}_vir] ;# Matching real clock latency
15+
set_clock_uncertainty 10 [get_clocks ${clk_name}_vir]
16+
set_clock_latency 275 [get_clocks ${clk_name}_vir] ;# Matching real clock latency
1717

1818
set clk_port [get_ports $clk_port_name]
1919
set non_clock_inputs [lsearch -inline -all -not -exact [all_inputs] $clk_port]

0 commit comments

Comments
 (0)