Makefile 885 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Project config
  2. PROJ = riscv_doom
  3. PROJ_DEPS := no2usb no2misc no2ice40 no2qpimem no2memcache video
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. vid_top.v \
  6. vid_palette.v \
  7. vid_framebuf.v \
  8. soc_bram.v \
  9. sysmgr.v \
  10. VexRiscv.v \
  11. )
  12. PROJ_SIM_SRCS := $(addprefix sim/, \
  13. spiflash.v \
  14. )
  15. PROJ_SIM_SRCS += rtl/top.v
  16. PROJ_TESTBENCHES := \
  17. top_tb
  18. PROJ_PREREQ = \
  19. $(BUILD_TMP)/boot.hex
  20. PROJ_TOP_SRC := rtl/top.v
  21. PROJ_TOP_MOD := top
  22. # Target config
  23. BOARD ?= icebreaker
  24. DEVICE = up5k
  25. PACKAGE = sg48
  26. SEED ?= 4
  27. YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4 -abc9 -device u -dsp
  28. NEXTPNR_ARGS = --pre-pack data/clocks.py --pre-place $(CORE_no2ice40_DIR)/sw/serdes-nextpnr-place.py --seed $(SEED)
  29. NEXTPNR_ARGS += --timing-allow-fail
  30. # Include default rules
  31. include ../../build/project-rules.mk
  32. # Custom rules
  33. fw_boot/boot.hex:
  34. make -C fw_boot boot.hex
  35. $(BUILD_TMP)/boot.hex: fw_boot/boot.hex
  36. cp $< $@