From a899864e1308f209b7c595ecb702c5f277aab3a4 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Wed, 30 Oct 2024 21:33:43 +0100 Subject: [PATCH 1/6] ifp: Issue an error if -site is not specified and update documentaion. Signed-off-by: Christian Costa --- src/ifp/README.md | 9 ++++----- src/ifp/src/InitFloorplan.tcl | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ifp/README.md b/src/ifp/README.md index 39fd752c666..5922feb814b 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -52,30 +52,29 @@ die = ( 0, 0 ) ```tcl initialize_floorplan + -die_area {llx lly urx ury} | -utilization util [-additional_sites site_names] [-aspect_ratio ratio] [-core_area {llx lly urx ury}] [-core_space space | {bottom top left right}] - [-die_area {llx lly urx ury}] [-flip_sites site_names] [-row_parity NONE|EVEN|ODD] [-site site_name] - [-utilization util] ``` #### Options | Switch Name | Description | | ----- | ----- | +| `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | | `[-additional_sites]` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | | `[-aspect_ratio]` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `[-core_area]` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `[-core_area]` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). This is mandatory if `[-die_area]` is used and cannot be used otherwise. | | `[-core_space]` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | -| `[-die_area]` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | | `[-flip_sites]` | Flip the orientations of rows matching these sites. Sites listed under this option will create `FS`-oriented rows at even indices and `N`-oriented rows at odd ones, and vice versa for sites not listed under this option. (e.g. `{SITEXX, SITEYY}`) | | `[-row_parity]` | Snap to either an odd (`ODD`) or even (`EVEN`) number of rows. Defaults to `NONE` (no constraint on parity). | | `[-site]` | Site name. | -| `[-utilization]` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | ### Make Tracks diff --git a/src/ifp/src/InitFloorplan.tcl b/src/ifp/src/InitFloorplan.tcl index 67eed874423..523e7f5d2f9 100644 --- a/src/ifp/src/InitFloorplan.tcl +++ b/src/ifp/src/InitFloorplan.tcl @@ -55,7 +55,7 @@ proc initialize_floorplan { args } { if { [info exists keys(-site)] } { set site [ifp::find_site $keys(-site)] } else { - utl::warn IFP 11 "use -site to add placement rows." + utl::error IFP 11 "use -site to add placement rows." } set additional_sites {} From d1afcdf831eecbb3732d5997e20c19a26ad013d8 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 31 Oct 2024 13:56:53 +0100 Subject: [PATCH 2/6] ifp: Explicit flags that must be used with -die_area and -utilization. Signed-off-by: Christian Costa --- src/ifp/README.md | 11 ++++------- src/ifp/src/InitFloorplan.tcl | 15 +++++++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/ifp/README.md b/src/ifp/README.md index 5922feb814b..3dc35cfe09c 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -52,29 +52,26 @@ die = ( 0, 0 ) ```tcl initialize_floorplan - -die_area {llx lly urx ury} | -utilization util + (-die_area {llx lly urx ury} -core_area {llx lly urx ury}) | (-utilization util [-aspect_ratio ratio] [-core_space (space | {bottom top left right})]) + -site site_name [-additional_sites site_names] - [-aspect_ratio ratio] - [-core_area {llx lly urx ury}] - [-core_space space | {bottom top left right}] [-flip_sites site_names] [-row_parity NONE|EVEN|ODD] - [-site site_name] ``` #### Options | Switch Name | Description | | ----- | ----- | +| `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | | `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `-site` | Site name. | | `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | | `[-additional_sites]` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | | `[-aspect_ratio]` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `[-core_area]` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). This is mandatory if `[-die_area]` is used and cannot be used otherwise. | | `[-core_space]` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | | `[-flip_sites]` | Flip the orientations of rows matching these sites. Sites listed under this option will create `FS`-oriented rows at even indices and `N`-oriented rows at odd ones, and vice versa for sites not listed under this option. (e.g. `{SITEXX, SITEYY}`) | | `[-row_parity]` | Snap to either an odd (`ODD`) or even (`EVEN`) number of rows. Defaults to `NONE` (no constraint on parity). | -| `[-site]` | Site name. | ### Make Tracks diff --git a/src/ifp/src/InitFloorplan.tcl b/src/ifp/src/InitFloorplan.tcl index 523e7f5d2f9..0bc498206f4 100644 --- a/src/ifp/src/InitFloorplan.tcl +++ b/src/ifp/src/InitFloorplan.tcl @@ -83,6 +83,12 @@ proc initialize_floorplan { args } { sta::check_argc_eq0 "initialize_floorplan" $args if { [info exists keys(-utilization)] } { set util $keys(-utilization) + if { [info exists keys(-die_area)] } { + utl::error IFP 14 "-die_area cannot be used with -utilization." + } + if { [info exists keys(-core_area)] } { + utl::error IFP 20 "-core_area cannot be used with -utilization." + } if { [info exists keys(-core_space)] } { set core_sp $keys(-core_space) if { [llength $core_sp] == 1 } { @@ -122,6 +128,15 @@ proc initialize_floorplan { args } { $row_parity \ $flipped_sites } elseif { [info exists keys(-die_area)] } { + if { [info exists keys(-utilization)] } { + utl::error IFP 23 "-utilization cannot be used with -die_area." + } + if { [info exists keys(-core_space)] } { + utl::error IFP 24 "-core_space cannot be used with -die_area." + } + if { [info exists keys(-aspect_ratio)] } { + utl::error IFP 33 "-aspect_ratio cannot be used with -die_area." + } set die_area $keys(-die_area) if { [llength $die_area] != 4 } { utl::error IFP 15 "-die_area is a list of 4 coordinates." From b8982c4160af013420dd31fbbf506e624bacea0f Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Thu, 31 Oct 2024 14:08:18 +0100 Subject: [PATCH 3/6] ifp: Fix tcl formatting. Signed-off-by: Christian Costa --- src/ifp/src/InitFloorplan.tcl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ifp/src/InitFloorplan.tcl b/src/ifp/src/InitFloorplan.tcl index 0bc498206f4..a76041645c5 100644 --- a/src/ifp/src/InitFloorplan.tcl +++ b/src/ifp/src/InitFloorplan.tcl @@ -84,10 +84,10 @@ proc initialize_floorplan { args } { if { [info exists keys(-utilization)] } { set util $keys(-utilization) if { [info exists keys(-die_area)] } { - utl::error IFP 14 "-die_area cannot be used with -utilization." + utl::error IFP 14 "-die_area cannot be used with -utilization." } if { [info exists keys(-core_area)] } { - utl::error IFP 20 "-core_area cannot be used with -utilization." + utl::error IFP 20 "-core_area cannot be used with -utilization." } if { [info exists keys(-core_space)] } { set core_sp $keys(-core_space) @@ -129,13 +129,13 @@ proc initialize_floorplan { args } { $flipped_sites } elseif { [info exists keys(-die_area)] } { if { [info exists keys(-utilization)] } { - utl::error IFP 23 "-utilization cannot be used with -die_area." + utl::error IFP 23 "-utilization cannot be used with -die_area." } if { [info exists keys(-core_space)] } { - utl::error IFP 24 "-core_space cannot be used with -die_area." + utl::error IFP 24 "-core_space cannot be used with -die_area." } if { [info exists keys(-aspect_ratio)] } { - utl::error IFP 33 "-aspect_ratio cannot be used with -die_area." + utl::error IFP 33 "-aspect_ratio cannot be used with -die_area." } set die_area $keys(-die_area) if { [llength $die_area] != 4 } { From 88654329c7e0e3dec24946d2d7aeddbe07f2daff Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 4 Nov 2024 12:55:47 +0100 Subject: [PATCH 4/6] ifp: Make -core_space mandatory. Signed-off-by: Christian Costa --- src/grt/test/no_tracks.tcl | 2 +- src/ifp/src/InitFloorplan.tcl | 5 +---- src/ifp/test/multi_height1.tcl | 2 +- src/ifp/test/multi_height2.tcl | 2 +- src/pdn/test/power_switch_upf_daisy.tcl | 2 +- src/pdn/test/power_switch_upf_error.tcl | 2 +- src/pdn/test/power_switch_upf_regions.tcl | 2 +- src/pdn/test/power_switch_upf_star.tcl | 2 +- src/ppl/test/no_tracks.tcl | 2 +- src/rcx/test/names.tcl | 2 +- 10 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/grt/test/no_tracks.tcl b/src/grt/test/no_tracks.tcl index 828eee0d286..4d2fc1efd6e 100644 --- a/src/grt/test/no_tracks.tcl +++ b/src/grt/test/no_tracks.tcl @@ -5,7 +5,7 @@ read_lib Nangate45/Nangate45_typ.lib read_verilog ../../../test/gcd_nangate45.v link_design gcd -initialize_floorplan -site FreePDK45_38x28_10R_NP_162NW_34O -utilization 30 +initialize_floorplan -site FreePDK45_38x28_10R_NP_162NW_34O -utilization 30 -core_space 0.0 catch {set_routing_layers -signal metal2-metal10} error puts $error diff --git a/src/ifp/src/InitFloorplan.tcl b/src/ifp/src/InitFloorplan.tcl index a76041645c5..ce3398104ab 100644 --- a/src/ifp/src/InitFloorplan.tcl +++ b/src/ifp/src/InitFloorplan.tcl @@ -107,10 +107,7 @@ proc initialize_floorplan { args } { utl::error IFP 13 "-core_space is either a list of 4 margins or one value for all margins." } } else { - set core_sp_bottom 0.0 - set core_sp_top 0.0 - set core_sp_left 0.0 - set core_sp_right 0.0 + utl::error IFP 34 "no -core_space specified." } if { [info exists keys(-aspect_ratio)] } { set aspect_ratio $keys(-aspect_ratio) diff --git a/src/ifp/test/multi_height1.tcl b/src/ifp/test/multi_height1.tcl index 3413e27a827..84b1183c2e2 100644 --- a/src/ifp/test/multi_height1.tcl +++ b/src/ifp/test/multi_height1.tcl @@ -3,7 +3,7 @@ read_lef Nangate45/Nangate45.lef read_lef Nangate45/fake_macros.lef read_verilog multi_height1.v link_design top -initialize_floorplan -utilization 30 -aspect_ratio 0.5 \ +initialize_floorplan -utilization 30 -core_space 0.0 -aspect_ratio 0.5 \ -site FreePDK45_38x28_10R_NP_162NW_34O set def_file [make_result_file multi_height1.def] diff --git a/src/ifp/test/multi_height2.tcl b/src/ifp/test/multi_height2.tcl index 1f7e7ddc023..a2cc90e7706 100644 --- a/src/ifp/test/multi_height2.tcl +++ b/src/ifp/test/multi_height2.tcl @@ -3,7 +3,7 @@ read_lef Nangate45/Nangate45.lef read_lef Nangate45/fake_macros.lef read_verilog multi_height2.v link_design top -initialize_floorplan -utilization 15 -aspect_ratio 0.5 -site "FreePDK45_38x28_10R_NP_162NW_34O" -additional_sites "DoubleHeightSite" +initialize_floorplan -utilization 15 -core_space 0.0 -aspect_ratio 0.5 -site "FreePDK45_38x28_10R_NP_162NW_34O" -additional_sites "DoubleHeightSite" set def_file [make_result_file multi_height2.def] write_def $def_file diff --git a/src/pdn/test/power_switch_upf_daisy.tcl b/src/pdn/test/power_switch_upf_daisy.tcl index 513024c0d4d..f54c121435a 100644 --- a/src/pdn/test/power_switch_upf_daisy.tcl +++ b/src/pdn/test/power_switch_upf_daisy.tcl @@ -27,7 +27,7 @@ map_power_switch PS_1 \ -lib_cells POWER_SWITCH \ -port_map {{vout VPWR} {vin VDDG} {sleep SLEEP} {acknowledge SLEEP_OUT} {ground VGND}} -initialize_floorplan -utilization 10 -site unithd -additional_site unithddbl +initialize_floorplan -utilization 10 -core_space 0.0 -site unithd -additional_site unithddbl tapcell \ -distance 14 \ -tapcell_master "sky130_fd_sc_hd__tapvpwrvgnd_1" diff --git a/src/pdn/test/power_switch_upf_error.tcl b/src/pdn/test/power_switch_upf_error.tcl index ccb7a142429..ea645247b04 100644 --- a/src/pdn/test/power_switch_upf_error.tcl +++ b/src/pdn/test/power_switch_upf_error.tcl @@ -13,7 +13,7 @@ link_design gcd create_power_domain PD_TOP \ -elements {.} -initialize_floorplan -utilization 10 -site unithd -additional_site unithddbl +initialize_floorplan -utilization 10 -core_space 0.0 -site unithd -additional_site unithddbl tapcell \ -distance 14 \ -tapcell_master "sky130_fd_sc_hd__tapvpwrvgnd_1" diff --git a/src/pdn/test/power_switch_upf_regions.tcl b/src/pdn/test/power_switch_upf_regions.tcl index 24101d6441e..00565fe49e1 100644 --- a/src/pdn/test/power_switch_upf_regions.tcl +++ b/src/pdn/test/power_switch_upf_regions.tcl @@ -44,7 +44,7 @@ map_power_switch PS_1 \ -lib_cells POWER_SWITCH \ -port_map {{vout VPWR} {vin VDDG} {sleep SLEEP} {acknowledge SLEEP_OUT} {ground VGND}} -initialize_floorplan -utilization 10 -site unithd -additional_site unithddbl +initialize_floorplan -utilization 10 -core_space 0.0 -site unithd -additional_site unithddbl tapcell \ -distance 14 \ -tapcell_master "sky130_fd_sc_hd__tapvpwrvgnd_1" diff --git a/src/pdn/test/power_switch_upf_star.tcl b/src/pdn/test/power_switch_upf_star.tcl index 46c727f15b5..2f78d969562 100644 --- a/src/pdn/test/power_switch_upf_star.tcl +++ b/src/pdn/test/power_switch_upf_star.tcl @@ -27,7 +27,7 @@ map_power_switch PS_1 \ -lib_cells POWER_SWITCH \ -port_map {{vout VPWR} {vin VDDG} {sleep SLEEP} {acknowledge SLEEP_OUT} {ground VGND}} -initialize_floorplan -utilization 10 -site unithd -additional_site unithddbl +initialize_floorplan -utilization 10 -core_space 0.0 -site unithd -additional_site unithddbl tapcell \ -distance 14 \ -tapcell_master "sky130_fd_sc_hd__tapvpwrvgnd_1" diff --git a/src/ppl/test/no_tracks.tcl b/src/ppl/test/no_tracks.tcl index 19f851ce5bc..a78d4e31e2b 100644 --- a/src/ppl/test/no_tracks.tcl +++ b/src/ppl/test/no_tracks.tcl @@ -6,7 +6,7 @@ read_verilog ../../../test/gcd_nangate45.v link_design gcd initialize_floorplan -site FreePDK45_38x28_10R_NP_162NW_34O \ - -utilization 30 + -utilization 30 -core_space 0.0 catch {place_pins -random -hor_layers metal3 -ver_layers metal2} error puts $error diff --git a/src/rcx/test/names.tcl b/src/rcx/test/names.tcl index 2fae4faa064..dc1ab7cdf6d 100644 --- a/src/rcx/test/names.tcl +++ b/src/rcx/test/names.tcl @@ -11,7 +11,7 @@ read_liberty $liberty_file read_verilog names.v link_design top -initialize_floorplan -site $site -utilization 10 +initialize_floorplan -site $site -utilization 10 -core_space 0.0 source $tracks_file From 0ee3442bcdfdbdfa970bdc6e8344b2ca7f08c1b3 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 4 Nov 2024 13:06:49 +0100 Subject: [PATCH 5/6] ifp: Update -core_space in doc. Signed-off-by: Christian Costa --- src/ifp/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifp/README.md b/src/ifp/README.md index 3dc35cfe09c..298d5e9c1d2 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -52,7 +52,7 @@ die = ( 0, 0 ) ```tcl initialize_floorplan - (-die_area {llx lly urx ury} -core_area {llx lly urx ury}) | (-utilization util [-aspect_ratio ratio] [-core_space (space | {bottom top left right})]) + (-die_area {llx lly urx ury} -core_area {llx lly urx ury}) | (-utilization util -core_space (space | {bottom top left right}) [-aspect_ratio ratio]) -site site_name [-additional_sites site_names] [-flip_sites site_names] @@ -64,12 +64,12 @@ initialize_floorplan | Switch Name | Description | | ----- | ----- | | `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | +| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | | `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | | `-site` | Site name. | | `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. | | `[-additional_sites]` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) | | `[-aspect_ratio]` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. | -| `[-core_space]` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | | `[-flip_sites]` | Flip the orientations of rows matching these sites. Sites listed under this option will create `FS`-oriented rows at even indices and `N`-oriented rows at odd ones, and vice versa for sites not listed under this option. (e.g. `{SITEXX, SITEYY}`) | | `[-row_parity]` | Snap to either an odd (`ODD`) or even (`EVEN`) number of rows. Defaults to `NONE` (no constraint on parity). | From 9f1bf21004cb888a69e1ef9976b0e8b01d26ff5c Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 4 Nov 2024 16:13:43 +0100 Subject: [PATCH 6/6] ifp: Remove default value in doc as -core_space is mandatory now. Signed-off-by: Christian Costa --- src/ifp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifp/README.md b/src/ifp/README.md index 298d5e9c1d2..4dcf6b3a982 100644 --- a/src/ifp/README.md +++ b/src/ifp/README.md @@ -64,7 +64,7 @@ initialize_floorplan | Switch Name | Description | | ----- | ----- | | `-core_area` | Core area coordinates in microns (lower left x/y and upper right x/y coordinates). | -| `-core_space` | Space around the core, default `0.0` microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | +| `-core_space` | Space around the core in microns. Allowed values are either one value for all margins or a set of four values, one for each margin. The order of the four values are: `{bottom top left right}`. | | `-die_area` | Die area coordinates in microns (lower left x/y and upper right x/y coordinates). | | `-site` | Site name. | | `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. |