File size: 5,112 Bytes
d59bb1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Initialize Floorplan

This tool initializes floorplan constraints, die/core area, and makes tracks. 

## Commands

```{note}
- Parameters in square brackets `[-param param]` are optional.
- Parameters without square brackets `-param2 param2` are required.
```

### Initialize Floorplan

Do note that there are two ways of setting the floorplan dimensions.
The user can either specify manually die/core area, or
specify the utilization/aspect ratio. If you set both, 
unexpected behaviour might occur.

- Method 1: Automatic die size calculation
Example: `initialize_floorplan -utilization 70 -aspect_ratio 1.0 -core_space 0.0 -sites FreePDK45_38x28_10R_NP_162NW_34O`

- Method 2: Set die/core area
Example: `initialize_floorplan -die_area 0 0 2000 2000 -core_area 100 100 1900 1900` -sites FreePDK45_38x28_10R_NP_162NW_34O`

The die area and core area used to write ROWs can be specified explicitly
with the `-die_area` and `-core_area` arguments. Alternatively, the die and
core areas can be computed from the design size and utilization as shown below:

The -site argument determines the basic single-height rows to make.
For a hybrid row design the site should have a row pattern.  Any sites
referenced by an instance in the netlist will also have rows
constructed for them.

Additional sites are specified if you wish to have rows for a site
that is not used in the nelist but may be needed later.  For example,
you might not have any double height cells in the incoming netlist but
you expect some to be generated by flop clustering later in the flow.

Example computation:

```
core_area = design_area / (utilization / 100)
core_width = sqrt(core_area / aspect_ratio)
core_height = core_width * aspect_ratio
core = ( core_space_left, core_space_bottom )
      ( core_space_left + core_width, core_space_bottom + core_height )
die =  ( 0, 0 )
      ( core_width + core_space_left + core_space_right,
        core_height + core_space_bottom + core_space_top )
```


```tcl
initialize_floorplan
  [-utilization util]
  [-aspect_ratio ratio]
  [-core_space space | {bottom top left right}]
  [-die_area {llx lly urx ury}]
  [-core_area {llx lly urx ury}]
  [-additional_sites site_names]
  [-site site_name]
```

#### Options

| Switch Name | Description |
| ----- | ----- |
| `-utilization` | Percentage utilization. Allowed values are `double` in the range `(0-100]`. |
| `-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}`. |
| `-additional_sites` | Tcl list of sites to make rows for (e.g. `{SITEXX, SITEYY}`) |
| `-site` | Site name. |
| `-die_area` | Die 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). |

### Make Tracks

The `initialize_floorplan` command removes existing tracks. 
Use the `make_tracks` command to add routing tracks to a floorplan.

```tcl
make_tracks 
    [layer]
    [-x_pitch x_pitch]
    [-y_pitch y_pitch]
    [-x_offset x_offset]
    [-y_offset y_offset]
```

#### Options

| Switch Name | Description |
| ----- | ----- |
| `layer` | Select layer name to make tracks for. Defaults to all layers. |
| `-x_pitch`, `-y_pitch` | If set, overrides the LEF technology x-/y- pitch. Use the same unit as in the LEF file. |
| `-x_offset`, `-y_offset` | If set, overrides the LEF technology x-/y- offset. Use the same unit as in the LEFT file. |

### Insert tieoff cells

This comamnd inserts tiecells.

```tcl
insert_tiecells 
    tie_pin
    [-prefix inst_prefix]
```

#### Options

| Switch Name | Description |
| ----- | ----- |
| `tie_pin` | Indicates the master and port to use to tie off nets. For example, `LOGIC0_X1/Z` for the Nangate45 library, where `LOGIC0_X1` is the master and `Z` is the output port on the master. |
| `-prefix` | Used to control the prefix of the new tiecell names. This will default to `TIEOFF_`. |

## Useful Developer Commands

If you are a developer, you might find these useful. More details can be found in the [source file](./src/InitFloorplan.cc) or the [swig file](./src/InitFloorPlan.i).

| Command Name | Description |
| ----- | ----- |
| `microns_to_mfg_grid` | Convert microns to manufacturing grid DBU. |

## Example scripts

Example scripts on running `ifp` for a sample design of `mpd_top` are as follows:

```
./test/upf_test.tcl
```

## Regression tests

There are a set of regression tests in `./test`. For more information, refer to this [section](../../README.md#regression-tests).

Simply run the following script:

```shell
./test/regression
```

## Limitations

## FAQs

Check out
[GitHub discussion](https://github.com/The-OpenROAD-Project/OpenROAD/discussions/categories/q-a?discussions_q=category%3AQ%26A+ifp+in%3Atitle)
about this tool.

## License

BSD 3-Clause License. See [LICENSE](LICENSE) file.