ulx3s-code/Makefile

27 lines
955 B
Makefile

CONSTRAINTS = ulx3s_v20.lpf
CODE = blink.bin
install: $(CODE)
openFPGALoader -b ulx3s $(CODE)
.PHONY: test
test:
iverilog -o test image_index_to_color.v
vvp test
gtkwave test.vcd
.SUFFIXES: .v .json .bitstream .bin
.v.json:
#yosys -q -p "hierarchy -top VGAImageRenderer_Top; synth_ice40 -json $*.json" $*.v vga_sync_pulse_generator.v vga_current_beam_position.v vga_add_porches_to_output.v image_index_to_color.v image_ram.v
#yosys -q -p "hierarchy -top VGAImageRenderer_Top; synth_ice40 -json $*.json" $*.v vga_image_renderer.v image_ram.v image_index_to_color.v vga_sync_pulse_generator.v vga_current_beam_position.v vga_add_porches_to_output.v
yosys -q -p "hierarchy; synth_ecp5 -json $*.json" $*.v
.json.bitstream:
#nextpnr-ice40 --hx1k --freq 25 --pcf $(CONSTRAINTS) --json $*.json --package vq100 --asc $*.bitstream
nextpnr-ecp5 --85k --lpf $(CONSTRAINTS) --textcfg $*.config --json $*.json
.bitstream.bin:
ecppack $*.config $*.bin