-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54f9efe
commit 08910f7
Showing
2 changed files
with
36 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /bin/bash | ||
|
||
# VERILATOR_ROOT="$PWD/verilator" | ||
|
||
# Clone repo only if it doesn't exist | ||
if [ ! -d $VERILATOR_ROOT ]; then | ||
cd $VERILATOR_ROOT/../ | ||
git clone https://github.com/verilator/verilator.git | ||
fi | ||
|
||
cd $VERILATOR_ROOT | ||
|
||
# Returns non-zero if no .o files exist | ||
find -name '*.o' | grep -q . | ||
|
||
# If .o files don't exist, do autoconf and do make | ||
if [ $? -ne 0 ]; then | ||
git checkout v5.028 | ||
autoconf | ||
./configure --prefix="$VERILATOR_ROOT" | ||
make -j `nproc` | ||
make install | ||
else | ||
echo "Verilator already built, skipping compile/install steps" | ||
fi |