go-board-code/Makefile
2024-07-14 20:34:18 -04:00

26 lines
1.0 KiB
Makefile

CONSTRAINTS = ../Go_Board_Constraints.pcf
LED_TOGGLE = double_dabble_counters.bin
install: $(LED_TOGGLE)
iceprog $(LED_TOGGLE)
.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 -top DoubleDabbleCounter_Top; synth_ice40 -json $*.json" $*.v
.json.bitstream:
#nextpnr-ice40 --hx1k --freq 25 --pcf $(CONSTRAINTS) --json $*.json --package vq100 --asc $*.bitstream
nextpnr-ice40 --hx1k --freq 25 --pcf $(CONSTRAINTS) --json $*.json --package vq100 --asc $*.bitstream
.bitstream.bin:
icepack $*.bitstream $*.bin