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.

45 lines
1010 B

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