| name | add-testcase |
| description | Scaffold a new compiler testcase in tests/. Use this when creating new test scaffolding from scratch. For RTL and TB coding rules, see testcase-rules. |
Use tools/new_test.py to scaffold a new testcase:
poetry run python tools/new_test.py <test_name>
Generated structure:
tests/<name>/rtl/
tests/<name>/tb/
tests/<name>/work/custom-sim/stimuli
tests/<name>/work/static
tests/<name>/work/validate
tests/<name>/work/verilator
The scaffold also creates:
- starter RTL
<name>.domains.yaml
tb/uut_tb.sv
- shared Makefile symlinks
- generated TB helper files via
tools/gen_tb.py
Typical workflow:
- Scaffold with
tools/new_test.py.
- Add or update RTL under
tests/<name>/rtl/.
- Adjust
.domains.yaml as needed.
- Edit
tb/uut_tb.sv only if the autogenerated scaffold is insufficient.
- Run
make -C tests/<name>/work/validate validate.
If you need extra simulator flags, use:
tests/<name>/custom-sim.args
tests/<name>/work/custom-sim/custom-sim.args
tests/<name>/work/static/static.args
For RTL and TB coding requirements, consult the testcase-rules skill.