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
1002 B

3 years ago
3 years ago
  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. # Cocotb related
  14. MODULE := tb_${DUT}
  15. COCOTB_LOG_LEVEL := DEBUG
  16. CUSTOM_COMPILE_DEPS := results
  17. COCOTB_RESULTS_FILE := results/${MODULE}.xml
  18. # Simulator (GHDL) & RTL related
  19. SIM := ghdl
  20. TOPLEVEL_LANG := vhdl
  21. VHDL_SOURCES_libvhdl := ${EXT}/libvhdl/common/UtilsP.vhd
  22. VHDL_SOURCES := ${EXT}/libvhdl/syn/*.vhd \
  23. ${EXT}/cryptocores/aes/rtl/vhdl/*.vhd
  24. SIM_BUILD := work
  25. COMPILE_ARGS := --std=08
  26. SIM_ARGS += \
  27. --wave=results/${MODULE}.ghw \
  28. --psl-report=results/${MODULE}_psl.json \
  29. --vpi-trace=results/${MODULE}_vpi.log
  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