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.

94 lines
2.6 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. .PHONY: vhdl2008
  9. vhdl2008 : $(VHD08_SRC)/env_c.vhdl $(VHD08_SRC)/numeric_std_additions.vhdl $(VHD08_SRC)/numeric_std_unsigned_c.vhdl \
  10. $(VHD08_SRC)/standard_additions_c.vhdl $(VHD08_SRC)/standard_textio_additions_c.vhdl $(VHD08_SRC)/std_logic_1164_additions.vhdl
  11. ghdl -a --std=$(VHD_STD) --work=ieee_proposed $(VHD08_SRC)/standard_additions_c.vhdl \
  12. $(VHD08_SRC)/standard_textio_additions_c.vhdl $(VHD08_SRC)/std_logic_1164_additions.vhdl $(VHD08_SRC)/numeric_std_additions.vhdl \
  13. $(VHD08_SRC)/numeric_std_unsigned_c.vhdl $(VHD08_SRC)/env_c.vhdl
  14. RandomPkg.o: OSVVM/SortListPkg_int.vhd OSVVM/RandomBasePkg.vhd OSVVM/RandomPkg.vhd
  15. ghdl -a --std=$(VHD_STD) --work=osvvm $^
  16. CoveragePkg.o: RandomPkg.o OSVVM/MessagePkg.vhd
  17. ghdl -a --std=$(VHD_STD) --work=osvvm OSVVM/MessagePkg.vhd OSVVM/CoveragePkg.vhd
  18. UtilsP.o: $(CMN_SRC)/UtilsP.vhd
  19. ghdl -a --std=$(VHD_STD) --work=libvhdl $<
  20. # Default rule for compiling packages
  21. %P.o: $(SIM_SRC)/%P.vhd
  22. ghdl -a --std=$(VHD_STD) --work=libvhdl $<
  23. queuet: AssertP.o QueueP.o QueueT.vhd
  24. ghdl -a --std=$(VHD_STD) QueueT.vhd
  25. ghdl -e --std=$(VHD_STD) $@
  26. dictt: RandomPkg.o DictP.o DictT.vhd
  27. ghdl -a --std=$(VHD_STD) DictT.vhd
  28. ghdl -e --std=$(VHD_STD) $@
  29. stackt: RandomPkg.o AssertP.o StackP.o StackT.vhd
  30. ghdl -a --std=$(VHD_STD) StackT.vhd
  31. ghdl -e --std=$(VHD_STD) $@
  32. simt: RandomPkg.o UtilsP.o AssertP.o QueueP.o SimP.o SimT.vhd
  33. ghdl -a --std=$(VHD_STD) SimT.vhd
  34. ghdl -e --std=$(VHD_STD) $@
  35. spit: RandomPkg.o UtilsP.o $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd SpiT.vhd
  36. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd
  37. ghdl -a --std=$(VHD_STD) -fpsl SpiT.vhd
  38. ghdl -e --std=$(VHD_STD) $@
  39. .PHONY: spi
  40. spi: spit
  41. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw
  42. wishbonet: RandomPkg.o CoveragePkg.o AssertP.o SimP.o QueueP.o DictP.o UtilsP.o \
  43. $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd WishBoneT.vhd
  44. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd
  45. ghdl -a --std=$(VHD_STD) -fpsl WishBoneT.vhd
  46. ghdl -e --std=$(VHD_STD) $@
  47. .PHONY: wishbone
  48. wishbone: wishbonet
  49. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw --psl-report=$@_psl_coverage.json
  50. # Default rule for running simulation
  51. %: %t
  52. ghdl -r --std=$(VHD_STD) $@t
  53. .PHONY: clean
  54. clean:
  55. rm -f *.o
  56. rm -f *.cf
  57. rm -f *.ghw
  58. rm -f queuet
  59. rm -f dictt
  60. rm -f stackt
  61. rm -f stringt
  62. rm -f simt
  63. rm -f spit
  64. rm -f wishbonet
  65. .PHONY: distclean
  66. distclean: clean
  67. rm -f $(VHD08_SRC)/*.vhdl