Skip to content

Commit 6723f5d

Browse files
authored
Merge pull request The-OpenROAD-Project#3499 from kcaisley/master
Document floorplanning methods and flow variables
2 parents e79a174 + a6e6f61 commit 6723f5d

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

docs/user/FlowVariables.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ configuration file.
134134
| <a name="FASTROUTE_TCL"></a>FASTROUTE_TCL| Specifies a Tcl script with commands to run before FastRoute.| |
135135
| <a name="FILL_CELLS"></a>FILL_CELLS| Fill cells are used to fill empty sites. If not set or empty, fill cell insertion is skipped.| |
136136
| <a name="FILL_CONFIG"></a>FILL_CONFIG| JSON rule file for metal fill during chip finishing.| |
137-
| <a name="FLOORPLAN_DEF"></a>FLOORPLAN_DEF| Use the DEF file to initialize floorplan.| |
137+
| <a name="FLOORPLAN_DEF"></a>FLOORPLAN_DEF| Use the DEF file to initialize floorplan. Mutually exclusive with FOOTPRINT or DIE_AREA/CORE_AREA or CORE_UTILIZATION.| |
138138
| <a name="FLOW_VARIANT"></a>FLOW_VARIANT| Flow variant to use, used in the flow variant directory name.| base|
139+
| <a name="FOOTPRINT"></a>FOOTPRINT| Custom footprint definition file for ICeWall-based floorplan initialization. Mutually exclusive with FLOORPLAN_DEF or DIE_AREA/CORE_AREA or CORE_UTILIZATION.| |
140+
| <a name="FOOTPRINT_TCL"></a>FOOTPRINT_TCL| Specifies a Tcl script with custom footprint-related commands for floorplan setup.| |
139141
| <a name="GDS_ALLOW_EMPTY"></a>GDS_ALLOW_EMPTY| Regular expression of module names of macros that have no .gds file| |
140142
| <a name="GDS_FILES"></a>GDS_FILES| Path to platform GDS files.| |
141143
| <a name="GENERATE_ARTIFACTS_ON_FAILURE"></a>GENERATE_ARTIFACTS_ON_FAILURE| For instance Bazel needs artifacts (.odb and .rpt files) on a failure to allow the user to save hours on re-running the failed step locally, but when working with a Makefile flow, it is more natural to fail the step and leave the user to manually inspect the logs and artifacts directly via the file system. Set to 1 to change the behavior to generate artifacts upon failure to e.g. do a global route. The exit code will still be non-zero on all other failures that aren't covered by the "useful to inspect the artifacts on failure" use-case. Example: just like detailed routing, a global route that fails with congestion, is not a build failure(as in exit code non-zero), it is a successful(as in zero exit code) global route that produce reports detailing the problem. Detailed route will not proceed, if there is global routing congestion This allows build systems, such as bazel, to create artifacts for global and detailed route, even if the operation had problems, without having know about the semantics between global and detailed route. Considering that global and detailed route can run for a long time and use a lot of memory, this allows inspecting results on a laptop for a build that ran on a server.| 0|
@@ -293,6 +295,8 @@ configuration file.
293295
- [CORE_UTILIZATION](#CORE_UTILIZATION)
294296
- [DIE_AREA](#DIE_AREA)
295297
- [FLOORPLAN_DEF](#FLOORPLAN_DEF)
298+
- [FOOTPRINT](#FOOTPRINT)
299+
- [FOOTPRINT_TCL](#FOOTPRINT_TCL)
296300
- [HOLD_SLACK_MARGIN](#HOLD_SLACK_MARGIN)
297301
- [IO_CONSTRAINTS](#IO_CONSTRAINTS)
298302
- [MACRO_BLOCKAGE_HALO](#MACRO_BLOCKAGE_HALO)

flow/scripts/floorplan.tcl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,26 @@ puts "number instances in verilog is $num_instances"
4343
set additional_args ""
4444
append_env_var additional_args ADDITIONAL_SITES -additional_sites 1
4545

46+
# Check which floorplan initialization method is specified (mutually exclusive)
4647
set use_floorplan_def [env_var_exists_and_non_empty FLOORPLAN_DEF]
4748
set use_footprint [env_var_exists_and_non_empty FOOTPRINT]
4849
set use_die_and_core_area \
4950
[expr { [env_var_exists_and_non_empty DIE_AREA] && [env_var_exists_and_non_empty CORE_AREA] }]
5051
set use_core_utilization [env_var_exists_and_non_empty CORE_UTILIZATION]
5152

53+
# Enforce mutual exclusion - exactly one method must be specified
5254
set methods_defined \
5355
[expr { $use_floorplan_def + $use_footprint + $use_die_and_core_area + $use_core_utilization }]
5456
if { $methods_defined > 1 } {
5557
puts "Error: Floorplan initialization methods are mutually exclusive, pick one."
5658
exit 1
5759
}
5860

61+
# Method 1: Use existing DEF file with floorplan data
5962
if { $use_floorplan_def } {
60-
# Initialize floorplan by reading in floorplan DEF
6163
log_cmd read_def -floorplan_initialize $env(FLOORPLAN_DEF)
64+
# Method 2: Use ICeWall footprint file (platform-specific extension)
6265
} elseif { $use_footprint } {
63-
# Initialize floorplan using ICeWall FOOTPRINT
6466
ICeWall load_footprint $env(FOOTPRINT)
6567

6668
initialize_floorplan \
@@ -69,11 +71,13 @@ if { $use_floorplan_def } {
6971
-site $::env(PLACE_SITE)
7072

7173
ICeWall init_footprint $env(SIG_MAP_FILE)
74+
# Method 3: Use explicit die and core area coordinates
7275
} elseif { $use_die_and_core_area } {
7376
initialize_floorplan -die_area $::env(DIE_AREA) \
7477
-core_area $::env(CORE_AREA) \
7578
-site $::env(PLACE_SITE) \
7679
{*}$additional_args
80+
# Method 4: Calculate core area from utilization, aspect ratio, and margins
7781
} elseif { $use_core_utilization } {
7882
initialize_floorplan -utilization $::env(CORE_UTILIZATION) \
7983
-aspect_ratio $::env(CORE_ASPECT_RATIO) \
@@ -85,6 +89,7 @@ if { $use_floorplan_def } {
8589
exit 1
8690
}
8791

92+
# Create routing tracks: MAKE_TRACKS script, platform make_tracks.tcl, or make_tracks command
8893
if { [env_var_exists_and_non_empty MAKE_TRACKS] } {
8994
log_cmd source $::env(MAKE_TRACKS)
9095
} elseif { [file exists $::env(PLATFORM_DIR)/make_tracks.tcl] } {
@@ -93,6 +98,8 @@ if { [env_var_exists_and_non_empty MAKE_TRACKS] } {
9398
make_tracks
9499
}
95100

101+
# Configure global routing: FASTROUTE_TCL script or
102+
# set_global_routing_layer_adjustment/set_routing_layers
96103
if { [env_var_exists_and_non_empty FASTROUTE_TCL] } {
97104
log_cmd source $::env(FASTROUTE_TCL)
98105
} else {

flow/scripts/variables.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ SWAP_ARITH_OPERATORS:
305305
- All stages
306306
FLOORPLAN_DEF:
307307
description: |
308-
Use the DEF file to initialize floorplan.
308+
Use the DEF file to initialize floorplan. Mutually exclusive with FOOTPRINT or DIE_AREA/CORE_AREA or CORE_UTILIZATION.
309309
stages:
310310
- floorplan
311311
- place
@@ -1019,6 +1019,16 @@ YOSYS_FLAGS:
10191019
stages:
10201020
- synth
10211021
default: -v 3
1022+
FOOTPRINT:
1023+
description: |
1024+
Custom footprint definition file for ICeWall-based floorplan initialization. Mutually exclusive with FLOORPLAN_DEF or DIE_AREA/CORE_AREA or CORE_UTILIZATION.
1025+
stages:
1026+
- floorplan
1027+
FOOTPRINT_TCL:
1028+
description: |
1029+
Specifies a Tcl script with custom footprint-related commands for floorplan setup.
1030+
stages:
1031+
- floorplan
10221032
FLOW_VARIANT:
10231033
description: >
10241034
Flow variant to use, used in the flow variant directory name.

0 commit comments

Comments
 (0)