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.

121 lines
3.2 KiB

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