Skip to content

Commit 0a069b3

Browse files
committed
Merge branch 'master' into do-gpl-skip-io-with-constraints
Signed-off-by: Matt Liberty <[email protected]>
2 parents d0a2243 + a0615e8 commit 0a069b3

File tree

64 files changed

+94971
-1085
lines changed

Some content is hidden

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

64 files changed

+94971
-1085
lines changed

.github/workflows/github-actions-cron-sync-fork-from-upstream.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
description: Use GitHub --force push.
1111
default:
1212

13-
repository_dispatch:
14-
1513

1614
jobs:
1715
Sync-Branch-From-Upstream:

.github/workflows/github-actions-update-rules.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@ jobs:
1313
- name: Check out repository code recursively
1414
uses: actions/checkout@v3
1515
with:
16-
submodules: recursive
1716
fetch-depth: 0
17+
- name: Git prep
18+
run: |
19+
git config --add remote.origin.fetch "+refs/pull/*/head:refs/remotes/origin/pr/*"
20+
git fetch
21+
git checkout "origin/pr/${{ github.event.client_payload.branch }}"
1822
- uses: actions/setup-python@v4
1923
with:
2024
python-version: "3.10"
@@ -29,9 +33,9 @@ jobs:
2933
echo ${{ github.event_name }}
3034
echo ${{ github.event.client_payload.type }}
3135
if [[ "${{ github.event_name }}" == "repository_dispatch" && "${{ github.event.client_payload.type }}" == "overwrite" ]]; then
32-
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --overwrite
36+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA ${{ github.event.client_payload.commitsha }} --overwrite
3337
else
34-
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL}
38+
python flow/util/updateRules.py --keyFile "${CREDS_FILE}" --apiURL ${API_BASE_URL} --commitSHA ${{ github.event.client_payload.commitsha }}
3539
fi
3640
- name: Push updated rules
3741
id: remote-update
@@ -44,8 +48,13 @@ jobs:
4448
echo "has_update=false" >> "$GITHUB_OUTPUT"
4549
fi
4650
git add .
47-
git commit -m "flow: update rules based on new golden reference"
48-
- if: "steps.remote-update.outputs.has_update == 'true'"
51+
git commit --signoff -m "flow: update rules based on new golden reference"
52+
- if: "github.event.client_payload.branch != 'master'"
53+
name: update rules pr
54+
id: remote-update-pr
55+
run: |
56+
git push origin "HEAD:refs/pull/${{ github.event.client_payload.branch }}/head"
57+
- if: "steps.remote-update.outputs.has_update == 'true' && github.event.client_payload.branch == 'master'"
4958
name: Create Draft PR
5059
uses: peter-evans/create-pull-request@v5
5160
with:

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44
[submodule "tools/OpenROAD"]
55
path = tools/OpenROAD
66
url = ../OpenROAD.git
7-
[submodule "tools/LSOracle"]
8-
path = tools/LSOracle
9-
url = ../../The-OpenROAD-Project/LSOracle.git

Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ WORKDIR /OpenROAD-flow-scripts
55

66
# synthesis tools binaries and plugins
77
COPY --from=openroad/yosys /install ./tools/install/yosys
8-
COPY --from=openroad/lsoracle /LSOracle/build/core/lsoracle ./tools/build/LSOracle/bin/lsoracle
9-
COPY --from=openroad/lsoracle /LSOracle/core/test.ini ./tools/build/LSOracle/share/lsoracle/test.ini
10-
COPY --from=openroad/lsoracle /LSOracle/build/yosys-plugin/oracle.so /OpenROAD-flow/tools/build/yosys/share/yosys/plugins/
118

129
# openroad binary
1310
COPY --from=openroad/ubuntu22.04-builder-gcc /OpenROAD/build/src/openroad ./tools/install/OpenROAD/bin/openroad

build_openroad.sh

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ YOSYS_ARGS="CONFIG=clang"
2525
OPENROAD_APP_USER_ARGS=""
2626
OPENROAD_APP_ARGS=""
2727

28-
LSORACLE_USER_ARGS=""
29-
LSORACLE_ARGS="\
30-
-D CMAKE_BUILD_TYPE=RELEASE \
31-
-D YOSYS_INCLUDE_DIR=$(pwd)/tools/yosys \
32-
-D YOSYS_PLUGIN=ON \
33-
"
34-
3528
DOCKER_OS_NAME="ubuntu22.04"
3629
PROC=-1
3730

@@ -43,7 +36,6 @@ Usage: $0 [-h|--help] [-o|--local] [-l|--latest]
4336
[-n|--nice] [-t|--threads N]
4437
[--yosys-args-overwrite] [--yosys-args STRING]
4538
[--openroad-args-overwrite] [--openroad-args STRING]
46-
[--lsoracle-args-overwrite] [--lsoracle-args STRING]
4739
[--install-path PATH] [--clean] [--clean-force]
4840
4941
[-c|--copy-platforms]
@@ -79,16 +71,6 @@ Options:
7971
--openroad-args STRING Aditional compilation flags for OpenROAD app
8072
compilation.
8173
82-
--lsoracle-enable Compile LSOracle. Disable by default as it is not
83-
currently used on the flow.
84-
85-
--lsoracle-args-overwrite
86-
Do not use default flags set by this script during
87-
LSOracle compilation.
88-
89-
--lsoracle-args STRING Aditional compilation flags for LSOracle
90-
compilation.
91-
9274
--install-path PATH Path to install tools. Default is ${INSTALL_PATH}.
9375
9476
--clean Call git clean interactively before compile.
@@ -159,16 +141,6 @@ while (( "$#" )); do
159141
OPENROAD_APP_USER_ARGS="$2"
160142
shift
161143
;;
162-
--lsoracle-enable)
163-
LSORACLE_ENABLE=1
164-
;;
165-
--lsoracle-args-overwrite)
166-
LSORACLE_OVERWIRTE_ARGS=1
167-
;;
168-
--lsoracle-args)
169-
LSORACLE_USER_ARGS="$2"
170-
shift
171-
;;
172144
--install-path)
173145
INSTALL_PATH="$2"
174146
shift
@@ -215,10 +187,6 @@ if [ -n "$CMAKE_INSTALL_RPATH" ]; then
215187
OPENROAD_APP_ARGS+=" -D CMAKE_INSTALL_RPATH=${CMAKE_INSTALL_RPATH}"
216188
OPENROAD_APP_ARGS+=" -D CMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE"
217189
fi
218-
LSORACLE_ARGS+=" \
219-
-D YOSYS_SHARE_DIR=${INSTALL_PATH}/yosys/share/yosys \
220-
-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH}/LSOracle \
221-
"
222190

223191
__args_setup() {
224192
if [ ! -z "${YOSYS_OVERWIRTE_ARGS+x}" ]; then
@@ -234,13 +202,6 @@ __args_setup() {
234202
else
235203
OPENROAD_APP_ARGS+=" ${OPENROAD_APP_USER_ARGS}"
236204
fi
237-
238-
if [ ! -z "${LSORACLE_OVERWIRTE_ARGS+x}" ]; then
239-
echo "[INFO FLW-0016] Overwriting LSOracle compilation flags."
240-
LSORACLE_ARGS="${LSORACLE_USER_ARGS}"
241-
else
242-
LSORACLE_ARGS+=" ${LSORACLE_USER_ARGS}"
243-
fi
244205
}
245206

246207
__docker_build()
@@ -287,12 +248,6 @@ __local_build()
287248
echo "[INFO FLW-0018] Compiling OpenROAD."
288249
eval ${NICE} cmake tools/OpenROAD -B tools/OpenROAD/build ${OPENROAD_APP_ARGS}
289250
${NICE} cmake --build tools/OpenROAD/build --target install -j "${PROC}"
290-
291-
if [ ! -z "${LSORACLE_ENABLE+x}" ]; then
292-
echo "[INFO FLW-0019] Compiling LSOracle."
293-
${NICE} cmake tools/LSOracle -B tools/LSOracle/build ${LSORACLE_ARGS}
294-
${NICE} cmake --build tools/LSOracle/build --target install -j "${PROC}"
295-
fi
296251
}
297252

298253
__update_openroad_app_remote()

docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ Options for `./build_openroad.sh` script
9191
| `--yosys-args STRING` | Aditional compilation flags for Yosys compilation. |
9292
| `--openroad-args-overwrite` | Do not use default flags set by this script during OpenROAD app compilation. |
9393
| `--openroad-args STRING` | Aditional compilation flags for OpenROAD app compilation. |
94-
| `--lsoracle-enable` | Compile LSOracle. Disable by default as it is not currently used on the flow. |
95-
| `--lsoracle-args-overwrite` | Do not use default flags set by this scrip during LSOracle compilation. |
96-
| `--lsoracle-args STRING` | Aditional compilation flags for LSOracle compilation. |
9794
| `--install-path PATH` | Path to install tools. Default is `${INSTALL_PATH}`. |
9895
| `--clean` | Call git clean interactively before compile. Useful to remove old build files. |
9996
| `--clean-force` | Call git clean before compile. WARNING: this option will not ask for confirmation. Useful to remove old build files. |

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ Note:
144144
| `IO_PLACER_H` | The metal layer on which to place the I/O pins horizontally (top and bottom of the die). |
145145
| `IO_PLACER_V` | The metal layer on which to place the I/O pins vertically (sides of the die). |
146146
| `GUI_NO_TIMING` | Skip loading timing for a faster GUI load. |
147+
| `GUI_SOURCE` | Source the script. |
148+
| `GUI_ARGS` | OpenROAD command line options for gui_ and open_ targets, typically set tup `-exit` in combination with GUI_SOURCE to run a script and exit. |
147149

148150

149151
### Placement

env.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ echo "OPENROAD: ${OPENROAD}"
1313

1414
export PATH=${DIR}/tools/install/OpenROAD/bin:$PATH
1515
export PATH=${DIR}/tools/install/yosys/bin:$PATH
16-
export PATH=${DIR}/tools/install/LSOracle/bin:$PATH
1716
export PATH=${DIR}/dependencies/bin:$PATH
1817

1918
if [[ "$OSTYPE" == "darwin"* ]]; then

etc/DependencyInstaller.sh

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ _installUbuntuPackages() {
7171
export DEBIAN_FRONTEND="noninteractive"
7272
apt-get -y update
7373
apt-get -y install --no-install-recommends \
74+
curl \
7475
libqt5multimediawidgets5 \
7576
libqt5svg5-dev \
7677
libqt5xmlpatterns5-dev \
@@ -103,24 +104,6 @@ _installUbuntuPackages() {
103104
cd ${lastDir}
104105
rm -rf "${baseDir}"
105106
fi
106-
}
107-
108-
_installDarwinPackages() {
109-
brew install libffi tcl-tk ruby
110-
brew install python libomp
111-
brew link --force libomp
112-
brew install --cask klayout
113-
}
114-
115-
_installCI() {
116-
apt-get -y update
117-
apt-get -y install --no-install-recommends \
118-
apt-transport-https \
119-
ca-certificates \
120-
coreutils \
121-
curl \
122-
python3 \
123-
software-properties-common
124107

125108
# Add Docker's official GPG key:
126109
install -m 0755 -d /etc/apt/keyrings
@@ -138,8 +121,26 @@ _installCI() {
138121
docker-ce \
139122
docker-ce-cli \
140123
containerd.io \
141-
docker-buildx-plugin \
124+
docker-buildx-plugin
125+
}
126+
127+
_installDarwinPackages() {
128+
brew install libffi tcl-tk ruby
129+
brew install python libomp
130+
brew link --force libomp
131+
brew install --cask klayout
132+
brew install docker docker-buildx
133+
}
142134

135+
_installCI() {
136+
apt-get -y update
137+
apt-get -y install --no-install-recommends \
138+
apt-transport-https \
139+
ca-certificates \
140+
coreutils \
141+
curl \
142+
python3 \
143+
software-properties-common
143144
}
144145

145146
_help() {

flow/Makefile

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,6 @@ ifeq (,$(strip $(NUM_CORES)))
269269
endif
270270
export NUM_CORES
271271

272-
export LSORACLE_CMD ?= $(shell command -v lsoracle)
273-
ifeq ($(LSORACLE_CMD),)
274-
LSORACLE_CMD = $(abspath $(FLOW_HOME)/../tools/install/LSOracle/bin/lsoracle)
275-
endif
276-
277-
LSORACLE_PLUGIN ?= $(abspath $(FLOW_HOME)/../tools/install/yosys/share/yosys/plugin/oracle.so)
278-
export LSORACLE_KAHYPAR_CONFIG ?= $(abspath $(FLOW_HOME)/../tools/install/LSOracle/share/lsoracle/test.ini)
279-
ifneq ($(USE_LSORACLE),)
280-
YOSYS_FLAGS ?= -m $(LSORACLE_PLUGIN)
281-
endif
282-
283272
YOSYS_FLAGS += -v 3
284273

285274
#-------------------------------------------------------------------------------
@@ -298,7 +287,7 @@ endif
298287
export OPENROAD_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/openroad)
299288
export OPENSTA_EXE ?= $(abspath $(FLOW_HOME)/../tools/install/OpenROAD/bin/sta)
300289

301-
OPENROAD_ARGS = -no_init $(OR_ARGS)
290+
OPENROAD_ARGS = -no_init -threads $(NUM_CORES) $(OR_ARGS)
302291
OPENROAD_CMD = $(OPENROAD_EXE) -exit $(OPENROAD_ARGS)
303292
OPENROAD_NO_EXIT_CMD = $(OPENROAD_EXE) $(OPENROAD_ARGS)
304293
OPENROAD_GUI_CMD = $(OPENROAD_EXE) -gui $(OR_ARGS)
@@ -312,7 +301,9 @@ KLAYOUT_BIN_FROM_DIR = $(KLAYOUT_DIR)/klayout
312301
ifeq ($(wildcard $(KLAYOUT_BIN_FROM_DIR)), $(KLAYOUT_BIN_FROM_DIR))
313302
KLAYOUT_CMD ?= sh -c 'LD_LIBRARY_PATH=$(dir $(KLAYOUT_BIN_FROM_DIR)) $$0 "$$@"' $(KLAYOUT_BIN_FROM_DIR)
314303
else
315-
KLAYOUT_CMD ?= $(shell command -v klayout)
304+
ifeq ($(KLAYOUT_CMD),)
305+
KLAYOUT_CMD := $(shell command -v klayout)
306+
endif
316307
endif
317308
KLAYOUT_FOUND = $(if $(KLAYOUT_CMD),,$(error KLayout not found in PATH))
318309

@@ -404,7 +395,7 @@ do-klayout_tech:
404395
cp $(TECH_LEF) $(OBJECTS_DIR)/klayout_tech.lef
405396

406397
KLAYOUT_ENV_VAR_IN_PATH_VERSION = 0.28.11
407-
KLAYOUT_VERSION = $(shell $(KLAYOUT_CMD) -v 2>/dev/null | grep 'KLayout' | cut -d ' ' -f2)
398+
KLAYOUT_VERSION := $(shell $(KLAYOUT_CMD) -v 2>/dev/null | grep 'KLayout' | cut -d ' ' -f2)
408399

409400
KLAYOUT_ENV_VAR_IN_PATH = $(shell \
410401
if [ -z "$(KLAYOUT_VERSION)" ]; then \
@@ -499,7 +490,7 @@ $(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE)
499490
echo $(ABC_CLOCK_PERIOD_IN_PS) > $@
500491

501492
.PHONY: yosys-dependencies
502-
yosys-dependencies: $(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DONT_USE_SC_LIB) $(DFF_LIB_FILE) $(VERILOG_FILES) $(CACHED_NETLIST) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE)
493+
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)
503494

504495
.PHONY: do-yosys
505496
do-yosys:
@@ -512,10 +503,10 @@ do-yosys-canonicalize: yosys-dependencies
512503
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR) $(OBJECTS_DIR)
513504
($(TIME_CMD) $(YOSYS_CMD) $(YOSYS_FLAGS) -c $(SCRIPTS_DIR)/synth_canonicalize.tcl) 2>&1 | tee $(LOG_DIR)/1_1_yosys.log
514505

515-
$(RESULTS_DIR)/1_synth.rtlil: $(RESULTS_DIR)/1_1_yosys.v $(SDC_FILE_CLOCK_PERIOD)
506+
$(RESULTS_DIR)/1_synth.rtlil:
516507
$(UNSET_AND_MAKE) do-yosys-canonicalize
517508

518-
$(RESULTS_DIR)/1_1_yosys.v: $(RESULTS_DIR)/1_synth.rtlil $(SDC_FILE_CLOCK_PERIOD)
509+
$(RESULTS_DIR)/1_1_yosys.v: $(RESULTS_DIR)/1_synth.rtlil
519510
$(UNSET_AND_MAKE) do-yosys
520511

521512
$(RESULTS_DIR)/1_synth.sdc: $(SDC_FILE)
@@ -584,7 +575,7 @@ endef
584575
define OPEN_GUI
585576
.PHONY: $(1)_$(2)
586577
$(1)_$(2):
587-
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
578+
$(3)=$(RESULTS_DIR)/$(2) $(4) $(GUI_ARGS) $(SCRIPTS_DIR)/gui.tcl
588579
endef
589580

590581
# Separate dependency checking and doing a step. This can
@@ -630,7 +621,7 @@ do-$(1): $(OBJECTS_DIR)/copyright.txt
630621
trap 'mv $(LOG_DIR)/$(1).tmp.log $(LOG_DIR)/$(1).log' EXIT; \
631622
$(OPENROAD_EXE) -exit -no_init $(SCRIPTS_DIR)/noop.tcl 2>&1 >$(LOG_DIR)/$(1).tmp.log; \
632623
$(TIME_CMD) $(OPENROAD_CMD) -no_splash $(SCRIPTS_DIR)/$(3).tcl -metrics $(LOG_DIR)/$(1).json 2>&1 | \
633-
tee -a $(LOG_DIR)/$(1).tmp.log)
624+
tee -a $(abspath $(LOG_DIR)/$(1).tmp.log))
634625
endef
635626

636627
# generate make rules to copy a file, if a dependency change and
@@ -1056,10 +1047,10 @@ $(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): kl
10561047

10571048
.PHONY: gui_synth
10581049
gui_synth:
1059-
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
1050+
$(OPENROAD_GUI_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
10601051
.PHONY: open_synth
10611052
open_synth:
1062-
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
1053+
$(OPENROAD_NO_EXIT_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
10631054

10641055
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
10651056
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))

0 commit comments

Comments
 (0)