pixelflut/Makefile

45 lines
1.2 KiB
Makefile
Raw 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
.PHONY: all clean flash 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
flash: pixelflut.bit
openFPGALoader -b arty_a7_35t --write-flash $<
2023-08-28 23:48:36 +02:00
prog: pixelflut.bit
openFPGALoader -b arty_a7_35t $<
2024-12-29 18:32:08 +01:00
sim: dvi_tb.vcd pingxelflut_tb.vcd
2024-10-19 00:07:55 +02:00
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-12-29 16:28:35 +01:00
pixelflut.json: pixelflut.v dvi.v ethernet_smi.v pingxelflut.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 $@ $^
2024-12-29 18:32:08 +01:00
pingxelflut_tb.vcd: pingxelflut_tb.vvp
vvp $<
pingxelflut_tb.vvp: pingxelflut_tb.v pingxelflut.v
iverilog -o $@ $^