Skip to content

Commit 7d0999e

Browse files
committed
ci: add option to build with Verific
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent aec1d8d commit 7d0999e

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

build_openroad.sh

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ OPENROAD_APP_ARGS=""
2929
DOCKER_OS_NAME="ubuntu22.04"
3030
PROC=-1
3131

32+
VERIFIC_COMPONENTS='database util containers pct hier_tree verilog'
33+
WITH_VERIFIC=0
34+
VERIFIC_DIR=""
35+
3236
function usage() {
3337
cat << EOF
3438
3539
Usage: $0 [-h|--help] [-o|--local] [-l|--latest]
3640
[--or_branch BRANCH_NAME] [--or_repo REPO_URL] [--no_init]
3741
[-n|--nice] [-t|--threads N]
3842
[--yosys-args-overwrite] [--yosys-args STRING]
43+
[--with-verific PATH]
3944
[--openroad-args-overwrite] [--openroad-args STRING]
4045
[--install-path PATH] [--clean] [--clean-force]
4146
@@ -67,6 +72,9 @@ Options:
6772
6873
--yosys-args STRING Additional compilation flags for Yosys compilation.
6974
75+
--with-verific PATH Compile Yosys with Verific support. PATH is the path
76+
to the Verific source folder.
77+
7078
--openroad-args-overwrite
7179
Do not use default flags set by this scrip during
7280
OpenROAD app compilation.
@@ -140,6 +148,19 @@ while (( "$#" )); do
140148
YOSYS_USER_ARGS="$2"
141149
shift
142150
;;
151+
--with-verific)
152+
YOSYS_USER_ARGS+=" ENABLE_VERIFIC=1"
153+
YOSYS_USER_ARGS+=" ENABLE_VERIFIC_VHDL=0"
154+
YOSYS_USER_ARGS+=" VERIFIC_COMPONENTS='${VERIFIC_COMPONENTS}'"
155+
VERIFIC_DIR=${2}
156+
if [ ! -d "${VERIFIC_DIR}" ]; then
157+
echo "[ERROR] Verific path '${VERIFIC_DIR}' does not exist." >&2
158+
exit 1
159+
fi
160+
YOSYS_USER_ARGS+=" VERIFIC_DIR=${VERIFIC_DIR}"
161+
WITH_VERIFIC=1
162+
shift
163+
;;
143164
--openroad-args-overwrite)
144165
OPENROAD_APP_OVERWRITE_ARGS=1
145166
;;
@@ -254,13 +275,27 @@ __local_build()
254275
git --work-tree=${YOSYS_ABC_PATH} --git-dir=${YOSYS_ABC_PATH}/.git update-index --refresh
255276
fi
256277

278+
if [ ${WITH_VERIFIC} -eq 1 ]; then
279+
echo "[INFO FLW-0031] Compiling Verific components."
280+
cp -r "${VERIFIC_DIR}" verific
281+
for c in ${VERIFIC_COMPONENTS}; do
282+
make -j -C "verific/${c}" clean
283+
make -j -C "verific/${c}"
284+
done
285+
fi
286+
257287
echo "[INFO FLW-0017] Compiling Yosys."
258-
${NICE} make install -C tools/yosys -j "${PROC}" ${YOSYS_ARGS}
288+
eval ${NICE} make install -C tools/yosys -j "${PROC}" ${YOSYS_ARGS}
259289

260290
echo "[INFO FLW-0030] Compiling yosys-slang."
261291
# CMAKE_FLAGS added to work around yosys-slang#141 (unable to build outside of git checkout)
262292
${NICE} make install -C tools/yosys-slang -j "${PROC}" YOSYS_PREFIX="${INSTALL_PATH}/yosys/bin/" CMAKE_FLAGS="-DYOSYS_SLANG_REVISION=unknown -DSLANG_REVISION=unknown"
263293

294+
if [ ${WITH_VERIFIC} -eq 1 ]; then
295+
echo "[INFO FLW-0032] Cleaning up Verific components."
296+
rm -rf verific
297+
fi
298+
264299
}
265300

266301
__update_openroad_app_remote()

0 commit comments

Comments
 (0)