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 |
| 36 | DEVICE = up5k |
| 37 | PACKAGE = sg48 |
| 38 | |
| 39 | YOSYS_SYNTH_ARGS = -dffe_min_ce_use 4 |
| 40 | NEXTPNR_ARGS = --pre-pack data/clocks.py --no-promote-globals --seed 2 |
| 41 | |
| 42 | # Include default rules |
Sylvain Munaut | 84717d6 | 2020-10-03 20:18:00 +0200 | [diff] [blame] | 43 | NO2BUILD_DIR ?= ../build |
Sylvain Munaut | bd83e53 | 2020-09-15 22:11:29 +0200 | [diff] [blame] | 44 | include $(NO2BUILD_DIR)/project-rules.mk |
| 45 | |
| 46 | # Custom rules |
| 47 | ../common/fw/boot.hex: |
| 48 | make -C ../common/fw boot.hex |
| 49 | |
| 50 | $(BUILD_TMP)/boot.hex: ../common/fw/boot.hex |
| 51 | cp $< $@ |