-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1.07 KB
/
Makefile
File metadata and controls
40 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
VARIANT ?= cle101
ifeq ($(filter $(VARIANT),cle101 cle215 cle215+),)
$(error Invalid VARIANT '$(VARIANT)'. Must be one of: cle101, cle215, cle215+)
endif
ifeq ($(VARIANT), cle101)
PART_NAME = xc7a100tfgg484-2
DRAM_SIZE = 512M
endif
ifeq ($(VARIANT), cle215)
PART_NAME = xc7a200tfbg484-2
DRAM_SIZE = 512M
endif
ifeq ($(VARIANT), cle215+)
PART_NAME = xc7a200tfbg484-3
DRAM_SIZE = 1G
endif
.SECONDARY:
build/vivado-program.tcl:
mkdir -p $(dir $@)
wget -O $@ https://raw.githubusercontent.com/olofk/edalize/refs/tags/v0.6.1/edalize/templates/vivado/vivado-program.tcl.j2
build/%/acorn_$(VARIANT).runs/impl_1/design_1_wrapper.bit: bd/%.tcl vivado.tcl
rm -rf build/$*
mkdir -p build
cd build && \
vivado -nolog -nojournal -mode batch \
-source ../vivado.tcl -tclargs $* $(VARIANT) $(PART_NAME) $(DRAM_SIZE) $<
%_program: build/%/acorn_$(VARIANT).runs/impl_1/design_1_wrapper.bit build/vivado-program.tcl
cd build && \
vivado -quiet -nolog -nojournal -notrace -mode batch \
-source vivado-program.tcl -tclargs $(PART_NAME) ../$<
clean:
rm -rf build