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.

89 lines
2.4 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 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. simt: RandomPkg.o UtilsP.o AssertP.o QueueP.o SimP.o SimT.vhd
  30. ghdl -a --std=$(VHD_STD) SimT.vhd
  31. ghdl -e --std=$(VHD_STD) $@
  32. spit: RandomPkg.o UtilsP.o $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd SpiT.vhd
  33. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/SpiSlaveE.vhd $(SYN_SRC)/SpiMasterE.vhd
  34. ghdl -a --std=$(VHD_STD) -fpsl SpiT.vhd
  35. ghdl -e --std=$(VHD_STD) $@
  36. .PHONY: spi
  37. spi: spit
  38. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw
  39. wishbonet: RandomPkg.o AssertP.o SimP.o QueueP.o $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd WishBoneT.vhd
  40. ghdl -a --std=$(VHD_STD) -fpsl $(SYN_SRC)/WishBoneMasterE.vhd $(SYN_SRC)/WishBoneSlaveE.vhd
  41. ghdl -a --std=$(VHD_STD) -fpsl WishBoneT.vhd
  42. ghdl -e --std=$(VHD_STD) $@
  43. .PHONY: wishbone
  44. wishbone: wishbonet
  45. ghdl -r --std=$(VHD_STD) $@t --wave=$@t.ghw
  46. # Default rule for running simulation
  47. %: %t
  48. ghdl -r --std=$(VHD_STD) $@t
  49. .PHONY: clean
  50. clean:
  51. rm -f *.o
  52. rm -f *.cf
  53. rm -f *.ghw
  54. rm -f queuet
  55. rm -f dictt
  56. rm -f stringt
  57. rm -f simt
  58. rm -f spit
  59. rm -f wishbonet
  60. .PHONY: distclean
  61. distclean: clean
  62. rm -f $(VHD08_SRC)/*.vhdl