Skip to content

Commit 376add8

Browse files
committed
Merge branch 'master' of https://github.com/The-OpenROAD-Project-private/OpenROAD-flow-scripts into secure-yosys_fix
2 parents c861ab0 + d8c6b0c commit 376add8

14 files changed

Lines changed: 143 additions & 37 deletions

File tree

‎bazel/install.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ for sub in tools/OpenROAD tools/yosys tools/yosys-slang; do
8888
fi
8989
done
9090

91-
# --- OpenROAD (delegates to its own //:install) ---
91+
# --- OpenROAD (delegates to its own //packaging:install) ---
9292
if [[ $BUILD_OPENROAD -eq 1 ]]; then
9393
echo "=== Building OpenROAD with GUI support ==="
94-
(cd "${WORKSPACE}/tools/OpenROAD" && bazelisk run --//:platform=gui //:install)
94+
(cd "${WORKSPACE}/tools/OpenROAD" && bazelisk run --//:platform=gui //packaging:install)
9595
fi
9696

9797
# --- Yosys ---

‎docs/user/FlowVariables.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ configuration file.
273273
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0|
274274
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
275275
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
276+
| <a name="SLANG_PLUGIN_PATH"></a>SLANG_PLUGIN_PATH| Path to the slang plugin for Yosys. This can be a full path to a custom-built plugin (e.g. for Bazel builds) or just the plugin name.| slang|
276277
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
277278
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
278279
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
@@ -326,6 +327,7 @@ configuration file.
326327
- [PRE_SYNTH_TCL](#PRE_SYNTH_TCL)
327328
- [SDC_FILE](#SDC_FILE)
328329
- [SDC_GUT](#SDC_GUT)
330+
- [SLANG_PLUGIN_PATH](#SLANG_PLUGIN_PATH)
329331
- [SYNTH_ARGS](#SYNTH_ARGS)
330332
- [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES)
331333
- [SYNTH_CANONICALIZE_TCL](#SYNTH_CANONICALIZE_TCL)

‎flow/BUILD.bazel‎

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
load("@bazel-orfs//:openroad.bzl", "orfs_pdk")
22

3+
exports_files(
4+
["scripts/variables.yaml"],
5+
visibility = ["//visibility:public"],
6+
)
7+
38
# files shared between scripts/synth.sh and scripts/flow.sh steps
49
MAKEFILE_SHARED = [
510
"scripts/*.py",
@@ -16,6 +21,7 @@ filegroup(
1621
"scripts/*.script",
1722
"scripts/util.tcl",
1823
"scripts/synth*.tcl",
24+
"scripts/synth*.v",
1925
"platforms/common/**/*.v",
2026
]) + [
2127
"//flow/util:makefile_yosys",
@@ -46,25 +52,40 @@ filegroup(
4652
for ext in [
4753
"gds",
4854
"lef",
49-
"lib",
55+
"lyp",
5056
"lyt",
5157
"mk",
5258
"rules",
5359
"tcl",
5460
"v",
5561
] + {
56-
"sky130hd": ["tlef"],
57-
"asap7": [
58-
"lib.gz",
59-
"sdc",
60-
],
62+
"asap7": ["cfg", "json", "lib.gz", "sdc"],
63+
"gf180": ["cfg", "layermap", "lyt_generic"],
64+
"ihp-sg13g2": ["json"],
65+
"nangate45": ["cfg"],
66+
"sky130hd": ["json", "tlef"],
67+
"sky130hs": ["json", "tlef"],
6168
}.get(pdk, [])
6269
] + [
6370
"platforms/common/**/*.v",
6471
]),
72+
libs = glob([
73+
"platforms/{pdk}/**/*.{ext}".format(
74+
pdk = pdk,
75+
ext = ext,
76+
)
77+
for ext in {
78+
"asap7": ["lib", "lib.gz"],
79+
"gf180": ["lib.gz"],
80+
}.get(pdk, ["lib"])
81+
]),
6582
config = ":platforms/{pdk}/config.mk".format(pdk = pdk),
6683
visibility = ["//visibility:public"],
6784
) for pdk in [
6885
"asap7",
86+
"gf180",
87+
"ihp-sg13g2",
88+
"nangate45",
6989
"sky130hd",
90+
"sky130hs",
7091
]]

‎flow/designs/rapidus2hp/hercules_idecode/prects_0.3.sdc‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ set sdc_version 1.4
55
current_design hercules_idecode
66

77
set clk_period 370
8+
# Roughly 150ps for a 370ps clock
9+
set input_pct 0.4054
10+
# Roughly 50ps for a 370ps clock
11+
set output_pct 0.1351
812

913
convert_time_value clk_period
1014

@@ -13,4 +17,10 @@ set_load [convert_cap_value 10] [all_outputs]
1317
set_max_capacitance [convert_cap_value 10] [all_inputs]
1418

1519
create_clock -name "clk" -add -period $clk_period \
16-
-waveform [list 0.0 [expr 0.5*$clk_period]] [get_ports clk]
20+
-waveform [list 0.0 [expr { 0.5 * $clk_period }]] [get_ports clk]
21+
22+
set_clock_latency $clk_period clk
23+
24+
### Setup input delay is set to 20% of CT
25+
set_input_delay [expr { $clk_period * $input_pct }] -clock clk [all_inputs]
26+
set_output_delay [expr { $clk_period * $output_pct }] -clock clk [all_outputs]

‎flow/designs/rapidus2hp/hercules_idecode/rules-base.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0383,
51+
"value": -0.0596,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -0.473,
55+
"value": -1.04,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0383,
67+
"value": -0.0596,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -0.473,
71+
"value": -1.04,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

‎flow/designs/rapidus2hp/hercules_idecode/rules-verific.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0225,
51+
"value": -0.0894,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -0.0993,
55+
"value": -0.314,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
@@ -64,11 +64,11 @@
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0225,
67+
"value": -0.0894,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -0.0993,
71+
"value": -0.314,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {

‎flow/designs/rapidus2hp/hercules_is_int/prects_0.3.sdc‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ set sdc_version 1.4
55
current_design hercules_is_int
66

77
set clk_period 370
8+
# Roughly 150ps for a 370ps clock
9+
set input_pct 0.4054
10+
# Roughly 50ps for a 370ps clock
11+
set output_pct 0.1351
812

913
convert_time_value clk_period
1014

@@ -14,3 +18,9 @@ set_max_capacitance [convert_cap_value 10] [all_inputs]
1418

1519
create_clock -name "clk" -add -period $clk_period \
1620
-waveform [list 0.0 [expr { 0.5 * $clk_period }]] [get_ports clk]
21+
22+
set_clock_latency $clk_period clk
23+
24+
### Setup input delay is set to 20% of CT
25+
set_input_delay [expr { $clk_period * $input_pct }] -clock clk [all_inputs]
26+
set_output_delay [expr { $clk_period * $output_pct }] -clock clk [all_outputs]

‎flow/designs/rapidus2hp/hercules_is_int/rules-base.json‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
"compare": "<="
1313
},
1414
"placeopt__design__instance__count__stdcell": {
15-
"value": 647733,
15+
"value": 647436,
1616
"compare": "<="
1717
},
1818
"detailedplace__design__violations": {
1919
"value": 0,
2020
"compare": "=="
2121
},
2222
"cts__design__instance__count__setup_buffer": {
23-
"value": 56325,
23+
"value": 56299,
2424
"compare": "<="
2525
},
2626
"cts__design__instance__count__hold_buffer": {
27-
"value": 56325,
27+
"value": 56299,
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.0185,
31+
"value": -0.114,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -0.074,
35+
"value": -85.7,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,35 +48,35 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.0815,
51+
"value": -0.248,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -65.4,
55+
"value": -567.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
5959
"value": -0.0125,
6060
"compare": ">="
6161
},
6262
"globalroute__timing__hold__tns": {
63-
"value": -0.05,
63+
"value": -0.302,
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.0815,
67+
"value": -0.248,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -65.4,
71+
"value": -567.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {
7575
"value": -0.0125,
7676
"compare": ">="
7777
},
7878
"finish__timing__hold__tns": {
79-
"value": -0.05,
79+
"value": -0.302,
8080
"compare": ">="
8181
},
8282
"finish__design__instance__area": {

‎flow/designs/rapidus2hp/hercules_is_int/rules-verific.json‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828
"compare": "<="
2929
},
3030
"cts__timing__setup__ws": {
31-
"value": -0.0185,
31+
"value": -0.141,
3232
"compare": ">="
3333
},
3434
"cts__timing__setup__tns": {
35-
"value": -0.074,
35+
"value": -99.3,
3636
"compare": ">="
3737
},
3838
"cts__timing__hold__ws": {
@@ -48,35 +48,35 @@
4848
"compare": "<="
4949
},
5050
"globalroute__timing__setup__ws": {
51-
"value": -0.133,
51+
"value": -0.201,
5252
"compare": ">="
5353
},
5454
"globalroute__timing__setup__tns": {
55-
"value": -123.0,
55+
"value": -537.0,
5656
"compare": ">="
5757
},
5858
"globalroute__timing__hold__ws": {
5959
"value": -0.0125,
6060
"compare": ">="
6161
},
6262
"globalroute__timing__hold__tns": {
63-
"value": -0.05,
63+
"value": -0.23,
6464
"compare": ">="
6565
},
6666
"finish__timing__setup__ws": {
67-
"value": -0.133,
67+
"value": -0.201,
6868
"compare": ">="
6969
},
7070
"finish__timing__setup__tns": {
71-
"value": -123.0,
71+
"value": -537.0,
7272
"compare": ">="
7373
},
7474
"finish__timing__hold__ws": {
7575
"value": -0.0125,
7676
"compare": ">="
7777
},
7878
"finish__timing__hold__tns": {
79-
"value": -0.05,
79+
"value": -0.23,
8080
"compare": ">="
8181
},
8282
"finish__design__instance__area": {
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"_SDC_FILE_PATH": "constraint_0.2a_8T.sdc",
3+
"_SDC_CLK_PERIOD": {
4+
"type": "range_int",
5+
"min": 350,
6+
"max": 500,
7+
"step": 0
8+
},
9+
"CORE_UTILIZATION": {
10+
"type": "range_int",
11+
"min": 65,
12+
"max": 80,
13+
"step": 0
14+
},
15+
"CTS_CLUSTER_SIZE": {
16+
"type": "range_int",
17+
"min": 10,
18+
"max": 200,
19+
"step": 1
20+
},
21+
"CTS_CLUSTER_DIAMETER": {
22+
"type": "range_int",
23+
"min": 20,
24+
"max": 400,
25+
"step": 1
26+
}
27+
}

0 commit comments

Comments
 (0)