2021-05-03 21:32:05 +00:00
|
|
|
#!/bin/bash
|
2021-01-27 11:40:26 +00:00
|
|
|
# check for warnings in Verilog code
|
|
|
|
# The verilator lint tool is faster and better than Modelsim so it is best to run this first.
|
2021-05-24 22:11:56 +00:00
|
|
|
export PATH=$PATH:/usr/local/bin/
|
|
|
|
verilator=`which verilator`
|
2021-01-27 11:40:26 +00:00
|
|
|
|
2021-10-23 13:15:26 +00:00
|
|
|
basepath=$(dirname $0)/..
|
2022-12-20 22:43:30 +00:00
|
|
|
#for config in rv32e rv64gc rv32gc rv32ic rv32i rv64i rv64fpquad; do
|
|
|
|
for config in rv64gc; do
|
2021-04-29 18:48:41 +00:00
|
|
|
echo "$config linting..."
|
2022-12-21 00:24:04 +00:00
|
|
|
if !($verilator --lint-only "$@" --top-module wallypipelinedsoc "-I$basepath/config/shared" "-I$basepath/config/$config" $basepath/src/*/*.sv $basepath/src/*/*/*.sv --relative-includes ); then
|
2021-04-29 18:48:41 +00:00
|
|
|
echo "Exiting after $config lint due to errors or warnings"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
echo "All lints run with no errors or warnings"
|
2021-01-27 11:40:26 +00:00
|
|
|
|
|
|
|
# --lint-only just runs lint rather than trying to compile and simulate
|
|
|
|
# -I points to the include directory where files such as `include wally-config.vh are found
|
|
|
|
|
2021-10-25 17:05:41 +00:00
|
|
|
# For more exhaustive (and sometimes spurious) warnings, add --Wall to the Verilator command
|
2021-01-27 11:40:26 +00:00
|
|
|
# Unfortunately, this produces a bunch of UNUSED and UNDRIVEN signal warnings in blocks that are configured to not exist.
|