-
Notifications
You must be signed in to change notification settings - Fork 6
/
UMakefile
32 lines (26 loc) · 930 Bytes
/
UMakefile
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
YOSYS=yosys
NEXTPNR=nextpnr-ecp5
ECPPACK=ecppack
HDMICODE=DVI_3x3.v
HDMICODE=llhdmi.v vgatestsrc.v
ENCODER=TMDS_encoder.v
.PHONY: all
all: ulx3s_45f_ULX3S_45F.bit
ULX3S_45F.ys: ULX3S_45F.v $(HDMICODE) $(ENCODER) clock.v OBUFDS.v
chmod +x ysgen.sh
./ysgen.sh ULX3S_45F.v $(HDMICODE) $(ENCODER) clock.v \
OBUFDS.v > ULX3S_45F.ys
echo "hierarchy -top ULX3S_45F" >> ULX3S_45F.ys
echo "synth_ecp5 -json ULX3S_45F.json" >> ULX3S_45F.ys
ULX3S_45F.json: ULX3S_45F.ys
$(YOSYS) -q ULX3S_45F.ys
ulx3s_45f_ULX3S_45F.config: ULX3S_45F.json
$(NEXTPNR) --45k --json ULX3S_45F.json --lpf ulx3s_v20_segpdi.lpf \
--basecfg ulx3s_empty.config --textcfg ulx3s_45f_ULX3S_45F.config
ulx3s_45f_ULX3S_45F.bit: ulx3s_45f_ULX3S_45F.config
$(ECPPACK) --input ulx3s_45f_ULX3S_45F.config \
--bit ulx3s_45f_ULX3S_45F.bit
.PHONY: clean
clean:
rm -f ULX3S_45F.ys ULX3S_45F.json ulx3s_45f_ULX3S_45F.config \
ulx3s_45f_ULX3S_45F.bit