Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 1 | # Project config |
| 2 | PROJ=icE1usb |
| 3 | |
| 4 | PROJ_DEPS := no2e1 no2ice40 no2misc no2usb |
| 5 | PROJ_RTL_SRCS := $(addprefix rtl/, \ |
| 6 | i2c_master.v \ |
| 7 | i2c_master_wb.v \ |
| 8 | led_blinker.v \ |
| 9 | misc.v \ |
| 10 | sr_btn_if.v \ |
| 11 | sysmgr.v \ |
| 12 | ) |
| 13 | PROJ_RTL_SRCS += $(addprefix ../common/rtl/, \ |
Sylvain Munaut | ff0ab3e | 2020-10-03 20:15:28 +0200 | [diff] [blame] | 14 | capcnt.v \ |
| 15 | capcnt_sb_mac16.v \ |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 16 | dfu_helper.v \ |
| 17 | picorv32.v \ |
Sylvain Munaut | c75f71e | 2020-10-03 20:01:58 +0200 | [diff] [blame] | 18 | picorv32_ice40_regs.v \ |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 19 | soc_base.v \ |
| 20 | soc_bram.v \ |
| 21 | soc_iobuf.v \ |
| 22 | soc_picorv32_bridge.v \ |
| 23 | soc_spram.v \ |
| 24 | wb_arbiter.v \ |
| 25 | wb_dma.v \ |
| 26 | wb_epbuf.v \ |
| 27 | ) |
| 28 | PROJ_PREREQ = \ |
| 29 | $(BUILD_TMP)/boot.hex \ |
| 30 | $(NULL) |
| 31 | PROJ_TOP_SRC := rtl/top.v |
| 32 | PROJ_TOP_MOD := top |
| 33 | |
| 34 | # Target config |
| 35 | BOARD ?= ice1usb |
Sylvain Munaut | 0f29d6a | 2020-10-09 13:22:58 +0200 | [diff] [blame] | 36 | DEVICE := up5k |
| 37 | PACKAGE := sg48 |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 38 | |
Sylvain Munaut | 0f29d6a | 2020-10-09 13:22:58 +0200 | [diff] [blame] | 39 | SEED ?= 15 |
Sylvain Munaut | bd399e9 | 2020-10-09 13:40:16 +0200 | [diff] [blame] | 40 | YOSYS_SYNTH_ARGS := |
| 41 | NEXTPNR_ARGS := --pre-pack data/clocks.py --pre-pack data/opt.py --seed $(SEED) |
Sylvain Munaut | 0f29d6a | 2020-10-09 13:22:58 +0200 | [diff] [blame] | 42 | |
| 43 | ifeq ($(IGNORE_TIMING),1) |
| 44 | NEXTPNR_ARGS += --timing-allow-fail |
| 45 | endif |
Sylvain Munaut | d420ffc | 2020-10-09 13:25:51 +0200 | [diff] [blame] | 46 | ifeq ($(SINGLE_CHANNEL),1) |
| 47 | YOSYS_READ_ARGS += -DWITH_SINGLE_CHANNEL |
| 48 | endif |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 49 | |
| 50 | # Include default rules |
Sylvain Munaut | 84717d6 | 2020-10-03 20:18:00 +0200 | [diff] [blame] | 51 | NO2BUILD_DIR ?= ../build |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 52 | include $(NO2BUILD_DIR)/project-rules.mk |
| 53 | |
| 54 | # Custom rules |
| 55 | ../common/fw/boot.hex: |
| 56 | make -C ../common/fw boot.hex |
| 57 | |
| 58 | $(BUILD_TMP)/boot.hex: ../common/fw/boot.hex |
| 59 | cp $< $@ |