Skip to content

Instantly share code, notes, and snippets.

@agucova
Created April 14, 2023 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agucova/bf17ff7421655b34753cccf4e0bc5c76 to your computer and use it in GitHub Desktop.
Save agucova/bf17ff7421655b34753cccf4e0bc5c76 to your computer and use it in GitHub Desktop.
Script para testear proyecto completo de VHDL
#!/usr/bin/env bash
set -uo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
IFS=$'\n\t'
# Run syntax check
echo "Checking syntax..."
nvc --std=2008 --syntax lib/**/*.vhd
nvc --std=2008 --syntax test/**/*.vhd
# Run analysis for all test files
echo "Analyzing all units..."
nvc --std=2008 -a test/**/*.vhd lib/**/*.vhd
echo "Running tests..."
# Iterate over files in test/
for file in test/*.vhd; do
# Run the test
nvc --std=2008 -e ${file%.vhd} --jit --no-save -r ${file%.vhd}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment