pixelflut/Makefile

37 lines
962 B
Makefile
Raw Permalink Normal View History

2023-08-28 23:48:36 +02:00
CHIPDB_DIR = /usr/share/nextpnr/xilinx-chipdb
XRAY_DATABASE_DIR = /usr/share/xray/database
PART = xc7a35tcsg324-1
2024-10-19 00:07:55 +02:00
.PHONY: all clean prog sim
2023-08-28 23:48:36 +02:00
all: pixelflut.bit
clean:
rm -f pixelflut.bit pixelflut.fasm pixelflut.frames pixelflut.json
2024-10-19 00:07:55 +02:00
rm -f dvi_tb.vcd dvi_tb.vvp
2023-08-28 23:48:36 +02:00
prog: pixelflut.bit
openFPGALoader -b arty_a7_35t $<
2024-10-19 00:07:55 +02:00
sim: dvi_tb.vcd
gtkwave $<
2023-08-28 23:48:36 +02:00
pixelflut.bit: pixelflut.frames
xc7frames2bit --part_file "$(XRAY_DATABASE_DIR)/artix7/$(PART)/part.yaml" --part_name $(PART) --frm_file $< --output_file $@
pixelflut.frames: pixelflut.fasm
fasm2frames --db-root "$(XRAY_DATABASE_DIR)/artix7" --part $(PART) $< > $@
pixelflut.fasm: arty_a7_35t.xdc pixelflut.json
nextpnr-xilinx --chipdb "$(CHIPDB_DIR)/$(PART).bin" --fasm $@ --json pixelflut.json --xdc arty_a7_35t.xdc
2024-10-25 20:27:37 +02:00
pixelflut.json: pixelflut.v dvi.v xc7_bram.v
2023-08-28 23:48:36 +02:00
yosys -q -p 'synth_xilinx -top pixelflut; write_json $@' $^
2024-10-19 00:07:55 +02:00
dvi_tb.vcd: dvi_tb.vvp
vvp $<
dvi_tb.vvp: dvi_tb.v dvi.v
iverilog -o $@ $^