Makefile 863 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Project config
  2. PROJ = rgb_panel
  3. PROJ_DEPS := no2hub75 spi_flash spi_slave
  4. PROJ_RTL_SRCS := $(addprefix rtl/, \
  5. pgen.v \
  6. sysmgr.v \
  7. vgen.v \
  8. vstream.v \
  9. )
  10. PROJ_TESTBENCHES := \
  11. hub75_top_tb
  12. PROJ_TOP_SRC := rtl/top.v
  13. PROJ_TOP_MOD := top
  14. # Target config
  15. BOARD ?= icebreaker-double
  16. DEVICE = up5k
  17. PACKAGE = sg48
  18. NEXTPNR_ARGS = --pre-pack data/clocks.py
  19. # Include default rules
  20. include ../../build/project-rules.mk
  21. # Custom rules
  22. # SPI core selection
  23. SPI ?= fast
  24. ifeq ($(SPI),fast)
  25. YOSYS_READ_ARGS += -DSPI_FAST=1
  26. endif
  27. # Panel frequency
  28. PANEL ?= fast
  29. ifeq ($(PANEL),fast)
  30. YOSYS_READ_ARGS += -DPANEL_FAST=1
  31. endif
  32. # Custom data program
  33. $(BUILD_TMP)/$(PROJ)-video.bin: $(BUILD_TMP)/$(PROJ).bin data/nyan_glitch_64x64x16.raw
  34. cp $< $@
  35. dd if=data/nyan_glitch_64x64x16.raw of=$@ seek=256 bs=1024
  36. data-prog: $(BUILD_TMP)/$(PROJ)-video.bin
  37. $(ICEPROG) $<