Home / Learn Verilog / Regression Scripts

Regression Scripts

Run all tests automatically.

Bottom lineRun all tests automatically.

Breaking it down

Regressionall testsrun scriptgrep PASS/FAILreport
Regression

Definition

A script compiles and runs every testbench and reports PASS/FAIL counts.

Why you need this

Catches breakage after every change.

How it works

Each test prints PASSED or FAILED; grep counts them.

Where you'll see this

  • Everyday RTL design
  • FPGA and ASIC projects
  • Testbenches and debugging

Try it

Test prints a verdictVerilog: edit and run

A script greps for TEST PASSED.

run_all.sh (Linux/macOS)
for t in tb/*_tb.v; do\n  iverilog -o sim $t rtl/*.v && vvp sim | grep -q "TEST PASSED" \\\n    && echo "PASS $t" || echo "FAIL $t"\ndone

Test what you just read

1. Regression means...