Skip to content

Commit 4daf733

Browse files
authored
Merge pull request The-OpenROAD-Project#3472 from AcKoucher/preplaced-macros
allow macro preplacement and make ngt45/bp our first test case with partial mpl
2 parents 4ee6469 + 131af8c commit 4daf733

File tree

5 files changed

+77
-30
lines changed

5 files changed

+77
-30
lines changed

docs/user/FlowVariables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ configuration file.
155155
| <a name="LIB_FILES"></a>LIB_FILES| A Liberty file of the standard cell library with PVT characterization, input and output characteristics, timing and power definitions for each cell.| |
156156
| <a name="MACRO_BLOCKAGE_HALO"></a>MACRO_BLOCKAGE_HALO| Distance beyond the edges of a macro that will also be covered by the blockage generated for that macro. Note that the default macro blockage halo comes from the largest of the specified MACRO_PLACE_HALO x or y values. This variable overrides that calculation.| |
157157
| <a name="MACRO_EXTENSION"></a>MACRO_EXTENSION| Sets the number of GCells added to the blockages boundaries from macros.| |
158-
| <a name="MACRO_PLACEMENT_TCL"></a>MACRO_PLACEMENT_TCL| Specifies the path of a TCL file on how to place certain macros manually.| |
158+
| <a name="MACRO_PLACEMENT_TCL"></a>MACRO_PLACEMENT_TCL| Specifies the path of a TCL file on how to place macros manually. The user may choose to place just some of the macros in the design. The macro placer will handle the remaining unplaced macros.| |
159159
| <a name="MACRO_PLACE_HALO"></a>MACRO_PLACE_HALO| Horizontal/vertical halo around macros (microns). Used by automatic macro placement.| |
160160
| <a name="MACRO_ROWS_HALO_X"></a>MACRO_ROWS_HALO_X| Horizontal distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design.| |
161161
| <a name="MACRO_ROWS_HALO_Y"></a>MACRO_ROWS_HALO_Y| Vertical distance between the edge of the macro and the beginning of the rows created by tapcell. Only available for ASAP7 PDK and GF180/uart-blocks design.| |

flow/designs/nangate45/black_parrot/config.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export IO_CONSTRAINTS = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/io.tcl
3131

3232
export PLACE_DENSITY_LB_ADDON = 0.05
3333

34+
export MACRO_PLACEMENT_TCL = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NAME)/macro_placement.tcl
35+
3436
export MACRO_PLACE_HALO = 10 10
3537

3638
export TNS_END_PERCENT = 100
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
place_macro \
2+
-macro_name multi_top.me.genblk1_0__bp_cce_top.bp_cce/directory.wg_ram/macro_mem0.mem \
3+
-location {20.07 355.915} -orientation MY
4+
5+
place_macro \
6+
-macro_name multi_top.me.genblk1_0__bp_cce_top.bp_cce/directory.wg_ram/macro_mem1.mem \
7+
-location {94.6 355.915} -orientation MY
8+
9+
place_macro \
10+
-macro_name multi_top.rof1_0__core/fe.icache_1/metadata_mem.macro_mem.mem \
11+
-location {20.07 245.105} -orientation R180
12+
13+
place_macro \
14+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_0__data_mem.macro_mem/mem \
15+
-location {1177.31 1166.095} -orientation R0
16+
17+
place_macro \
18+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_1__data_mem.macro_mem/mem \
19+
-location {659.6 1166.095} -orientation MY
20+
21+
place_macro \
22+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_2__data_mem.macro_mem/mem \
23+
-location {1177.31 1032.605} -orientation MX
24+
25+
place_macro \
26+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_3__data_mem.macro_mem/mem \
27+
-location {832.17 1166.095} -orientation R0
28+
29+
place_macro \
30+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_4__data_mem.macro_mem/mem \
31+
-location {1004.74 1032.605} -orientation MX
32+
33+
place_macro \
34+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_5__data_mem.macro_mem/mem \
35+
-location {832.17 1032.605} -orientation MX
36+
37+
place_macro \
38+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_6__data_mem.macro_mem/mem \
39+
-location {1004.74 1166.095} -orientation R0
40+
41+
place_macro \
42+
-macro_name multi_top.rof1_0__core/be.be_mmu.dcache/data_mem_7__data_mem.macro_mem/mem \
43+
-location {659.6 1032.605} -orientation R180

flow/scripts/macro_place_util.tcl

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,40 @@ if { [find_macros] != "" } {
3636

3737
if { [env_var_exists_and_non_empty MACRO_PLACEMENT_TCL] } {
3838
log_cmd source $::env(MACRO_PLACEMENT_TCL)
39-
} else {
40-
set additional_rtlmp_args ""
41-
append_env_var additional_rtlmp_args RTLMP_MAX_LEVEL -max_num_level 1
42-
append_env_var additional_rtlmp_args RTLMP_MAX_INST -max_num_inst 1
43-
append_env_var additional_rtlmp_args RTLMP_MIN_INST -min_num_inst 1
44-
append_env_var additional_rtlmp_args RTLMP_MAX_MACRO -max_num_macro 1
45-
append_env_var additional_rtlmp_args RTLMP_MIN_MACRO -min_num_macro 1
46-
append additional_rtlmp_args " -halo_width $halo_x"
47-
append additional_rtlmp_args " -halo_height $halo_y"
48-
append_env_var additional_rtlmp_args RTLMP_MIN_AR -min_ar 1
49-
append_env_var additional_rtlmp_args RTLMP_SIGNATURE_NET_THRESHOLD -signature_net_threshold 1
50-
append_env_var additional_rtlmp_args RTLMP_AREA_WT -area_weight 1
51-
append_env_var additional_rtlmp_args RTLMP_WIRELENGTH_WT -wirelength_weight 1
52-
append_env_var additional_rtlmp_args RTLMP_OUTLINE_WT -outline_weight 1
53-
append_env_var additional_rtlmp_args RTLMP_BOUNDARY_WT -boundary_weight 1
54-
append_env_var additional_rtlmp_args RTLMP_NOTCH_WT -notch_weight 1
55-
append_env_var additional_rtlmp_args RTLMP_DEAD_SPACE -target_dead_space 1
56-
append_env_var additional_rtlmp_args RTLMP_RPT_DIR -report_directory 1
57-
append_env_var additional_rtlmp_args RTLMP_FENCE_LX -fence_lx 1
58-
append_env_var additional_rtlmp_args RTLMP_FENCE_LY -fence_ly 1
59-
append_env_var additional_rtlmp_args RTLMP_FENCE_UX -fence_ux 1
60-
append_env_var additional_rtlmp_args RTLMP_FENCE_UY -fence_uy 1
39+
}
6140

62-
append additional_rtlmp_args " -target_util [place_density_with_lb_addon]"
41+
set additional_rtlmp_args ""
42+
append_env_var additional_rtlmp_args RTLMP_MAX_LEVEL -max_num_level 1
43+
append_env_var additional_rtlmp_args RTLMP_MAX_INST -max_num_inst 1
44+
append_env_var additional_rtlmp_args RTLMP_MIN_INST -min_num_inst 1
45+
append_env_var additional_rtlmp_args RTLMP_MAX_MACRO -max_num_macro 1
46+
append_env_var additional_rtlmp_args RTLMP_MIN_MACRO -min_num_macro 1
47+
append additional_rtlmp_args " -halo_width $halo_x"
48+
append additional_rtlmp_args " -halo_height $halo_y"
49+
append_env_var additional_rtlmp_args RTLMP_MIN_AR -min_ar 1
50+
append_env_var additional_rtlmp_args RTLMP_SIGNATURE_NET_THRESHOLD -signature_net_threshold 1
51+
append_env_var additional_rtlmp_args RTLMP_AREA_WT -area_weight 1
52+
append_env_var additional_rtlmp_args RTLMP_WIRELENGTH_WT -wirelength_weight 1
53+
append_env_var additional_rtlmp_args RTLMP_OUTLINE_WT -outline_weight 1
54+
append_env_var additional_rtlmp_args RTLMP_BOUNDARY_WT -boundary_weight 1
55+
append_env_var additional_rtlmp_args RTLMP_NOTCH_WT -notch_weight 1
56+
append_env_var additional_rtlmp_args RTLMP_DEAD_SPACE -target_dead_space 1
57+
append_env_var additional_rtlmp_args RTLMP_RPT_DIR -report_directory 1
58+
append_env_var additional_rtlmp_args RTLMP_FENCE_LX -fence_lx 1
59+
append_env_var additional_rtlmp_args RTLMP_FENCE_LY -fence_ly 1
60+
append_env_var additional_rtlmp_args RTLMP_FENCE_UX -fence_ux 1
61+
append_env_var additional_rtlmp_args RTLMP_FENCE_UY -fence_uy 1
6362

64-
set all_args $additional_rtlmp_args
63+
append additional_rtlmp_args " -target_util [place_density_with_lb_addon]"
6564

66-
if { [env_var_exists_and_non_empty RTLMP_ARGS] } {
67-
set all_args $::env(RTLMP_ARGS)
68-
}
65+
set all_args $additional_rtlmp_args
6966

70-
log_cmd rtl_macro_placer {*}$all_args
67+
if { [env_var_exists_and_non_empty RTLMP_ARGS] } {
68+
set all_args $::env(RTLMP_ARGS)
7169
}
7270

71+
log_cmd rtl_macro_placer {*}$all_args
72+
7373
source $::env(SCRIPTS_DIR)/placement_blockages.tcl
7474
block_channels $blockage_width
7575
} else {

flow/scripts/variables.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,9 @@ TAPCELL_TCL:
343343
- floorplan
344344
MACRO_PLACEMENT_TCL:
345345
description: |
346-
Specifies the path of a TCL file on how to place certain macros manually.
346+
Specifies the path of a TCL file on how to place macros manually.
347+
The user may choose to place just some of the macros in the design.
348+
The macro placer will handle the remaining unplaced macros.
347349
stages:
348350
- floorplan
349351
MACRO_PLACE_HALO:

0 commit comments

Comments
 (0)