Examples of using PSL for functional and formal verification of VHDL with GHDL (and SymbiYosys)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
739 B

  1. include tests.mk
  2. VHD_STD := 08
  3. .PHONY: all clean
  4. .SECONDARY:
  5. all: ${psl_tests}
  6. %: ../src/%.vhd ../src/pkg.vhd ../src/sequencer.vhd ../src/hex_sequencer.vhd work/%/testbench.vhd
  7. ghdl -a --std=$(VHD_STD) --workdir=work/$@ ../src/pkg.vhd ../src/sequencer.vhd ../src/hex_sequencer.vhd
  8. ghdl -a --std=$(VHD_STD) -fpsl --workdir=work/$@ ../src/$@.vhd
  9. ghdl -a --std=$(VHD_STD) --workdir=work/$@ work/$@/testbench.vhd
  10. ghdl -e --std=$(VHD_STD) -fpsl --workdir=work/$@ -o work/$@/tb_$@ tb_$@
  11. cd work/$@; ghdl -r --std=$(VHD_STD) tb_$@ --wave=$@.ghw --psl-report=$@_psl_coverage.json
  12. work/%/testbench.vhd: template.vhd
  13. mkdir -p work; mkdir -p $(dir $@)
  14. sed 's/__DUT__/$(subst /,,$(subst work,,$(dir $@)))/g' $< > $@
  15. clean:
  16. rm -rf work