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-04-29 18:48:41 +00:00
|
|
|
for config in rv64ic rv32ic; do
|
|
|
|
echo "$config linting..."
|
|
|
|
if !(verilator --lint-only "$@" --top-module wallypipelinedsoc "-Iconfig/$config" src/*/*.sv); then
|
|
|
|
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
|
|
|
|
|
|
|
|
# For more exhaustive (and sometimes spurious) warnings, run:
|
|
|
|
# verilator --lint-only -Wall -Iconfig/rv64ic src/*
|
|
|
|
# Unfortunately, this produces a bunch of UNUSED and UNDRIVEN signal warnings in blocks that are configured to not exist.
|