-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile.rapidwright
More file actions
73 lines (61 loc) · 2.32 KB
/
Makefile.rapidwright
File metadata and controls
73 lines (61 loc) · 2.32 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
NEXTPNR_PATH := $(shell echo ~/cat_x/nextpnr/)
RAPIDWRIGHT_PATH := $(shell echo ~/cat_x/RapidWright)
INTERCHANGE_PATH := $(shell echo ~/cat_x/fpga_interchange_schema)/interchange
PART := xc7a35tcpg236-1
CONSTRAINTS := test_data/series7_constraints.yaml
LUTS := test_data/series7_luts.yaml
BEL_BUCKET_SEEDS := test_data/series7_bel_buckets.yaml
.DELETE_ON_ERROR:
.PHONY: all yaml
all: $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba
rapidwright.force:
touch rapidwright.force
rapidwright.update: rapidwright.force
# FIXME: Remove patch of api-lib once RapidWright 2020.2.1 is released.
cd $(RAPIDWRIGHT_PATH) && \
make update_jars && \
wget https://github.com/Xilinx/RapidWright/releases/download/v2020.2.1-beta/rapidwright-api-lib-2020.2.1_update1.jar && \
mv rapidwright-api-lib-2020.2.1_update1.jar jars/rapidwright-api-lib-2020.2.0.jar && \
make
touch rapidwright.update
$(PART).device: rapidwright.update
RAPIDWRIGHT_PATH=$(RAPIDWRIGHT_PATH) /usr/bin/time -v \
$(RAPIDWRIGHT_PATH)/scripts/invoke_rapidwright.sh \
com.xilinx.rapidwright.interchange.DeviceResourcesExample \
$(PART)
$(PART)_constraints.device: $(PART).device
/usr/bin/time -v python3 -mfpga_interchange.patch \
--schema_dir $(INTERCHANGE_PATH) \
--schema device \
--patch_path constraints \
--patch_format yaml \
$(PART).device \
$(CONSTRAINTS) \
$(PART)_constraints.device
$(PART)_constraints_luts.device: $(PART)_constraints.device
/usr/bin/time -v python3 -mfpga_interchange.patch \
--schema_dir $(INTERCHANGE_PATH) \
--schema device \
--patch_path lutDefinitions \
--patch_format yaml \
$(PART)_constraints.device \
$(LUTS) \
$(PART)_constraints_luts.device
yaml: $(PART)_constraints_luts.device
/usr/bin/time -v python3 -mfpga_interchange.convert \
--schema_dir $(INTERCHANGE_PATH) \
--schema device \
--input_format capnp \
--output_format yaml \
$(PART)_constraints_luts.device \
$(PART)_constraints_luts.yaml
$(NEXTPNR_PATH)/fpga_interchange/chipdb.bba: $(PART)_constraints_luts.device
/usr/bin/time -v python3 -mfpga_interchange.nextpnr_emit \
--schema_dir $(INTERCHANGE_PATH) \
--output_dir $(NEXTPNR_PATH)/fpga_interchange/ \
--bel_bucket_seeds $(BEL_BUCKET_SEEDS) \
--device $(PART)_constraints_luts.device
clean:
rm -f rapidwright.force
rm -f $(PART)*.device
rm -f $(NEXTPNR_PATH)/fpga_interchange/chipdb.bba