-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Update Verilator version to v5.008 (#1566)
Signed-off-by: Saad Waheed <[email protected]>
- Loading branch information
1 parent
9e47cc6
commit 5841984
Showing
3 changed files
with
41 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,44 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) | ||
cd $ROOT/tmp | ||
|
||
if [ -z ${NUM_JOBS} ]; then | ||
NUM_JOBS=1 | ||
NUM_JOBS=4 | ||
fi | ||
|
||
if [ ! -e "$VERILATOR_ROOT/bin/verilator" ]; then | ||
echo "Installing Verilator" | ||
rm -f verilator*.tgz | ||
wget https://www.veripool.org/ftp/verilator-4.014.tgz | ||
tar xzf verilator*.tgz | ||
rm -f verilator*.tgz | ||
cd verilator-4.014 | ||
mkdir -p $VERILATOR_ROOT | ||
# copy scripts | ||
autoconf && ./configure --prefix="$VERILATOR_ROOT" && make -j${NUM_JOBS} | ||
cp -r * $VERILATOR_ROOT/ | ||
make test | ||
VERILATOR_REPO="https://github.com/verilator/verilator.git" | ||
VERILATOR_BRANCH="master" | ||
# Use the release tag instead of a full SHA1 hash. | ||
VERILATOR_HASH="v5.008" | ||
VERILATOR_PATCH="$ROOT/verif/regress/verilator-v5.patch" | ||
|
||
VERILATOR_BUILD_DIR=$PWD/verilator-$VERILATOR_HASH/verilator | ||
VERILATOR_INSTALL_DIR="$(dirname $VERILATOR_BUILD_DIR)" | ||
|
||
if [ ! -e "$VERILATOR_INSTALL_DIR/bin/verilator" ]; then | ||
echo "Building Verilator in $VERILATOR_BUILD_DIR..." | ||
echo "Verilator will be installed in $VERILATOR_INSTALL_DIR" | ||
echo "VERILATOR_REPO=$VERILATOR_REPO" | ||
echo "VERILATOR_BRANCH=$VERILATOR_BRANCH" | ||
echo "VERILATOR_HASH=$VERILATOR_HASH" | ||
echo "VERILATOR_PATCH=$VERILATOR_PATCH" | ||
mkdir -p $VERILATOR_BUILD_DIR | ||
cd $VERILATOR_BUILD_DIR | ||
sudo apt install libfl-dev help2man | ||
[ -d .git ] || git clone $VERILATOR_REPO -b $VERILATOR_BRANCH . | ||
git checkout $VERILATOR_HASH | ||
if [[ -n "$VERILATOR_PATCH" && -f "$VERILATOR_PATCH" ]] ; then | ||
git apply $VERILATOR_PATCH || true | ||
fi | ||
# Generate the config script and configure Verilator. | ||
autoconf && ./configure --prefix="$VERILATOR_INSTALL_DIR" && make -j${NUM_JOBS} | ||
# FORNOW: Accept failure in 'make test' (segfault issue on Debian10) | ||
make test || true | ||
echo "Installing Verilator in $VERILATOR_INSTALL_DIR..." | ||
make install | ||
else | ||
echo "Using Verilator from cached directory." | ||
echo "Using Verilator from cached directory $VERILATOR_INSTALL_DIR." | ||
fi | ||
|
||
cd $ROOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters