Skip to content

Commit 38fc533

Browse files
committed
Merge branch 'master' into working_at_params
2 parents 04e03cd + 4ea3a03 commit 38fc533

File tree

144 files changed

+18720
-17760
lines changed

Some content is hidden

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

144 files changed

+18720
-17760
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ flow/run-me*.sh
1616
flow/vars*.sh
1717
flow/vars*.tcl
1818
flow/vars*.gdb
19-
flow/versions.txt
2019

2120
# Common temp files
2221
flow/*.log

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ flow/run-me*.sh
2020
flow/vars*.sh
2121
flow/vars*.tcl
2222
flow/vars*.gdb
23-
flow/versions.txt
2423

2524
# Common temp files
2625
flow/pt_shell_command.log

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ binaries, including OpenROAD, Yosys and Klayout. See instructions
8080
> **Disclaimer** The versions of OpenROAD, Yosys and Klayout provided by
8181
> other third-party vendors are not guaranteed to work with ORFS.
8282
83-
### Local Installation
83+
### Build from sources locally
8484

85-
Document for detailed local installation steps found [here](./docs/user/BuildLocally.md).
85+
Document for detailed local build from sources and installation steps found [here](./docs/user/BuildLocally.md).
8686

8787
## Using the Flow
8888

docs/user/BuildWithDocker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can restrict the number of CPUs with the `-t|--threads N` argument:
7171
The binaries are only available from inside a Docker container. Here is an example of starting a container from the created Docker image.
7272

7373
``` shell
74-
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22-builder
74+
docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/flow:/OpenROAD-flow-scripts/flow openroad/flow-ubuntu22.04-builder
7575
```
7676

7777
Then, inside docker:

docs/user/FlowVariables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ configuration file.
239239

240240
| Variable | Description |
241241
|--------------------------|----------------------------------------------------------------------------------------------------|
242+
| `ADDITIONAL_FILES` | Additional files to be added to `make issue` archive |
242243
| `ADDITIONAL_LEFS` | Hardened macro LEF view files listed here. |
243244
| `ADDITIONAL_LIBS` | Hardened macro library files listed here. |
244245
| `ADDITIONAL_GDS` | Hardened macro GDS files listed here. |

env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
2121
export PATH="$(brew --prefix bison)/bin:$(brew --prefix flex)/bin:$(brew --prefix tcl-tk)/bin:$PATH"
2222
export CMAKE_PREFIX_PATH="$(brew --prefix or-tools)"
2323
fi
24+
25+
export FLOW_HOME=$DIR/flow

flow/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ settings.mk
22
vars.sh
33
vars.gdb
44
vars.tcl
5-
copyright.txt

flow/Makefile

Lines changed: 55 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export RESYNTH_TIMING_RECOVER ?= 0
190190
export ABC_AREA ?= 0
191191

192192
# Global setting for Synthesis
193-
export SYNTH_ARGS ?= -flatten
193+
export SYNTH_ARGS ?= -flatten -extra-map $(FLOW_HOME)/platforms/common/lcu_kogge_stone.v
194194

195195
# Global setting for Floorplan
196196
export PLACE_PINS_ARGS
@@ -241,24 +241,24 @@ export RTLMP_RPT_FILE ?= partition.txt
241241
export RTLMP_BLOCKAGE_FILE ?= $(OBJECTS_DIR)/rtlmp/partition.txt.blockage
242242

243243
#-------------------------------------------------------------------------------
244-
ifeq (, $(strip $(NPROC)))
244+
ifeq (,$(strip $(NUM_CORES)))
245245
# Linux (utility program)
246-
NPROC := $(shell nproc 2>/dev/null)
246+
NUM_CORES := $(shell nproc 2>/dev/null)
247247

248-
ifeq (, $(strip $(NPROC)))
248+
ifeq (,$(strip $(NUM_CORES)))
249249
# Linux (generic)
250-
NPROC := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
250+
NUM_CORES := $(shell grep -c ^processor /proc/cpuinfo 2>/dev/null)
251251
endif
252-
ifeq (, $(strip $(NPROC)))
252+
ifeq (,$(strip $(NUM_CORES)))
253253
# BSD (at least FreeBSD and Mac OSX)
254-
NPROC := $(shell sysctl -n hw.ncpu 2>/dev/null)
254+
NUM_CORES := $(shell sysctl -n hw.ncpu 2>/dev/null)
255255
endif
256-
ifeq (, $(strip $(NPROC)))
256+
ifeq (,$(strip $(NUM_CORES)))
257257
# Fallback
258-
NPROC := 1
258+
NUM_CORES := 1
259259
endif
260260
endif
261-
export NUM_CORES := $(NPROC)
261+
export NUM_CORES
262262

263263
export LSORACLE_CMD ?= $(shell command -v lsoracle)
264264
ifeq ($(LSORACLE_CMD),)
@@ -275,10 +275,11 @@ YOSYS_FLAGS += -v 3
275275

276276
#-------------------------------------------------------------------------------
277277
# setup all commands used within this flow
278-
TIME_CMD = /usr/bin/time -f 'Elapsed time: %E[h:]min:sec. CPU time: user %U sys %S (%P). Peak memory: %MKB.'
278+
export TIME_BIN ?= /usr/bin/time
279+
TIME_CMD = $(TIME_BIN) -f 'Elapsed time: %E[h:]min:sec. CPU time: user %U sys %S (%P). Peak memory: %MKB.'
279280
TIME_TEST = $(shell $(TIME_CMD) echo foo 2>/dev/null)
280-
ifeq (, $(strip $(TIME_TEST)))
281-
TIME_CMD = /usr/bin/time
281+
ifeq (,$(strip $(TIME_TEST)))
282+
TIME_CMD = $(TIME_BIN)
282283
endif
283284

284285
# The following determine the executable location for each tool used by this flow.
@@ -364,9 +365,10 @@ $(foreach block,$(BLOCKS),$(eval ./results/$(PLATFORM)/$(DESIGN_NICKNAME)_$(bloc
364365
#-------------------------------------------------------------------------------
365366
.PHONY: versions.txt
366367
versions.txt:
367-
@$(YOSYS_CMD) -V > $@
368-
@echo openroad `$(OPENROAD_EXE) -version` >> $@
369-
@$(KLAYOUT_CMD) -zz -v >> $@
368+
mkdir -p $(OBJECTS_DIR)
369+
@$(YOSYS_CMD) -V > $(OBJECTS_DIR)/$@
370+
@echo openroad `$(OPENROAD_EXE) -version` >> $(OBJECTS_DIR)/$@
371+
@$(KLAYOUT_CMD) -zz -v >> $(OBJECTS_DIR)/$@
370372

371373
# Pre-process libraries
372374
# ==============================================================================
@@ -458,12 +460,18 @@ synth-report: synth
458460
do-synth-report:
459461
($(TIME_CMD) $(OPENROAD_CMD) $(SCRIPTS_DIR)/synth_metrics.tcl) 2>&1 | tee -a $(LOG_DIR)/1_1_yosys.log
460462

463+
.PHONY: memory
464+
memory: $(RESULTS_DIR)/mem.json
465+
python3 $(SCRIPTS_DIR)/mem_dump.py $(RESULTS_DIR)/mem.json
466+
461467
# ==============================================================================
462468

463469

464470
# Run Synthesis using yosys
465471
#-------------------------------------------------------------------------------
466-
SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl
472+
473+
export SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl
474+
export SYNTH_MEMORY_MAX_BITS ?= 4096
467475

468476
$(SYNTH_STOP_MODULE_SCRIPT):
469477
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
@@ -484,7 +492,7 @@ yosys-dependencies: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LI
484492

485493
.PHONY: do-yosys
486494
do-yosys: yosys-dependencies
487-
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
495+
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
488496
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SYNTH_SCRIPT)) 2>&1 | tee $(LOG_DIR)/1_1_yosys.log
489497

490498
$(RESULTS_DIR)/1_1_yosys.v: $(SDC_FILE_CLOCK_PERIOD)
@@ -504,7 +512,7 @@ $(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_1_yosys.v
504512

505513
.PHONY: clean_synth
506514
clean_synth:
507-
rm -f $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc
515+
rm -f $(RESULTS_DIR)/1_*.v $(RESULTS_DIR)/1_synth.sdc $(RESULTS_DIR)/mem.json
508516
rm -f $(REPORTS_DIR)/synth_*
509517
rm -f $(LOG_DIR)/1_*
510518
rm -f $(SYNTH_STOP_MODULE_SCRIPT)
@@ -536,9 +544,22 @@ UNSET_VARS = for var in $(UNSET_VARIABLES_NAMES); do unset $$var; done
536544
SUB_MAKE = $(MAKE) $(foreach V,$(COMMAND_LINE_ARGS), $(if $($V),$V=$(shell echo "$($V)" | $(FLOW_HOME)/scripts/escape.sh),$V='')) --no-print-directory DESIGN_CONFIG=$(DESIGN_CONFIG)
537545
UNSET_AND_MAKE = @bash -c '$(UNSET_VARS); $(SUB_MAKE) $$@' --
538546

539-
copyright.txt:
547+
$(OBJECTS_DIR)/copyright.txt:
540548
@$(OPENROAD_CMD) $(SCRIPTS_DIR)/noop.tcl
541-
@touch copyright.txt
549+
mkdir -p $(OBJECTS_DIR)
550+
@touch $(OBJECTS_DIR)/copyright.txt
551+
552+
define OPEN_GUI_SHORTCUT
553+
.PHONY: gui_$(1) open_$(1)
554+
gui_$(1): gui_$(2)
555+
open_$(1): open_$(2)
556+
endef
557+
558+
define OPEN_GUI
559+
.PHONY: $(1)_$(2)
560+
$(1)_$(2):
561+
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
562+
endef
542563

543564
# Separate dependency checking and doing a step. This can
544565
# be useful to retest a stage without having to delete the
@@ -569,11 +590,18 @@ define do-step
569590
$(if $(5),$(5),$(RESULTS_DIR))/$(1)$(if $(4),$(4),.odb): $(2)
570591
$$(UNSET_AND_MAKE) do-$(1)
571592

593+
ifeq ($(if $(4),$(4),.odb),.odb)
594+
.PHONY: $(1)
595+
$(1): $(RESULTS_DIR)/$(1).odb
596+
597+
$(eval $(call OPEN_GUI_SHORTCUT,$(1),$(1).odb))
598+
endif
599+
572600
.PHONY: do-$(1)
573-
do-$(1): copyright.txt
574-
@echo Running $(3).tcl
601+
do-$(1): $(OBJECTS_DIR)/copyright.txt
602+
@echo Running $(3).tcl, stage $(1)
575603
@(trap 'mv $(LOG_DIR)/$(1).tmp.log $(LOG_DIR)/$(1).log' EXIT; \
576-
$(OPENROAD_CMD) $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
604+
$(OPENROAD_EXE) -exit $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
577605
$(TIME_CMD) $(OPENROAD_CMD) -no_splash $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json 2>&1 | \
578606
tee -a $(LOG_DIR)/$(1).tmp.log)
579607
endef
@@ -858,49 +886,11 @@ do-finish:
858886
mkdir -p $(LOG_DIR) $(REPORTS_DIR)
859887
$(UNSET_AND_MAKE) do-6_1_fill do-6_1_fill.sdc do-6_final.sdc do-6_report do-gds elapsed
860888

861-
.PHONY: skip_place
862-
skip_place: $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/2_floorplan.sdc
863-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_1_place_gp_skip_io.odb
864-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_2_place_iop.odb
865-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_3_place_gp.odb
866-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_4_place_resized.odb
867-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_5_place_dp.odb
868-
cp $(RESULTS_DIR)/2_floorplan.odb $(RESULTS_DIR)/3_place.odb
869-
cp $(RESULTS_DIR)/2_floorplan.sdc $(RESULTS_DIR)/3_place.sdc
870-
871-
.PHONY: skip_resize
872-
skip_resize: $(RESULTS_DIR)/3_3_place_gp.odb
873-
cp $(RESULTS_DIR)/3_3_place_gp.odb $(RESULTS_DIR)/3_4_place_resized.odb
874-
875-
.PHONY: skip_cts
876-
skip_cts: $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/3_place.sdc
877-
# mock all intermediate results
878-
cp $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/4_1_cts.odb
879-
cp $(RESULTS_DIR)/3_place.sdc $(RESULTS_DIR)/4_cts.sdc
880-
cp $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/4_cts.odb
881-
882-
.PHONY: skip_route
883-
skip_route: $(RESULTS_DIR)/4_cts.odb $(RESULTS_DIR)/4_cts.sdc
884-
cp $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/5_1_grt.odb
885-
cp $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/5_2_route.odb
886-
cp $(RESULTS_DIR)/3_place.odb $(RESULTS_DIR)/6_1_fill.odb
887-
touch $(RESULTS_DIR)/6_final.spef
888-
889-
# A mock abstract is a fully or partially eviscerated macro. A mock
890-
# abstract can be useful when creating bug reports, previewing
891-
# macro placement, testing detailed routing, or other quick smoke-tests
892-
# at the top level.
893-
#
894-
# When creating a mock abstract, depending on what needs to be tested,
895-
# stages can be skipped.
896-
#
897-
# Leave out "skip_" targes as approperiate:
898-
#
899-
# make skip_place skip_cts skip_route generate_abstract
900889
.PHONY: generate_abstract
901890
generate_abstract: $(RESULTS_DIR)/6_final.gds $(RESULTS_DIR)/6_final.def $(RESULTS_DIR)/6_final.v $(RESULTS_DIR)/6_final.sdc
902891
$(UNSET_AND_MAKE) do-generate_abstract
903892

893+
# Set ABSTRACT_SOURCE if you want to create an abstract from another stage than 6_final.
904894
.PHONY: do-generate_abstract
905895
do-generate_abstract:
906896
mkdir -p $(LOG_DIR) $(REPORTS_DIR)
@@ -1023,7 +1013,7 @@ nuke: clean_test clean_issues
10231013
rm -rf ./results ./logs ./reports ./objects
10241014
rm -rf layer_*.mps macrocell.list *best.plt *_pdn.def
10251015
rm -rf *.rpt *.rpt.old *.def.v pin_dumper.log
1026-
rm -f versions.txt copyright.txt dummy.guide
1016+
rm -f $(OBJECTS_DIR)/versions.txt $(OBJECTS_DIR)/copyright.txt dummy.guide
10271017

10281018
.PHONY: vars
10291019
vars:
@@ -1058,24 +1048,13 @@ gui_synth:
10581048
open_synth:
10591049
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
10601050

1061-
define OPEN_GUI_SHORTCUT
1062-
.PHONY: gui_$(1) open_$(1)
1063-
gui_$(1): gui_$(2)
1064-
open_$(1): open_$(2)
1065-
endef
1066-
10671051
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
10681052
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
10691053
$(eval $(call OPEN_GUI_SHORTCUT,cts,4_cts.odb))
10701054
$(eval $(call OPEN_GUI_SHORTCUT,route,5_route.odb))
1055+
$(eval $(call OPEN_GUI_SHORTCUT,grt,5_1_grt.odb))
10711056
$(eval $(call OPEN_GUI_SHORTCUT,final,6_final.odb))
10721057

1073-
define OPEN_GUI
1074-
.PHONY: $(1)_$(2)
1075-
$(1)_$(2):
1076-
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
1077-
endef
1078-
10791058
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,gui,$(file),DEF_FILE,$(OPENROAD_GUI_CMD))))
10801059
$(foreach file,$(RESULTS_ODB),$(eval $(call OPEN_GUI,gui,$(file),ODB_FILE,$(OPENROAD_GUI_CMD))))
10811060
$(foreach file,$(RESULTS_DEF),$(eval $(call OPEN_GUI,open,$(file),DEF_FILE,$(OPENROAD_NO_EXIT_CMD))))

flow/designs/asap7/aes-block/block.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ export CORE_MARGIN = 2
1111
export PLACE_DENSITY = 0.70
1212

1313
export PLACE_PINS_ARGS = -annealing
14-
14+
export HAS_IO_CONSTRAINTS = 0

flow/designs/asap7/aes-block/config.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export SYNTH_HIERARCHICAL = 1
1818
export RTLMP_FLOW = True
1919

2020
export PLACE_PINS_ARGS = -annealing
21+
export HAS_IO_CONSTRAINTS = 0
2122

2223
# Generous routing at top level
2324
export MIN_ROUTING_LAYER = M2

0 commit comments

Comments
 (0)