blob: 8c3f49a459547625e96ae2dcfc0c74508def94bc [file] [log] [blame]
Sylvain Munautbd83e532020-09-15 22:11:29 +02001# Project config
2PROJ=icE1usb
3
4PROJ_DEPS := no2e1 no2ice40 no2misc no2usb
5PROJ_RTL_SRCS := $(addprefix rtl/, \
Sylvain Munautbd83e532020-09-15 22:11:29 +02006 led_blinker.v \
7 misc.v \
8 sr_btn_if.v \
9 sysmgr.v \
10)
11PROJ_RTL_SRCS += $(addprefix ../common/rtl/, \
Sylvain Munautff0ab3e2020-10-03 20:15:28 +020012 capcnt.v \
13 capcnt_sb_mac16.v \
Sylvain Munautbd83e532020-09-15 22:11:29 +020014 dfu_helper.v \
15 picorv32.v \
Sylvain Munautc75f71e2020-10-03 20:01:58 +020016 picorv32_ice40_regs.v \
Sylvain Munautbd83e532020-09-15 22:11:29 +020017 soc_base.v \
18 soc_bram.v \
19 soc_iobuf.v \
20 soc_picorv32_bridge.v \
21 soc_spram.v \
22 wb_arbiter.v \
23 wb_dma.v \
24 wb_epbuf.v \
25)
26PROJ_PREREQ = \
27 $(BUILD_TMP)/boot.hex \
28 $(NULL)
29PROJ_TOP_SRC := rtl/top.v
30PROJ_TOP_MOD := top
31
32# Target config
33BOARD ?= ice1usb
Sylvain Munaut0f29d6a2020-10-09 13:22:58 +020034DEVICE := up5k
35PACKAGE := sg48
Sylvain Munautbd83e532020-09-15 22:11:29 +020036
Sylvain Munaut0f29d6a2020-10-09 13:22:58 +020037SEED ?= 15
Sylvain Munautbd399e92020-10-09 13:40:16 +020038YOSYS_SYNTH_ARGS :=
Sylvain Munautf12087f2022-05-03 13:56:23 +020039NEXTPNR_ARGS := --pre-pack data/clocks.py --pre-pack data/opt.py --seed $(SEED) --no-promote-globals
Sylvain Munaut0f29d6a2020-10-09 13:22:58 +020040
41ifeq ($(IGNORE_TIMING),1)
42 NEXTPNR_ARGS += --timing-allow-fail
43endif
Sylvain Munautd420ffc2020-10-09 13:25:51 +020044ifeq ($(SINGLE_CHANNEL),1)
45 YOSYS_READ_ARGS += -DWITH_SINGLE_CHANNEL
46endif
Sylvain Munautbd83e532020-09-15 22:11:29 +020047
48# Include default rules
Sylvain Munaut84717d62020-10-03 20:18:00 +020049NO2BUILD_DIR ?= ../build
Sylvain Munautbd83e532020-09-15 22:11:29 +020050include $(NO2BUILD_DIR)/project-rules.mk
51
52# Custom rules
53../common/fw/boot.hex:
54 make -C ../common/fw boot.hex
55
56$(BUILD_TMP)/boot.hex: ../common/fw/boot.hex
57 cp $< $@