Skip to content

Commit d615863

Browse files
committed
Merge remote-tracking branch 'private/master' into secure-gpl-binSize-float
2 parents 229673e + fa7672b commit d615863

File tree

147 files changed

+18734
-1751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+18734
-1751
lines changed

docs/user/FlowVariables.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,12 @@ configuration file.
179179
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| | |
180180
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| | |
181181
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| -flatten| |
182+
| <a name="SYNTH_BLACKBOXES"></a>SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design.| | |
182183
| <a name="SYNTH_GUT"></a>SYNTH_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| | |
183184
| <a name="SYNTH_HIERARCHICAL"></a>SYNTH_HIERARCHICAL| Enable to Synthesis hierarchically, otherwise considered flat synthesis.| 0| |
184185
| <a name="SYNTH_MEMORY_MAX_BITS"></a>SYNTH_MEMORY_MAX_BITS| Maximum number of bits for memory synthesis.| 4096| |
186+
| <a name="SYNTH_NETLIST_FILES"></a>SYNTH_NETLIST_FILES| Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used.| | |
187+
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| | |
185188
| <a name="TAPCELL_TCL"></a>TAPCELL_TCL| Path to Endcap and Welltie cells file.| | |
186189
| <a name="TAP_CELL_NAME"></a>TAP_CELL_NAME| Name of the cell to use in tap cell insertion.| | |
187190
| <a name="TECH_LEF"></a>TECH_LEF| A technology LEF file of the PDK that includes all relevant information regarding metal layers, vias, and spacing requirements.| | |
@@ -204,13 +207,14 @@ configuration file.
204207
- [LATCH_MAP_FILE](#LATCH_MAP_FILE)
205208
- [MAX_UNGROUP_SIZE](#MAX_UNGROUP_SIZE)
206209
- [MIN_BUF_CELL_AND_PORTS](#MIN_BUF_CELL_AND_PORTS)
207-
- [RESYNTH_AREA_RECOVER](#RESYNTH_AREA_RECOVER)
208-
- [RESYNTH_TIMING_RECOVER](#RESYNTH_TIMING_RECOVER)
209210
- [SDC_FILE](#SDC_FILE)
210211
- [SDC_GUT](#SDC_GUT)
212+
- [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES)
211213
- [SYNTH_GUT](#SYNTH_GUT)
212214
- [SYNTH_HIERARCHICAL](#SYNTH_HIERARCHICAL)
213215
- [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS)
216+
- [SYNTH_NETLIST_FILES](#SYNTH_NETLIST_FILES)
217+
- [SYNTH_WRAPPED_OPERATORS](#SYNTH_WRAPPED_OPERATORS)
214218
- [TIEHI_CELL_AND_PORT](#TIEHI_CELL_AND_PORT)
215219
- [TIELO_CELL_AND_PORT](#TIELO_CELL_AND_PORT)
216220
- [VERILOG_FILES](#VERILOG_FILES)
@@ -246,6 +250,8 @@ configuration file.
246250
- [PLACE_PINS_ARGS](#PLACE_PINS_ARGS)
247251
- [PLACE_SITE](#PLACE_SITE)
248252
- [REMOVE_ABC_BUFFERS](#REMOVE_ABC_BUFFERS)
253+
- [RESYNTH_AREA_RECOVER](#RESYNTH_AREA_RECOVER)
254+
- [RESYNTH_TIMING_RECOVER](#RESYNTH_TIMING_RECOVER)
249255
- [RTLMP_AREA_WT](#RTLMP_AREA_WT)
250256
- [RTLMP_ARGS](#RTLMP_ARGS)
251257
- [RTLMP_BOUNDARY_WT](#RTLMP_BOUNDARY_WT)

flow/BUILD.bazel

Whitespace-only changes.

flow/MODULE.bazel

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module(
99
bazel_dep(name = "bazel-orfs")
1010
git_override(
1111
module_name = "bazel-orfs",
12-
commit = "f11fbdb35eeae7f8d5e08a58fb7d040f11cb9f04",
12+
commit = "4392a87877b4196502fc89dcdf898fd6efdb3fc0",
1313
remote = "https://github.com/The-OpenROAD-Project/bazel-orfs.git",
1414
)
1515

@@ -42,20 +42,17 @@ use_repo(pip, "orfs-pip")
4242

4343
orfs = use_extension("@bazel-orfs//:extension.bzl", "orfs_repositories")
4444
orfs.default(
45-
# To build an ORFS image from a PR:
46-
# ./build_openroad.sh --latest
45+
# Check out the version you want to test and make any modifications locally:
4746
#
48-
# Check out the PRs and modify the local repository as needed
4947
# ./build_openroad.sh --no_init
5048
#
51-
# docker tag docker.io/openroad/flow-ubuntu22.04-builder:c46d41 gcr.io/ascenium/orfs-megaboom/flow-ubuntu22.04-builder:c46d41
52-
# docker push gcr.io/ascenium/orfs-megaboom/flow-ubuntu22.04-builder:c46d41
53-
# image = "gcr.io/ascenium/orfs-megaboom/flow-ubuntu22.04-builder:c46d41",
54-
#
49+
# Comment out "sha256" below, not available for local docker images
50+
# and update "image" to point to the local image.
51+
5552
# Official image https://hub.docker.com/r/openroad/orfs/tags
56-
image = "docker.io/openroad/orfs:v3.0-2130-g6b38aeeb",
53+
image = "docker.io/openroad/orfs:v3.0-2528-ga8780221",
5754
# image = "gcr.io/ascenium/orfs-megaboom/flow-ubuntu22.04-builder:3d2c3d-2",
58-
sha256 = "f5b573d244862bc59f858e2a3586c48aef70989e98f6541099bd15a720e28e7e",
55+
sha256 = "5093434a9d3adaaf8e9a4d62fc0df2537d43ceaf01bf2acf9e94d9d38131b7ca",
5956
)
6057
use_repo(orfs, "com_github_nixos_patchelf_download")
6158
use_repo(orfs, "docker_orfs")

flow/MODULE.bazel.lock

Lines changed: 355 additions & 1245 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flow/Makefile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ $(DONT_USE_LIBS): $$(filter %$$(@F) %$$(@F).gz,$(LIB_FILES))
337337
@mkdir -p $(OBJECTS_DIR)/lib
338338
$(UTILS_DIR)/preprocessLib.py -i $^ -o $@
339339

340-
$(OBJECTS_DIR)/lib/merged.lib:
340+
$(OBJECTS_DIR)/lib/merged.lib: $(DONT_USE_LIBS)
341341
$(UTILS_DIR)/mergeLib.pl $(PLATFORM)_merged $(DONT_USE_LIBS) > $@
342342

343343
# Pre-process KLayout tech
@@ -437,19 +437,19 @@ $(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE)
437437
mkdir -p $(dir $@)
438438
echo $(ABC_CLOCK_PERIOD_IN_PS) > $@
439439

440-
YOSYS_DEPENDENCIES=$(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LIB_FILE) $(VERILOG_FILES) $(CACHED_NETLIST) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) $(SDC_FILE_CLOCK_PERIOD)
440+
YOSYS_DEPENDENCIES=$(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) $(SDC_FILE_CLOCK_PERIOD)
441441

442442
.PHONY: yosys-dependencies
443443
yosys-dependencies: $(YOSYS_DEPENDENCIES)
444444

445445
.PHONY: do-yosys
446-
do-yosys:
446+
do-yosys: $(DONT_USE_SC_LIB)
447447
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
448448
(export VERILOG_FILES=$(RESULTS_DIR)/1_synth.rtlil; \
449449
$(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys.log)
450450

451451
.PHONY: do-yosys-canonicalize
452-
do-yosys-canonicalize: yosys-dependencies
452+
do-yosys-canonicalize: yosys-dependencies $(DONT_USE_SC_LIB)
453453
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
454454
($(TIME_CMD) $(YOSYS_EXE) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(abspath $(LOG_DIR)/1_1_yosys_canonicalize.log)
455455

@@ -594,7 +594,7 @@ endef
594594

595595
# STEP 1: Translate verilog to odb
596596
#-------------------------------------------------------------------------------
597-
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL),floorplan))
597+
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL) $(DONT_USE_SC_LIB),floorplan))
598598

599599
# STEP 2: Random IO placement
600600
#-------------------------------------------------------------------------------
@@ -619,7 +619,7 @@ $(eval $(call do-copy,2_floorplan,2_5_floorplan_pdn.odb,))
619619
$(RESULTS_DIR)/2_floorplan.sdc: $(RESULTS_DIR)/2_1_floorplan.odb
620620

621621
.PHONY: do-floorplan
622-
do-floorplan:
622+
do-floorplan: $(DONT_USE_SC_LIB)
623623
$(UNSET_AND_MAKE) do-2_1_floorplan do-2_2_floorplan_io do-2_3_floorplan_macro do-2_4_floorplan_tapcell do-2_5_floorplan_pdn do-2_floorplan do-2_floorplan.sdc
624624

625625
.PHONY: clean_floorplan
@@ -1026,6 +1026,11 @@ run:
10261026
@mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
10271027
($(OPENROAD_CMD) -no_splash $(if $(filter %.py,$(RUN_SCRIPT)),-python) $(RUN_SCRIPT) 2>&1 | tee $(abspath $(LOG_DIR)/$(RUN_LOG_NAME_STEM).log))
10281028

1029+
export RUN_YOSYS_ARGS ?= -c $(SCRIPTS_DIR)/yosys_keep.tcl
1030+
.phony: run-yosys
1031+
run-yosys:
1032+
$(YOSYS_EXE) $(RUN_YOSYS_ARGS)
1033+
10291034
# Utilities
10301035
#-------------------------------------------------------------------------------
10311036
include $(UTILS_DIR)/utils.mk

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
"compare": "<="
2525
},
2626
"cts__design__instance__count__hold_buffer": {
27-
"value": 1087,
27+
"value": 1025,
2828
"compare": "<="
2929
},
3030
"globalroute__antenna_diodes_count": {
3131
"value": 0,
3232
"compare": "<="
3333
},
3434
"detailedroute__route__wirelength": {
35-
"value": 75547,
35+
"value": 71923,
3636
"compare": "<="
3737
},
3838
"detailedroute__route__drc_errors": {
@@ -48,23 +48,23 @@
4848
"compare": "<="
4949
},
5050
"finish__timing__setup__ws": {
51-
"value": -104.94,
51+
"value": -86.6,
5252
"compare": ">="
5353
},
5454
"finish__design__instance__area": {
55-
"value": 7371,
55+
"value": 7354,
5656
"compare": "<="
5757
},
5858
"finish__timing__drv__setup_violation_count": {
5959
"value": 478,
6060
"compare": "<="
6161
},
6262
"finish__timing__drv__hold_violation_count": {
63-
"value": 399,
63+
"value": 326,
6464
"compare": "<="
6565
},
6666
"finish__timing__wns_percent_delay": {
67-
"value": -22.74,
67+
"value": -21.47,
6868
"compare": ">="
6969
}
7070
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
"compare": "<="
4949
},
5050
"finish__timing__setup__ws": {
51-
"value": -83.87,
51+
"value": -68.71,
5252
"compare": ">="
5353
},
5454
"finish__design__instance__area": {
55-
"value": 2360,
55+
"value": 2359,
5656
"compare": "<="
5757
},
5858
"finish__timing__drv__setup_violation_count": {
@@ -64,7 +64,7 @@
6464
"compare": "<="
6565
},
6666
"finish__timing__wns_percent_delay": {
67-
"value": -24.19,
67+
"value": -21.4,
6868
"compare": ">="
6969
}
7070
}

flow/designs/asap7/aes/BUILD.bazel

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
load("@bazel-orfs//:openroad.bzl", "orfs_flow", "orfs_synth")
2+
3+
BLACKBOXES = [
4+
"aes_sbox",
5+
"aes_key_expand_128",
6+
"aes_cipher_top",
7+
]
8+
9+
[orfs_synth(
10+
name = "{name}_netlist_synth".format(name = name),
11+
arguments = {
12+
"SDC_FILE": "$(location :constraint.sdc)",
13+
"SYNTH_BLACKBOXES": " ".join([b for b in BLACKBOXES if b != name]),
14+
},
15+
data = [":constraint.sdc"],
16+
module_top = name,
17+
variant = "netlist",
18+
verilog_files = ["//designs/src/aes:verilog"],
19+
) for name in BLACKBOXES]
20+
21+
[filegroup(
22+
name = "{name}_netlist".format(name = name),
23+
srcs = ["{name}_netlist_synth".format(name = name)],
24+
output_group = "1_synth.v",
25+
) for name in BLACKBOXES]
26+
27+
filegroup(
28+
name = "netlists",
29+
srcs = [":{}_netlist".format(name) for name in BLACKBOXES],
30+
)
31+
32+
orfs_flow(
33+
name = "aes_cipher_top",
34+
arguments = {
35+
"ABC_AREA": "1",
36+
"CORE_UTILIZATION": "40",
37+
"CORE_ASPECT_RATIO": "1",
38+
"CORE_MARGIN": "2",
39+
"PLACE_DENSITY": "0.65",
40+
"TNS_END_PERCENT": "100",
41+
},
42+
sources = {
43+
"SDC_FILE": [":constraint.sdc"],
44+
"SYNTH_NETLIST_FILES": [":netlists"],
45+
},
46+
top = "aes_cipher_top",
47+
)

flow/designs/asap7/aes/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Parallel synthesis with SYNTH_BLACKBOXES
2+
3+
For large designs, it can be useful to split synthesis for the
4+
major blocks and combine the synthesized result.
5+
6+
SYNTH_HIERARCHICAL=1 and MAX_UNGROUP_SIZE can be used to adjust which
7+
modules are flattened and which are kept.
8+
9+
A module that is not flattened, can be built separately without any
10+
loss in quality of results and combined as shown below. The module
11+
that is built separately be built with and without SYNTH_HIERARCHICAL=1.
12+
13+
1. Synthesize aes_key_expand_128 module
14+
15+
make DESIGN_CONFIG=designs/asap7/aes/config.mk FLOW_VARIANT=blackbox clean_synth synth
16+
2. Synthesize top module, which could happen in parallel to 1 but with aes_key_expand_128 blacklisted:
17+
18+
make DESIGN_CONFIG=designs/asap7/aes/config.mk FLOW_VARIANT=top clean_synth synth
19+
3. Combine the synthesis results above:
20+
21+
make DESIGN_CONFIG=designs/asap7/aes/config.mk FLOW_VARIANT=combine clean_synth synth
22+
23+
4. View final result:
24+
25+
make DESIGN_CONFIG=designs/asap7/aes/config.mk FLOW_VARIANT=combine
26+
make DESIGN_CONFIG=designs/asap7/aes/config.mk FLOW_VARIANT=combine gui_final
27+
28+
![alt text](final.png)

flow/designs/asap7/aes/config.mk

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,17 @@ export PLACE_DENSITY = 0.65
1515
export TNS_END_PERCENT = 100
1616
export EQUIVALENCE_CHECK ?= 1
1717
export REMOVE_CELLS_FOR_EQY = TAPCELL*
18+
19+
ifeq ($(FLOW_VARIANT),top)
20+
export DESIGN_NAME = aes_cipher_top
21+
export SYNTH_BLACKBOXES = aes_key_expand_128
22+
else ifeq ($(FLOW_VARIANT),blackbox)
23+
export DESIGN_NAME = aes_key_expand_128
24+
else ifeq ($(FLOW_VARIANT),combine)
25+
export EQUIVALENCE_CHECK = 0
26+
# List blackbox twice to demonstrates that duplicate modules are ignored.
27+
export SYNTH_NETLIST_FILES = \
28+
$(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/top/1_synth.v \
29+
$(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/blackbox/1_synth.v \
30+
$(WORK_HOME)/results/$(PLATFORM)/$(DESIGN_NICKNAME)/blackbox/1_synth.v
31+
endif

0 commit comments

Comments
 (0)