Skip to content

Commit 5808340

Browse files
authored
Merge pull request #3975 from The-OpenROAD-Project-staging/synth-oyvind-blackboxes
Make slang ignore Verilog definitions of macros
2 parents 0a7c9ff + 90ab6ed commit 5808340

File tree

9 files changed

+28
-13
lines changed

9 files changed

+28
-13
lines changed

flow/designs/asap7/aes-block/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 7206,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/nangate45/ariane133/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 840911,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/nangate45/bp_fe_top/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 247483,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/nangate45/bp_multi_top/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 587157,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/nangate45/mempool_group/rules-base.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"synth__design__instance__area__stdcell": {
3-
"value": 271098.37,
3+
"value": 424000.0,
44
"compare": "<="
55
},
66
"constraints__clocks__count": {
77
"value": 2,
88
"compare": "=="
99
},
1010
"placeopt__design__instance__area": {
11-
"value": 295108,
11+
"value": 451188,
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 163160,
15+
"value": 198708,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
@@ -32,7 +32,7 @@
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -10300.0,
35+
"value": -11900.0,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -52,7 +52,7 @@
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -11100.0,
55+
"value": -14200.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,7 +64,7 @@
6464
"compare": ">="
6565
},
6666
"detailedroute__route__wirelength": {
67-
"value": 4029078,
67+
"value": 5795200,
6868
"compare": "<="
6969
},
7070
"detailedroute__route__drc_errors": {
@@ -96,7 +96,7 @@
9696
"compare": ">="
9797
},
9898
"finish__design__instance__area": {
99-
"value": 303227,
99+
"value": 461696,
100100
"compare": "<="
101101
}
102102
}

flow/designs/nangate45/tinyRocket/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 62486,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/designs/sky130hd/chameleon/rules-base.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@
9999
"value": 6493440,
100100
"compare": "<="
101101
}
102-
}
102+
}

flow/scripts/synth_preamble.tcl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ proc read_design_sources { } {
6363
lappend slang_args -G "$key=$value"
6464
}
6565

66+
# Automatically blackbox macros from ADDITIONAL_LIBS so that
67+
# any competing Verilog definitions in the source files are
68+
# ignored in favor of the liberty view, consistent with the
69+
# behavior of the builtin Verilog frontend.
70+
if { [env_var_exists_and_non_empty ADDITIONAL_LIBS] } {
71+
foreach m [get_liberty_cell_names] {
72+
lappend slang_args --blackboxed-module "$m"
73+
}
74+
}
75+
6676
# Apply module blackboxing based on module names as they appear
6777
# in the input, that is before any module name mangling done
6878
# by elaboration and synthesis

flow/scripts/util.tcl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Extract cell names
2+
proc get_liberty_cell_names { } {
3+
return [tee -q -s result.string select -list-mod =A:liberty_cell]
4+
}
5+
16
proc log_cmd { cmd args } {
27
# log the command, escape arguments with spaces
38
set log_cmd "$cmd[join [lmap arg $args { format " %s" [expr { [string match {* *} $arg] ? "\"$arg\"" : "$arg" }] }] ""]" ;# tclint-disable-line line-length

0 commit comments

Comments
 (0)