From bf54c9b0b2572dc3ee53b5859a7848b4b74e76f8 Mon Sep 17 00:00:00 2001 From: Jarred Allen Date: Thu, 29 Apr 2021 14:48:41 -0400 Subject: [PATCH] Enhance lint-wally functionality --- wally-pipelined/lint-wally | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/wally-pipelined/lint-wally b/wally-pipelined/lint-wally index 18851119..59d6bf15 100755 --- a/wally-pipelined/lint-wally +++ b/wally-pipelined/lint-wally @@ -1,11 +1,14 @@ # check for warnings in Verilog code # The verilator lint tool is faster and better than Modelsim so it is best to run this first. -echo "rv64ic linting..." -verilator --lint-only "$@" --top-module wallypipelinedsoc -Iconfig/rv64ic src/*/*.sv -echo "rv32ic linting..." -verilator --lint-only "$@" --top-module wallypipelinedsoc -Iconfig/rv32ic src/*/*.sv -#verilator --lint-only --top-module wallypipelinedsoc -Iconfig/rv64ic src/*/*.sv src/*/div/*.sv +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" # --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