-
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.
* Add docker command to README.md and modify simulation files so they avoid features we do not have available. * Rename example folders and add verilator docker scripts * Remove unecessary code. * Update action * Remove interactive docker when not necessary. * Set shell in makefile * Try different approach to escape #
- Loading branch information
Showing
24 changed files
with
90 additions
and
36 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,3 +1,4 @@ | ||
examples/**/obj_dir | ||
examples/**/*.txt | ||
examples/**/*.vcd | ||
.ccache |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
examples/hierarchy/Hierarchy.sv → examples/Hierarchy/Hierarchy.sv
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
File renamed without changes.
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,17 @@ | ||
#!/bin/bash | ||
# DESCRIPTION: Wrap a verilator call to run a docker container | ||
# | ||
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you | ||
# can redistribute it and/or modify it under the terms of either the GNU | ||
# Lesser General Public License Version 3 or the Perl Artistic License | ||
# Version 2.0. | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
# Pull newest image | ||
docker pull verilator/verilator:4.038 > /dev/null | ||
|
||
# Get the project root | ||
project_root=$(realpath $3) | ||
|
||
# Run the docker image with the user we "made" above | ||
docker run -e CCACHE_DIR=/work/.ccache -v ${project_root}:/work -w /work/$2 --user $(id -u):$(id -g) verilator/verilator:$1 "${@:4}" |
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,31 @@ | ||
#!/bin/bash | ||
# DESCRIPTION: Wrap a Verilator call and copy vlt includes | ||
# (inside docker container) | ||
# | ||
# Copyright 2020 by Stefan Wallentowitz. This program is free software; you | ||
# can redistribute it and/or modify it under the terms of either the GNU | ||
# Lesser General Public License Version 3 or the Perl Artistic License | ||
# Version 2.0. | ||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0 | ||
|
||
perl /usr/local/bin/verilator "$@" | ||
status=$? | ||
if [ $status -ne 0 ]; then | ||
exit $status | ||
fi | ||
|
||
# Check if user set an obj_dir | ||
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+') | ||
if [ "$obj_dir" == "" ]; then | ||
obj_dir="obj_dir" | ||
fi | ||
|
||
# If the run was successful: Copy required files to allow build without this container | ||
if [ -e ${obj_dir} ]; then | ||
# Copy files required for the build | ||
mkdir -p ${obj_dir}/vlt | ||
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt | ||
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt | ||
# Point Makefile to that folder | ||
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk | ||
fi |
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