Skip to content

Commit f988482

Browse files
committed
Merged master into branch for updated ok files.
Signed-off-by: Harsh Vardhan <[email protected]>
1 parent 2fe5d6e commit f988482

File tree

16 files changed

+631
-546
lines changed

16 files changed

+631
-546
lines changed

docs/conf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@
5959

6060
# The suffix(es) of source filenames.
6161
# You can specify multiple suffix as a list of string:
62-
#
63-
# source_suffix = ['.rst', '.md']
6462
source_suffix = ['.md']
6563

6664
# The master toctree document.
@@ -94,6 +92,10 @@
9492
html_theme_options = {
9593
"repository_url": "https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts",
9694
"repository_branch": "master",
95+
"show_navbar_depth": 2,
96+
"use_edit_page_button": True,
97+
"use_source_button": True,
98+
"use_issues_button": True,
9799
"use_download_button": True,
98100

99101
# list for more fine-grained ordering of icons

docs/toc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
root: index
22
entries:
33

4-
- file: /dev/null
5-
title: ORFS Documentation
4+
- file: user/UserGuide.md
5+
title: User Guide
66
entries:
77
- file: user/BuildWithDocker
88
title: Build With Docker
@@ -13,8 +13,8 @@ entries:
1313
title: Build With Pre-built Binaries
1414
- file: user/BuildLocally.md
1515
title: Build Locally
16-
- file: user/UserGuide.md
17-
title: User Guide
16+
- file: user/BuildWithWSL.md
17+
title: Build With WSL
1818
- file: user/FlowVariables.md
1919
title: Flow Variables
2020
- file: contrib/Metrics.md

docs/user/BuildWithPrebuilt.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Instructions for installing:
99

1010
```{tip} Unfortunately KLayout maintainers do not provide Debian 10/11 compatible packages. You can follow the build-from-sources instruction (Version >=0.25) and Ubuntu 22 instructions [here](https://www.klayout.de/build.html#:~:text=Building%20KLayout%20on%20Linux%20(Version%20%3E%3D%200.25)).
1111
```
12+
1213
## Install OpenROAD
1314
Download pre-built binaries with self-contained dependencies
1415
included from the Precision Innovations' Github releases
@@ -28,22 +29,30 @@ Step 2: Download the artifacts for your distribution.
2829

2930
Step 3: Run the install command based on platform use package installer.
3031
For example Ubuntu 20.04 use:
32+
3133
```shell
3234
sudo apt install ./openroad_2.0_amd64-ubuntu20.04.deb
3335
```
36+
3437
You can install these binaries within docker as well.
3538

3639

3740
## Verify Installation
3841
You may clone the OpenROAD-flow-scripts repository non-recursively.
42+
3943
```
4044
git clone https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts.git
4145
```
46+
4247
Export path variables accordingly.
48+
4349
```
44-
export PATH="<yosys_location>/bin:$PATH"
45-
export PATH="<klayout_location>/bin:$PATH" # only if built from source
46-
export LD_LIBRARY_PATH="<klayout_location>/bin:$PATH" # only if built from source
50+
# these variables are used in flow/Makefile. Do make sure the yosys path is sourced.
51+
export OPENROAD_EXE=$(command -v openroad)
52+
export YOSYS_CMD=$(shell command -v yosys)
53+
54+
# only if KLayout is built from source
55+
export LD_LIBRARY_PATH="<klayout_location>/bin:$PATH"
4756
4857
yosys -help
4958
openroad -help

flow/Makefile

Lines changed: 78 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -267,21 +267,16 @@ endif
267267

268268
# The following determine the executable location for each tool used by this flow.
269269
# Priority is given to
270-
# 1 user include path to the executable prior to running make
271-
# 2 user explicit set with variable in Makefile or command line
272-
export OPENROAD_EXE ?= $(shell command -v openroad)
273-
ifeq ($(OPENROAD_EXE),)
274-
export OPENROAD_EXE = $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
275-
endif
270+
# 1 user explicit set with variable in Makefile or command line, for instance setting OPENROAD_EXE
271+
# 2 ORFS compiled tools: openroad, yosys
272+
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
273+
276274
OPENROAD_ARGS = -no_init $(OR_ARGS)
277275
OPENROAD_CMD = $(OPENROAD_EXE) -exit $(OPENROAD_ARGS)
278276
OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
279277
OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
280278

281-
YOSYS_CMD ?= $(shell command -v yosys)
282-
ifeq ($(YOSYS_CMD),)
283-
YOSYS_CMD = $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
284-
endif
279+
YOSYS_CMD ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/bin/yosys)
285280

286281
KLAYOUT_CMD ?= $(shell command -v klayout)
287282

@@ -455,6 +450,18 @@ UNSET_AND_MAKE = @bash -c 'for var in $(UNSET_VARIABLES_NAMES); do unset $$var;
455450
#
456451
# A "do-synth" step would be welcomed, but it isn't strictly necessary
457452
# for the Bazel use-case.
453+
#
454+
# do-floorplan, do-place, do-cts, do-route, do-finish are the
455+
# supported interface to execute those stages without checking
456+
# for dependencies.
457+
#
458+
# The do- substeps of each of these stages are subject to change.
459+
#
460+
# $(1) stem, e.g. 2_1_floorplan
461+
# $(2) dependencies
462+
# $(3) tcl script step
463+
# $(4) extension of result, default .odb
464+
# $(5) folder of target, default $(RESULTS_DIR)
458465
define do-step
459466
$(if $(5),$(5),$(RESULTS_DIR))/$(1)$(if $(4),$(4),.odb): $(2)
460467
$$(UNSET_AND_MAKE) do-$(1)
@@ -464,6 +471,25 @@ do-$(1):
464471
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json) 2>&1 | tee $(LOG_DIR)/$(1).log
465472
endef
466473

474+
# generate make rules to copy a file, if a dependency change and
475+
# a do- sibling rule that copies the file unconditionally.
476+
#
477+
# The file is copied within the $(RESULTS_DIR)
478+
#
479+
# $(1) stem of target, e.g. 2_2_floorplan_io
480+
# $(2) basename of file to be copied
481+
# $(3) further dependencies
482+
# $(4) target extension, default .odb
483+
define do-copy
484+
$(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb): $(RESULTS_DIR)/$(2) $(3)
485+
$$(UNSET_AND_MAKE) do-$(1)$(if $(4),$(4),)
486+
487+
.PHONY: do-$(1)$(if $(4),$(4),)
488+
do-$(1)$(if $(4),$(4),):
489+
cp $(RESULTS_DIR)/$(2) $(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb)
490+
endef
491+
492+
467493
# STEP 1: Translate verilog to odb
468494
#-------------------------------------------------------------------------------
469495
$(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))
@@ -473,18 +499,15 @@ $(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_sy
473499
ifndef IS_CHIP
474500
$(eval $(call do-step,2_2_floorplan_io,$(RESULTS_DIR)/2_1_floorplan.odb $(IO_CONSTRAINTS),io_placement_random))
475501
else
476-
$(RESULTS_DIR)/2_2_floorplan_io.odb: $(RESULTS_DIR)/2_1_floorplan.odb $(IO_CONSTRAINTS)
477-
cp $< $@
502+
$(eval $(call do-copy,2_2_floorplan_io,2_1_floorplan.odb,$(IO_CONSTRAINTS)))
478503
endif
479504

480505
# STEP 3: Timing Driven Mixed Sized Placement
481506
#-------------------------------------------------------------------------------
482507
ifeq ($(MACRO_PLACEMENT),)
483508
$(eval $(call do-step,2_3_floorplan_tdms,$(RESULTS_DIR)/2_2_floorplan_io.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES),tdms_place))
484509
else
485-
$(RESULTS_DIR)/2_3_floorplan_tdms.odb: $(RESULTS_DIR)/2_2_floorplan_io.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES)
486-
$(info [INFO][FLOW] Using manual macro placement file $(MACRO_PLACEMENT))
487-
cp $< $@
510+
$(eval $(call do-copy,2_3_floorplan_tdms,2_2_floorplan_io.odb,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(LIB_FILES)))
488511
endif
489512

490513
# STEP 4: Macro Placement
@@ -499,11 +522,13 @@ $(eval $(call do-step,2_5_floorplan_tapcell,$(RESULTS_DIR)/2_4_floorplan_macro.o
499522
#-------------------------------------------------------------------------------
500523
$(eval $(call do-step,2_6_floorplan_pdn,$(RESULTS_DIR)/2_5_floorplan_tapcell.odb $(PDN_TCL),pdn))
501524

502-
$(RESULTS_DIR)/2_floorplan.odb: $(RESULTS_DIR)/2_6_floorplan_pdn.odb
503-
cp $< $@
525+
$(eval $(call do-copy,2_floorplan,2_6_floorplan_pdn.odb,))
504526

505527
$(RESULTS_DIR)/2_floorplan.sdc: $(RESULTS_DIR)/2_1_floorplan.odb
506528

529+
.PHONY: do-floorplan
530+
do-floorplan:
531+
$(UNSET_AND_MAKE) do-2_1_floorplan do-2_2_floorplan_io do-2_3_floorplan_tdms do-2_4_floorplan_macro do-2_5_floorplan_tapcell do-2_6_floorplan_pdn do-2_floorplan
507532

508533
.PHONY: clean_floorplan
509534
clean_floorplan:
@@ -531,8 +556,7 @@ $(eval $(call do-step,3_1_place_gp_skip_io,$(RESULTS_DIR)/2_floorplan.odb $(RESU
531556
ifndef IS_CHIP
532557
$(eval $(call do-step,3_2_place_iop,$(RESULTS_DIR)/3_1_place_gp_skip_io.odb $(IO_CONSTRAINTS),io_placement))
533558
else
534-
$(RESULTS_DIR)/3_2_place_iop.odb: $(RESULTS_DIR)/3_1_place_gp_skip_io.odb $(IO_CONSTRAINTS)
535-
cp $< $@
559+
$(eval $(call do-copy,3_2_place_iop,3_1_place_gp_skip_io.odb,$(IO_CONSTRAINTS)))
536560
endif
537561

538562
# STEP 3: Global placement with placed IOs, timing-driven, and routability-driven.
@@ -551,11 +575,13 @@ clean_resize:
551575
#-------------------------------------------------------------------------------
552576
$(eval $(call do-step,3_5_place_dp,$(RESULTS_DIR)/3_4_place_resized.odb,detail_place))
553577

554-
$(RESULTS_DIR)/3_place.odb: $(RESULTS_DIR)/3_5_place_dp.odb
555-
cp $< $@
578+
$(eval $(call do-copy,3_place,3_5_place_dp.odb,))
556579

557-
$(RESULTS_DIR)/3_place.sdc: $(RESULTS_DIR)/2_floorplan.sdc
558-
cp $< $@
580+
$(eval $(call do-copy,3_place,2_floorplan.sdc,,.sdc))
581+
582+
.PHONY: do-place
583+
do-place:
584+
$(UNSET_AND_MAKE) do-3_1_place_gp_skip_io do-3_2_place_iop do-3_3_place_gp do-3_4_place_resized do-3_5_place_dp do-3_place do-3_place.sdc
559585

560586
# Clean Targets
561587
#-------------------------------------------------------------------------------
@@ -590,8 +616,11 @@ $(eval $(call do-step,4_2_cts_fillcell,$(RESULTS_DIR)/4_1_cts.odb,fillcell))
590616

591617
$(RESULTS_DIR)/4_cts.sdc: $(RESULTS_DIR)/4_cts.odb
592618

593-
$(RESULTS_DIR)/4_cts.odb: $(RESULTS_DIR)/4_2_cts_fillcell.odb
594-
cp $< $@
619+
$(eval $(call do-copy,4_cts,4_2_cts_fillcell.odb))
620+
621+
.PHONY: do-cts
622+
do-cts:
623+
$(UNSET_AND_MAKE) do-4_1_cts do-4_2_cts_fillcell do-4_cts
595624

596625
.PHONY: clean_cts
597626
clean_cts:
@@ -625,11 +654,13 @@ else
625654
$(eval $(call do-step,5_2_route,$(RESULTS_DIR)/4_cts.odb,detail_route))
626655
endif
627656

628-
$(RESULTS_DIR)/5_route.odb: $(RESULTS_DIR)/5_2_route.odb
629-
cp $< $@
657+
$(eval $(call do-copy,5_route,5_2_route.odb))
630658

631-
$(RESULTS_DIR)/5_route.sdc: $(RESULTS_DIR)/4_cts.sdc
632-
cp $< $@
659+
$(eval $(call do-copy,5_route,4_cts.sdc,,.sdc))
660+
661+
.PHONY: do-route
662+
do-route:
663+
$(UNSET_AND_MAKE) do-5_1_grt do-5_2_route do-5_route do-5_route.sdc
633664

634665
$(RESULTS_DIR)/5_route.v:
635666
@export OR_DB=5_route ;\
@@ -685,20 +716,21 @@ elapsed:
685716
ifneq ($(USE_FILL),)
686717
$(eval $(call do-step,6_1_fill,$(RESULTS_DIR)/5_route.odb $(FILL_CONFIG),density_fill))
687718
else
688-
$(RESULTS_DIR)/6_1_fill.odb: $(RESULTS_DIR)/5_route.odb
689-
cp $< $@
719+
$(eval $(call do-copy,6_1_fill,5_route.odb))
690720
endif
691721

692-
$(RESULTS_DIR)/6_1_fill.sdc: $(RESULTS_DIR)/5_route.sdc
693-
cp $< $@
722+
$(eval $(call do-copy,6_1_fill,5_route.sdc,,.sdc))
694723

695-
$(RESULTS_DIR)/6_final.sdc: $(RESULTS_DIR)/5_route.sdc
696-
cp $< $@
724+
$(eval $(call do-copy,6_final,5_route.sdc,,.sdc))
697725

698726
$(eval $(call do-step,6_report,$(RESULTS_DIR)/6_1_fill.odb $(RESULTS_DIR)/6_1_fill.sdc,final_report,.log,$(LOG_DIR)))
699727

700728
$(RESULTS_DIR)/6_final.def: $(LOG_DIR)/6_report.log
701729

730+
# NOTE! No GDS file for now
731+
.PHONY: do-finish
732+
do-finish:
733+
$(UNSET_AND_MAKE) do-6_1_fill do-6_1_fill.sdc do-6_final.sdc do-6_report elapsed
702734

703735
# Skipping resize can be useful for mock abstracts
704736
.PHONY: skip_resize
@@ -727,9 +759,17 @@ skip_route: $(RESULTS_DIR)/4_cts.odb $(RESULTS_DIR)/4_cts.sdc
727759
#
728760
# make skip_resize skip_cts skip_route generate_abstract
729761
.PHONY: generate_abstract
730-
generate_abstract: $(RESULTS_DIR)/6_final.gds $(RESULTS_DIR)/6_final.def $(RESULTS_DIR)/6_final.v
762+
generate_abstract: $(RESULTS_DIR)/6_final.gds $(RESULTS_DIR)/6_final.def $(RESULTS_DIR)/6_final.v $(RESULTS_DIR)/6_final.sdc
763+
$(UNSET_AND_MAKE) do-generate_abstract
764+
765+
.PHONY: do-generate_abstract
766+
do-generate_abstract:
731767
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/generate_abstract.tcl -metrics $(LOG_DIR)/generate_abstract.json) 2>&1 | tee $(LOG_DIR)/generate_abstract.log
732768

769+
.PHONY: clean_abstract
770+
clean_abstract:
771+
rm -f $(RESULTS_DIR)/$(DESIGN_NAME).lib $(RESULTS_DIR)/$(DESIGN_NAME).lef
772+
733773
# Merge wrapped macros using Klayout
734774
#-------------------------------------------------------------------------------
735775
$(WRAPPED_GDSOAS): $(OBJECTS_DIR)/klayout_wrap.lyt $(WRAPPED_LEFS)
@@ -829,7 +869,7 @@ clean:
829869
@echo
830870

831871
.PHONY: clean_all
832-
clean_all: clean_synth clean_floorplan clean_place clean_cts clean_route clean_finish clean_metadata
872+
clean_all: clean_synth clean_floorplan clean_place clean_cts clean_route clean_finish clean_metadata clean_abstract
833873
rm -rf $(OBJECTS_DIR)
834874

835875
.PHONY: nuke
@@ -904,6 +944,7 @@ all_verilog : $(foreach file,$(RESULTS_ODB),$(file).v)
904944
.PHONY: handoff
905945
handoff : all_defs all_verilog
906946

947+
.PHONY: print-%
907948
# Print any variable, for instance: make print-DIE_AREA
908949
print-% : ; @echo $* = $($*)
909950

flow/README.

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
asap7 aes : has cloning yay !: problems as well.
2+
asap7/riscv32i : 3 instances cloned. Yay !
3+
asap7/ethmac : 1 instance cloned triple yay !
4+
=====================================================
5+
6+
Recover power testing
7+
8+
asap7/ethmac
9+
asap7/riscv32i

flow/designs/1

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
asap7/: (13/14)
2+
aes OK
3+
ethmac OK
4+
gcd OK
5+
ibex OK
6+
jpeg OK
7+
jpeg_lvt OK
8+
megaboom SKIP
9+
mock-array OK
10+
mock-array-big SKIP
11+
riscv32i OK
12+
sha3 OK
13+
swerv_wrapper R
14+
uart OK
15+
uart-blocks OK
16+
#=============================================================================
17+
nangate45/: (0/16)
18+
aes OK
19+
ariane133 R
20+
ariane136 R
21+
black_parrot R
22+
bp_be_top R
23+
bp_fe_top R
24+
bp_multi_top
25+
bp_quad
26+
dynamic_node
27+
gcd
28+
ibex
29+
jpeg
30+
mempool_group
31+
swerv
32+
swerv_wrapper
33+
tinyRocket
34+
#=============================================================================
35+
sky130hd/: (0/9)
36+
aes
37+
chameleon
38+
chameleon_hier
39+
coyote_tc
40+
gcd
41+
ibex
42+
jpeg
43+
microwatt
44+
riscv32i
45+
#=============================================================================
46+
sky130hs/: (0/6)
47+
aes
48+
coyote_tc
49+
gcd
50+
ibex
51+
jpeg
52+
riscv32i
53+
#=============================================================================

0 commit comments

Comments
 (0)