Skip to content

Commit

Permalink
[DEBUG] tools: openroad: Build yosys and plugins in debug mode
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Czarnecki <[email protected]>
  • Loading branch information
lpawelcz committed Jul 7, 2023
1 parent c977ed9 commit e02cfbe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/openroad/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ test-physical-design-flow: openroad-flow-fixup-time | $(CONDA_ENV_PYTHON)
synthesis-tools:
git submodule update --init ${YOSYS_SV_SUBMODULE} && \
cd ${YOSYS_SV_SUBMODULE} && \
git restore . && \
git apply ${TOP_DIR}/yosys_sv.patch && \
git submodule update --init --recursive Surelog yosys yosys-f4pga-plugins && \
./build_binaries.sh

Expand Down
22 changes: 22 additions & 0 deletions tools/openroad/yosys_sv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/build_binaries.sh b/build_binaries.sh
index 301215c..f40de8d 100755
--- a/build_binaries.sh
+++ b/build_binaries.sh
@@ -37,7 +37,7 @@ cd ..
#Yosys
if [ "$SKIP_YOSYS" -eq "0" ]; then
cd yosys
-make CONFIG=gcc PREFIX=$INSTALL_PATH install -j $(nproc)
+make CONFIG=gcc PREFIX=$INSTALL_PATH STRIP:=/bin/true SANITIZER:=address ENABLE_DEBUG:=1 install -j $(nproc)
cd ..
fi
#UHDM plugin
@@ -45,7 +45,7 @@ if [ "$PLUGIN_ASAN" -eq "1" ]; then
PLUGIN_LDFLAGS="-fsanitize=address -fcheck-new -fno-omit-frame-pointer -static-libasan"
fi
export PATH=$INSTALL_PATH/bin:${PATH}
-UHDM_INSTALL_DIR=$INSTALL_PATH LDFLAGS=$PLUGIN_LDFLAGS make -C $PWD/yosys-f4pga-plugins/ install -j$(nproc)
+UHDM_INSTALL_DIR=$INSTALL_PATH LDFLAGS=$PLUGIN_LDFLAGS make -C $PWD/yosys-f4pga-plugins/ EXTRA_FLAGS:='-g' install -j$(nproc)
#sv2v
if [ "$BUILD_SV2V" -eq "1" ]; then
wget -qO- https://get.haskellstack.org/ | sh -s - -f -d $INSTALL_PATH/bin

0 comments on commit e02cfbe

Please sign in to comment.