@@ -3,30 +3,30 @@ source $::env(SCRIPTS_DIR)/load.tcl
33erase_non_stage_variables floorplan
44load_design 1_synth.v 1_synth.sdc
55
6- proc report_unused_masters {} {
7- set db [ord::get_db]
8- set libs [$db getLibs]
9- set masters " "
10- foreach lib $libs {
11- foreach master [$lib getMasters] {
12- # filter out non-block masters, or you can remove this conditional to detect any unused master
13- if {[$master getType] == " BLOCK" } {
14- lappend masters $master
15- }
16- }
6+ proc report_unused_masters { } {
7+ set db [ord::get_db]
8+ set libs [$db getLibs]
9+ set masters " "
10+ foreach lib $libs {
11+ foreach master [$lib getMasters] {
12+ # filter out non-block masters, or you can remove this conditional to detect any unused master
13+ if { [$master getType] == " BLOCK" } {
14+ lappend masters $master
15+ }
1716 }
17+ }
1818
19- set block [ord::get_db_block]
20- set insts [$block getInsts]
19+ set block [ord::get_db_block]
20+ set insts [$block getInsts]
2121
22- foreach inst $insts {
23- set inst_master [$inst getMaster]
24- set masters [lsearch -all -not -inline $masters $inst_master ]
25- }
22+ foreach inst $insts {
23+ set inst_master [$inst getMaster]
24+ set masters [lsearch -all -not -inline $masters $inst_master ]
25+ }
2626
27- foreach master $masters {
28- puts " Master [ $master getName] is loaded but not used in the design"
29- }
27+ foreach master $masters {
28+ puts " Master [ $master getName] is loaded but not used in the design"
29+ }
3030}
3131
3232report_unused_masters
@@ -46,86 +46,86 @@ append_env_var additional_args ADDITIONAL_SITES -additional_sites 1
4646set use_floorplan_def [env_var_exists_and_non_empty FLOORPLAN_DEF]
4747set use_footprint [env_var_exists_and_non_empty FOOTPRINT]
4848set use_die_and_core_area \
49- [expr {[env_var_exists_and_non_empty DIE_AREA] && [env_var_exists_and_non_empty CORE_AREA]}]
49+ [expr { [env_var_exists_and_non_empty DIE_AREA] && [env_var_exists_and_non_empty CORE_AREA] }]
5050set use_core_utilization [env_var_exists_and_non_empty CORE_UTILIZATION]
5151
5252set methods_defined \
53- [expr {$use_floorplan_def + $use_footprint + $use_die_and_core_area + $use_core_utilization }]
54- if {$methods_defined > 1} {
55- puts " Error: Floorplan initialization methods are mutually exclusive, pick one."
56- exit 1
53+ [expr { $use_floorplan_def + $use_footprint + $use_die_and_core_area + $use_core_utilization }]
54+ if { $methods_defined > 1 } {
55+ puts " Error: Floorplan initialization methods are mutually exclusive, pick one."
56+ exit 1
5757}
5858
59- if {$use_floorplan_def } {
60- # Initialize floorplan by reading in floorplan DEF
61- log_cmd read_def -floorplan_initialize $env(FLOORPLAN_DEF)
62- } elseif {$use_footprint } {
63- # Initialize floorplan using ICeWall FOOTPRINT
64- ICeWall load_footprint $env(FOOTPRINT)
65-
66- initialize_floorplan \
67- -die_area [ICeWall get_die_area] \
68- -core_area [ICeWall get_core_area] \
69- -site $::env(PLACE_SITE)
70-
71- ICeWall init_footprint $env(SIG_MAP_FILE)
72- } elseif {$use_die_and_core_area } {
73- initialize_floorplan -die_area $::env(DIE_AREA) \
74- -core_area $::env(CORE_AREA) \
75- -site $::env(PLACE_SITE) \
76- {*}$additional_args
77- } elseif {$use_core_utilization } {
78- initialize_floorplan -utilization $::env(CORE_UTILIZATION) \
79- -aspect_ratio $::env(CORE_ASPECT_RATIO) \
80- -core_space $::env(CORE_MARGIN) \
81- -site $::env(PLACE_SITE) \
82- {*}$additional_args
59+ if { $use_floorplan_def } {
60+ # Initialize floorplan by reading in floorplan DEF
61+ log_cmd read_def -floorplan_initialize $env(FLOORPLAN_DEF)
62+ } elseif { $use_footprint } {
63+ # Initialize floorplan using ICeWall FOOTPRINT
64+ ICeWall load_footprint $env(FOOTPRINT)
65+
66+ initialize_floorplan \
67+ -die_area [ICeWall get_die_area] \
68+ -core_area [ICeWall get_core_area] \
69+ -site $::env(PLACE_SITE)
70+
71+ ICeWall init_footprint $env(SIG_MAP_FILE)
72+ } elseif { $use_die_and_core_area } {
73+ initialize_floorplan -die_area $::env(DIE_AREA) \
74+ -core_area $::env(CORE_AREA) \
75+ -site $::env(PLACE_SITE) \
76+ {*}$additional_args
77+ } elseif { $use_core_utilization } {
78+ initialize_floorplan -utilization $::env(CORE_UTILIZATION) \
79+ -aspect_ratio $::env(CORE_ASPECT_RATIO) \
80+ -core_space $::env(CORE_MARGIN) \
81+ -site $::env(PLACE_SITE) \
82+ {*}$additional_args
8383} else {
84- puts " Error: No floorplan initialization method specified"
85- exit 1
84+ puts " Error: No floorplan initialization method specified"
85+ exit 1
8686}
8787
88- if {[env_var_exists_and_non_empty MAKE_TRACKS]} {
89- log_cmd source $::env(MAKE_TRACKS)
90- } elseif {[file exists $::env(PLATFORM_DIR) /make_tracks.tcl]} {
91- log_cmd source $::env(PLATFORM_DIR) /make_tracks.tcl
88+ if { [env_var_exists_and_non_empty MAKE_TRACKS] } {
89+ log_cmd source $::env(MAKE_TRACKS)
90+ } elseif { [file exists $::env(PLATFORM_DIR) /make_tracks.tcl] } {
91+ log_cmd source $::env(PLATFORM_DIR) /make_tracks.tcl
9292} else {
93- make_tracks
93+ make_tracks
9494}
9595
9696source_env_var_if_exists FOOTPRINT_TCL
9797
98- if {![env_var_equal SKIP_REPAIR_TIE_FANOUT 1]} {
99- # This needs to come before any call to remove_buffers. You could have one
100- # tie driving multiple buffers that drive multiple outputs.
101- # Repair tie lo fanout
102- puts " Repair tie lo fanout..."
103- set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
104- set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name ] 0] library]]
105- set tielo_pin $tielo_lib_name /$tielo_cell_name /[lindex $::env(TIELO_CELL_AND_PORT) 1]
106- repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
107-
108- # Repair tie hi fanout
109- puts " Repair tie hi fanout..."
110- set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
111- set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name ] 0] library]]
112- set tiehi_pin $tiehi_lib_name /$tiehi_cell_name /[lindex $::env(TIEHI_CELL_AND_PORT) 1]
113- repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
98+ if { ![env_var_equal SKIP_REPAIR_TIE_FANOUT 1] } {
99+ # This needs to come before any call to remove_buffers. You could have one
100+ # tie driving multiple buffers that drive multiple outputs.
101+ # Repair tie lo fanout
102+ puts " Repair tie lo fanout..."
103+ set tielo_cell_name [lindex $::env(TIELO_CELL_AND_PORT) 0]
104+ set tielo_lib_name [get_name [get_property [lindex [get_lib_cell $tielo_cell_name ] 0] library]]
105+ set tielo_pin $tielo_lib_name /$tielo_cell_name /[lindex $::env(TIELO_CELL_AND_PORT) 1]
106+ repair_tie_fanout -separation $::env(TIE_SEPARATION) $tielo_pin
107+
108+ # Repair tie hi fanout
109+ puts " Repair tie hi fanout..."
110+ set tiehi_cell_name [lindex $::env(TIEHI_CELL_AND_PORT) 0]
111+ set tiehi_lib_name [get_name [get_property [lindex [get_lib_cell $tiehi_cell_name ] 0] library]]
112+ set tiehi_pin $tiehi_lib_name /$tiehi_cell_name /[lindex $::env(TIEHI_CELL_AND_PORT) 1]
113+ repair_tie_fanout -separation $::env(TIE_SEPARATION) $tiehi_pin
114114}
115115
116- if {[env_var_exists_and_non_empty SWAP_ARITH_OPERATORS]} {
117- estimate_parasitics -placement
118- replace_arith_modules
116+ if { [env_var_exists_and_non_empty SWAP_ARITH_OPERATORS] } {
117+ estimate_parasitics -placement
118+ replace_arith_modules
119119}
120120
121- if {[env_var_equals REMOVE_ABC_BUFFERS 1]} {
122- # remove buffers inserted by yosys/abc
123- remove_buffers
121+ if { [env_var_equals REMOVE_ABC_BUFFERS 1] } {
122+ # remove buffers inserted by yosys/abc
123+ remove_buffers
124124} else {
125- # Skip clone & split
126- set ::env(SETUP_MOVE_SEQUENCE) " unbuffer,sizeup,swap,buffer,vt_swap"
127- set ::env(SKIP_LAST_GASP) 1
128- repair_timing_helper -setup
125+ # Skip clone & split
126+ set ::env(SETUP_MOVE_SEQUENCE) " unbuffer,sizeup,swap,buffer,vt_swap"
127+ set ::env(SKIP_LAST_GASP) 1
128+ repair_timing_helper -setup
129129}
130130
131131puts " Default units for flow"
0 commit comments