Examples of using cocotb for functional verification of VHDL designs with GHDL.
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.

42 lines
964 B

  1. # Default test
  2. DUT ?= uarttx
  3. ifeq (${DUT}, wishbone)
  4. TOPLEVEL := wishboneslavee
  5. SIM_ARGS := -gSimulation=true \
  6. -gAddressWidth=8 \
  7. -gDataWidth=16
  8. else
  9. TOPLEVEL := ${DUT}
  10. endif
  11. # Simulator (GHDL) & RTL related
  12. SIM := ghdl
  13. TOPLEVEL_LANG := vhdl
  14. VHDL_SOURCES_libvhdl := ../libvhdl/common/UtilsP.vhd
  15. VHDL_SOURCES := ../libvhdl/syn/*.vhd \
  16. ../cryptocores/aes/rtl/vhdl/*.vhd
  17. SIM_BUILD := work
  18. COMPILE_ARGS := --std=08
  19. SIM_ARGS += \
  20. --wave=results/${TOPLEVEL}.ghw \
  21. --psl-report=results/${TOPLEVEL}_psl.json \
  22. --vpi-trace=results/${TOPLEVEL}_vpi.log
  23. # Cocotb related
  24. MODULE := tb_${DUT}
  25. COCOTB_LOG_LEVEL := DEBUG
  26. CUSTOM_COMPILE_DEPS := results
  27. COCOTB_RESULTS_FILE := results/${TOPLEVEL}.xml
  28. include $(shell cocotb-config --makefiles)/Makefile.sim
  29. results:
  30. mkdir -p results
  31. .PHONY: clean
  32. clean::
  33. rm -rf *.o __pycache__ uarttx uartrx wishboneslavee aes results