go-board-code/Makefile

24 lines
754 B
Makefile

CONSTRAINTS = ../Go_Board_Constraints.pcf
LED_TOGGLE = pong_runner.bin
install: $(LED_TOGGLE)
iceprog $(LED_TOGGLE)
.PHONY: test
test:
iverilog -o test uart_rx_test.v uart_rx.v
vvp test
gtkwave test.vcd
.SUFFIXES: .v .json .bitstream .bin
.v.json:
yosys -q -p "hierarchy -top PongRunner; synth_ice40 -json $*.json" $*.v vga_sync_pulse_generator.v vga_current_beam_position.v vga_add_porches_to_output.v uart_rx.v uart_tx.v pong.v pong_ball.v pong_paddle.v debounce_filter.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