File size: 2,912 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
# Macro Placement

The macro placement module in OpenROAD (`mpl`) is based on 
TritonMacroPlacer, an open-source ParquetFP-based macro cell placer.
The macro placer places macros/blocks honoring halos, channels
and cell row "snapping".
Run `global_placement` before macro placement.

Approximately $\Bigl\lceil [{\frac{numMacros}{3}}]^{1.5} \Bigr\rceil$ quadrisections
of the initial placed mixed-size layout are explored and packed using
ParquetFP-based annealing. The best resulting floorplan according to a
heuristic evaluation function is kept.

## Commands

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

### Macro Placement

This command performs macro placement.
For placement style, `corner_max_wl` means that choosing the partitions that maximise the wirelength 
of connections between the macros to force them to the corners. Vice versa for `corner_min_wl`.

Macros will be placed with $max(halo * 2, channel)$ spacing between macros, and between
macros and the fence/die boundary. If no solutions are found, try reducing the
channel/halo.

```tcl
macro_placement 
    [-halo {halo_x halo_y}]
    [-channel {channel_x channel_y}]
    [-fence_region {lx ly ux uy}]
    [-snap_layer snap_layer_number]
    [-style corner_wax_wl|corner_min_wl]
```

#### Options

| Switch Name | Description |
| ----- | ----- |
| `-halo` | Horizontal and vertical halo around macros (microns). |
| `-channel` | Horizontal and vertical channel width between macros (microns). |
| `-fence_region` | Restrict macro placements to a region (microns). Defaults to the core area. |
| `-snap_layer` | Snap macro origins to this routing layer track. |
| `-style` | Placement style, to choose either `corner_max_wl` or `corner_min_wl`. The default value is `corner_max_wl`. |


## Useful Developer Commands

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

| Command Name | Description |
| ----- | ----- |
| `macro_placement_debug` | Macro placement debugging. Note that GUI must be present for this command, otherwise a segfault will occur. | 

## Example scripts

Example scripts demonstrating how to run TritonMacroPlace on a sample design of `east_west` as follows:

```
./test/east_west.tcl
./test/east_west1.tcl
./test/east_west2.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+mpl) about this tool.

## License

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