Skip to content

Commit 13bdf4b

Browse files
committed
Merge branch 'master' into save-cts-images
Signed-off-by: Matt Liberty <[email protected]>
2 parents 98921c7 + f02fd93 commit 13bdf4b

File tree

9 files changed

+1475
-1423
lines changed

9 files changed

+1475
-1423
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
tools
33
!tools/OpenROAD/etc/DependencyInstaller.sh
44

5+
# Build files
6+
build_openroad.log
7+
58
# Test working directories
69
flow/results
710
flow/logs

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Build working directories
44
tools/install
55

6+
# Build files
7+
build_openroad.log
8+
69
# Test working directories
710
flow/results
811
flow/logs

build_openroad.sh

Lines changed: 49 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ EOF
125125
}
126126

127127
# Parse arguments
128+
__CMD="$0 $@"
128129
while (( "$#" )); do
129130
case "$1" in
130131
-h|--help)
@@ -217,33 +218,35 @@ LSORACLE_ARGS+=" \
217218
-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH}/LSOracle \
218219
"
219220

220-
if [ ! -z "${DOCKER_OVERWIRTE_ARGS+x}" ]; then
221-
echo "[INFO FLW-0015] Overwriting Docker build flags."
222-
DOCKER_ARGS="${DOCKER_USER_ARGS}"
223-
else
224-
DOCKER_ARGS+=" ${DOCKER_USER_ARGS}"
225-
fi
221+
__args_setup() {
222+
if [ ! -z "${DOCKER_OVERWIRTE_ARGS+x}" ]; then
223+
echo "[INFO FLW-0013] Overwriting Docker build flags."
224+
DOCKER_ARGS="${DOCKER_USER_ARGS}"
225+
else
226+
DOCKER_ARGS+=" ${DOCKER_USER_ARGS}"
227+
fi
226228

227-
if [ ! -z "${YOSYS_OVERWIRTE_ARGS+x}" ]; then
228-
echo "[INFO FLW-0013] Overwriting Yosys compilation flags."
229-
YOSYS_ARGS="${YOSYS_USER_ARGS}"
230-
else
231-
YOSYS_ARGS+=" ${YOSYS_USER_ARGS}"
232-
fi
229+
if [ ! -z "${YOSYS_OVERWIRTE_ARGS+x}" ]; then
230+
echo "[INFO FLW-0014] Overwriting Yosys compilation flags."
231+
YOSYS_ARGS="${YOSYS_USER_ARGS}"
232+
else
233+
YOSYS_ARGS+=" ${YOSYS_USER_ARGS}"
234+
fi
233235

234-
if [ ! -z "${OPENROAD_APP_OVERWIRTE_ARGS+x}" ]; then
235-
echo "[INFO FLW-0014] Overwriting OpenROAD app compilation flags."
236-
OPENROAD_APP_ARGS="${OPENROAD_APP_USER_ARGS}"
237-
else
238-
OPENROAD_APP_ARGS+=" ${OPENROAD_APP_USER_ARGS}"
239-
fi
236+
if [ ! -z "${OPENROAD_APP_OVERWIRTE_ARGS+x}" ]; then
237+
echo "[INFO FLW-0015] Overwriting OpenROAD app compilation flags."
238+
OPENROAD_APP_ARGS="${OPENROAD_APP_USER_ARGS}"
239+
else
240+
OPENROAD_APP_ARGS+=" ${OPENROAD_APP_USER_ARGS}"
241+
fi
240242

241-
if [ ! -z "${LSORACLE_OVERWIRTE_ARGS+x}" ]; then
242-
echo "[INFO FLW-0013] Overwriting LSOracle compilation flags."
243-
LSORACLE_ARGS="${LSORACLE_USER_ARGS}"
244-
else
245-
LSORACLE_ARGS+=" ${LSORACLE_USER_ARGS}"
246-
fi
243+
if [ ! -z "${LSORACLE_OVERWIRTE_ARGS+x}" ]; then
244+
echo "[INFO FLW-0016] Overwriting LSOracle compilation flags."
245+
LSORACLE_ARGS="${LSORACLE_USER_ARGS}"
246+
else
247+
LSORACLE_ARGS+=" ${LSORACLE_USER_ARGS}"
248+
fi
249+
}
247250

248251
__docker_build()
249252
{
@@ -358,18 +361,31 @@ __common_setup()
358361
fi
359362
}
360363

361-
__common_setup
364+
__logging()
365+
{
366+
local log_file="build_openroad.log"
367+
echo "[INFO FLW-0027] Saving logs to ${log_file}"
368+
echo "[INFO FLW-0028] $__CMD"
369+
exec > >(tee -i "${log_file}")
370+
exec 2>&1
371+
}
362372

363-
if [ ! -z "${CLEAN_FORCE+x}" ]; then
364-
CLEAN_CMD="-x -d --force"
365-
else
366-
CLEAN_CMD="-x -d --interactive"
367-
fi
368-
if [ ! -z "${CLEAN_BEFORE+x}" ]; then
369-
echo "[INFO FLW-0016] Cleaning up previous binaries and build files."
373+
__cleanup()
374+
{
375+
if [ ! -z "${CLEAN_FORCE+x}" ]; then
376+
CLEAN_CMD="-x -d --force"
377+
else
378+
CLEAN_CMD="-x -d --interactive"
379+
fi
380+
echo "[INFO FLW-0026] Cleaning up previous binaries and build files."
370381
git clean ${CLEAN_CMD} tools
371382
git submodule foreach --recursive git clean ${CLEAN_CMD}
372-
fi
383+
}
384+
385+
__cleanup
386+
__logging
387+
__args_setup
388+
__common_setup
373389

374390
# Choose install method
375391
if [ -z "${LOCAL_BUILD+x}" ] && command -v docker &> /dev/null; then

flow/designs/nangate45/black_parrot/constraint.sdc

Lines changed: 1207 additions & 1198 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)