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.

93 lines
2.5 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 AssertP.o SimP.o QueueP.o UtilsP.o $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd WishBoneT.vhd
  43. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd
  44. ghdl -a --std=$(VHD_STD) -fpsl WishBoneT.vhd
  45. ghdl -e --std=$(VHD_STD) $@
  46. .PHONY: wishbone
  47. wishbone: wishbonet
  48. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw
  49. # Default rule for running simulation
  50. %: %t
  51. ghdl -r --std=$(VHD_STD) $@t
  52. .PHONY: clean
  53. clean:
  54. rm -f *.o
  55. rm -f *.cf
  56. rm -f *.ghw
  57. rm -f queuet
  58. rm -f dictt
  59. rm -f stackt
  60. rm -f stringt
  61. rm -f simt
  62. rm -f spit
  63. rm -f wishbonet
  64. .PHONY: distclean
  65. distclean: clean
  66. rm -f $(VHD08_SRC)/*.vhdl