Fixing openroad cts recipe
Following latest openroad flow
OpenROAD 1
-set clock_nets "clk"
-set cts_buf "BUF_X4"
-set fillcells "FILLCELL_X1 FILLCELL_X2 FILLCELL_X4 FILLCELL_X8 FILLCELL_X16 FILLCELL_X32"
-set max_slew .198e-9
-set max_cap .242e-12
-set clk_layer metal5
-set parasitics_layer metal3
-
-################################################################
-# CTS CORE SCRIPT
-################################################################
-
-# Clone clock tree inverters.
-repair_clock_inverters
+#######################################
+# Clock tree synthesis
+# (skip if no clocks defined)
+#######################################
+
-# Set clock layer wire RC.
-set_wire_rc -clock -layer $clk_layer
+if {[llength [all_clocks]] > 0} {
-configure_cts_characterization -max_slew $max_slew \
- -max_cap $max_cap
+ # Clone clock tree inverters next to register loads
+ # so cts does not try to buffer the inverted clocks.
+ repair_clock_inverters
-# Run CTS
-clock_tree_synthesis -buf_list "$cts_buf" \
- -clk_nets "$clock_nets"
+ clock_tree_synthesis -root_buf $sc_clkbuf -buf_list $sc_clkbuf \
+ -sink_clustering_enable \
+ -sink_clustering_size $openroad_cluster_size \
+ -sink_clustering_max_diameter $openroad_cluster_diameter \
+ -distance_between_buffers $openroad_cluster_diameter
set_propagated_clock [all_clocks]
-filler_placement $fillcells
-check_placement
+ estimate_parasitics -placement
-# TODO: Programmable metal layer
-set_wire_rc -layer $parasitics_layer
+ repair_clock_nets -buffer_cell $sc_clkbuf
-estimate_parasitics -placement
-repair_clock_nets -buffer_cell "$cts_buf"
+ #######################
+ # Detailed Placement
+ #######################
+
+ set_placement_padding -global \
+ -left $openroad_pad_global_place \
+ -right $openroad_pad_global_place
-set_placement_padding -global
detailed_placement
-optimize_mirroring
-check_placement -verbose
-estimate_parasitics -placement
+ #######################
+ # Fix setup/hold
+ #######################
+
repair_timing -hold
+ repair_timing -setup
+
+ detailed_placement
+
+ #######################
+ # Add Fillers
+ #######################
+
+ filler_placement $sc_filler
+
+ #######################
+ # Check Placement
+ #######################
+ check_placement
+
+}
+
+
+
