Library of reusable VHDL components
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.

102 lines
3.1 KiB

  1. SIM_SRC := ../sim
  2. SYN_SRC := ../syn
  3. CMN_SRC := ../common
  4. OSVVM_SRC := ../OSVVM
  5. VHD08_SRC := vhdl_2008
  6. VHD_STD := 08
  7. .PHONY: all
  8. all: queue dict stack sim wishbone
  9. OsvvmContext.o: $(OSVVM_SRC)/*.vhd
  10. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/NamePkg.vhd
  11. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/OsvvmGlobalPkg.vhd
  12. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/VendorCovApiPkg.vhd
  13. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/TranscriptPkg.vhd
  14. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/TextUtilPkg.vhd
  15. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/AlertLogPkg.vhd
  16. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/MessagePkg.vhd
  17. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/SortListPkg_int.vhd
  18. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/RandomBasePkg.vhd
  19. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/RandomPkg.vhd
  20. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/CoveragePkg.vhd
  21. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/MemoryPkg.vhd
  22. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/ScoreboardGenericPkg.vhd
  23. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/ScoreboardPkg_slv.vhd
  24. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/ScoreboardPkg_int.vhd
  25. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/ResolutionPkg.vhd
  26. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/TbUtilPkg.vhd
  27. ghdl -a --std=$(VHD_STD) --work=osvvm $(OSVVM_SRC)/OsvvmContext.vhd
  28. UtilsP.o: $(CMN_SRC)/UtilsP.vhd
  29. ghdl -a --std=$(VHD_STD) --work=libvhdl $<
  30. # Default rule for compiling packages
  31. %P.o: $(SIM_SRC)/%P.vhd
  32. ghdl -a --std=$(VHD_STD) --work=libvhdl $<
  33. queuet: OsvvmContext.o AssertP.o QueueP.o QueueT.vhd
  34. ghdl -a --std=$(VHD_STD) QueueT.vhd
  35. ghdl -e --std=$(VHD_STD) $@
  36. dictt: OsvvmContext.o DictP.o DictT.vhd
  37. ghdl -a --std=$(VHD_STD) DictT.vhd
  38. ghdl -e --std=$(VHD_STD) $@
  39. stackt: OsvvmContext.o AssertP.o StackP.o StackT.vhd
  40. ghdl -a --std=$(VHD_STD) StackT.vhd
  41. ghdl -e --std=$(VHD_STD) $@
  42. simt: OsvvmContext.o UtilsP.o AssertP.o QueueP.o SimP.o SimT.vhd
  43. ghdl -a --std=$(VHD_STD) SimT.vhd
  44. ghdl -e --std=$(VHD_STD) $@
  45. spit: OsvvmContext.o UtilsP.o $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd SpiT.vhd
  46. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd
  47. ghdl -a --std=$(VHD_STD) -fpsl SpiT.vhd
  48. ghdl -e --std=$(VHD_STD) $@
  49. .PHONY: spi
  50. spi: spit
  51. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw
  52. wishbonet: OsvvmContext.o AssertP.o SimP.o QueueP.o DictP.o UtilsP.o \
  53. $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd WishBoneT.vhd
  54. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd
  55. ghdl -a --std=$(VHD_STD) -fpsl WishBoneT.vhd
  56. ghdl -e --std=$(VHD_STD) $@
  57. .PHONY: wishbone
  58. wishbone: wishbonet
  59. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw --psl-report=$@_psl_coverage.json
  60. # Default rule for running simulation
  61. %: %t
  62. ghdl -r --std=$(VHD_STD) $@t
  63. .PHONY: clean
  64. clean:
  65. rm -f *.o
  66. rm -f *.cf
  67. rm -f *.ghw
  68. rm -f queuet
  69. rm -f dictt
  70. rm -f stackt
  71. rm -f stringt
  72. rm -f simt
  73. rm -f spit
  74. rm -f wishbonet
  75. rm -f *.json
  76. .PHONY: distclean
  77. distclean: clean