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.

86 lines
2.0 KiB

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