Skip to content

Commit 8cdcda3

Browse files
committed
ifp: Add tests and doc for -gap option.
Signed-off-by: Christian COSTA <[email protected]>
1 parent 6be0801 commit 8cdcda3

File tree

8 files changed

+289
-0
lines changed

8 files changed

+289
-0
lines changed

src/ifp/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ initialize_floorplan
5656
-site site_name
5757
[-additional_sites site_names]
5858
[-flip_sites site_names]
59+
[-gap space]
5960
[-row_parity NONE|EVEN|ODD]
6061
```
6162

@@ -71,6 +72,7 @@ initialize_floorplan
7172
| `[-additional_sites]` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) |
7273
| `[-aspect_ratio]` | Ratio $\frac{height}{width}$. The default value is `1.0` and the allowed values are floats `[0, 1.0]`. |
7374
| `[-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}`) |
75+
| `[-gap]` | Space between power domains in microns. The default value is 6 times the minimum site height. |
7476
| `[-row_parity]` | Snap to either an odd (`ODD`) or even (`EVEN`) number of rows. Defaults to `NONE` (no constraint on parity). |
7577

7678
### Make Tracks
@@ -107,6 +109,7 @@ make_rows
107109
-site site_name
108110
[-additional_sites site_names]
109111
[-flip_sites site_names]
112+
[-gap space]
110113
[-row_parity NONE|EVEN|ODD]
111114
```
112115

@@ -120,6 +123,7 @@ make_rows
120123
| `-site` | Site name. |
121124
| `[-additional_sites]` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) |
122125
| `[-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}`) |
126+
| `[-gap]` | Space between power domains in microns. The default value is 6 times the minimum site height. |
123127
| `[-row_parity]` | Snap to either an odd (`ODD`) or even (`EVEN`) number of rows. Defaults to `NONE` (no constraint on parity). |
124128

125129
### Insert tieoff cells

src/ifp/test/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ COMPULSORY_TESTS = [
2121
"init_floorplan_dbl_row",
2222
"init_floorplan_even_rows",
2323
"init_floorplan_flip_sites",
24+
"init_floorplan_gap",
2425
"init_floorplan_odd_rows",
2526
"init_floorplan_polygon",
2627
"init_floorplan_polygon2",

src/ifp/test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ or_integration_tests(
1616
init_floorplan_dbl_row
1717
init_floorplan_even_rows
1818
init_floorplan_flip_sites
19+
init_floorplan_gap
1920
init_floorplan_odd_rows
2021
init_floorplan_polygon
2122
init_floorplan_polygon2

src/ifp/test/init_floorplan_gap.defok

Lines changed: 215 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
VERSION 5.6 ;
2+
BUSBITCHARS "[]" ;
3+
DIVIDERCHAR "/" ;
4+
5+
UNITS
6+
DATABASE MICRONS 2000 ;
7+
END UNITS
8+
9+
MANUFACTURINGGRID 0.0050 ;
10+
11+
SITE FreePDK45_38x28_10R_NP_162NW_34O_DoubleHeight
12+
SYMMETRY y ;
13+
CLASS core ;
14+
SIZE 0.19 BY 2.8 ;
15+
END FreePDK45_38x28_10R_NP_162NW_34O_DoubleHeight

src/ifp/test/init_floorplan_gap.ok

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[INFO ODB-0227] LEF file: Nangate45/Nangate45.lef, created 22 layers, 27 vias, 135 library cells
2+
[INFO ODB-0227] LEF file: init_floorplan_gap.lef
3+
[INFO IFP-0001] Added 71 rows of 526 site FreePDK45_38x28_10R_NP_162NW_34O.
4+
[INFO IFP-0001] Added 35 rows of 526 site FreePDK45_38x28_10R_NP_162NW_34O_DoubleHeight.
5+
No differences found.

src/ifp/test/init_floorplan_gap.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
from openroad import Tech, Design
2+
import odb
3+
import helpers
4+
import ifp_helpers as ifph
5+
6+
tech = Tech()
7+
tech.readLef("Nangate45/Nangate45.lef")
8+
tech.readLef("init_floorplan_gap.lef")
9+
tech.readLiberty("Nangate45/Nangate45_typ.lib")
10+
11+
design = Design(tech)
12+
design.readVerilog("reg1.v")
13+
design.link("top")
14+
15+
die = helpers.make_rect(design, 0, 0, 100, 100)
16+
core = helpers.make_rect(design, 0, 0, 100, 100)
17+
18+
l = design.micronToDBU(34)
19+
u = design.micronToDBU(66)
20+
21+
ifph.create_voltage_domain(design, "TEMP_ANALOG", (l, l, u, u))
22+
23+
floorplan = design.getFloorplan()
24+
site = floorplan.findSite("FreePDK45_38x28_10R_NP_162NW_34O")
25+
additional_site = floorplan.findSite("FreePDK45_38x28_10R_NP_162NW_34O_DoubleHeight")
26+
floorplan.initFloorplan(
27+
die, core, site, [additional_site], "NONE", [], design.micronToDBU(2)
28+
)
29+
def_file = helpers.make_result_file("init_floorplan_gap.def")
30+
design.writeDef(def_file)
31+
helpers.diff_files("init_floorplan_gap.defok", def_file)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# init_floorplan called after a voltage domain is specified
2+
source "helpers.tcl"
3+
read_lef Nangate45/Nangate45.lef
4+
read_lef init_floorplan_gap.lef
5+
read_liberty Nangate45/Nangate45_typ.lib
6+
read_verilog reg1.v
7+
link_design top
8+
create_voltage_domain TEMP_ANALOG -area {34 34 66 66}
9+
initialize_floorplan -die_area {0 0 100 100} \
10+
-core_area {0 0 100 100} \
11+
-site FreePDK45_38x28_10R_NP_162NW_34O \
12+
-additional_sites FreePDK45_38x28_10R_NP_162NW_34O_DoubleHeight \
13+
-gap 2
14+
15+
set def_file [make_result_file init_floorplan_gap.def]
16+
write_def $def_file
17+
diff_files init_floorplan_gap.defok $def_file

0 commit comments

Comments
 (0)