-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (17 loc) · 1.11 KB
/
Makefile
File metadata and controls
26 lines (17 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
PROJ=n64_replay_device
TRELLIS?=/usr/local/share/trellis
all: ${PROJ}.bit
${PROJ}.json: top.v pll.v glitch_filter.v n64_controller.v n64_receive_command.v n64_transmit_controller_state.v n64_transmit_identity.v n64_transmit_byte.v n64_transmit_bit.v UART_TX.v UART_RX.v n64_controller_reader.v n64_receive_controller_data.v n64_request.v and2.v xor2.v vlo.v vhi.v serial_handler.v queue_64.v queue_1024.v inv.v
yosys -p "synth_ecp5 -json $@ -top top" top.v pll.v glitch_filter.v n64_controller.v n64_receive_command.v n64_transmit_controller_state.v n64_transmit_identity.v n64_transmit_byte.v n64_transmit_bit.v UART_TX.v UART_RX.v n64_controller_reader.v n64_receive_controller_data.v n64_request.v and2.v xor2.v vlo.v vhi.v serial_handler.v queue_64.v queue_1024.v inv.v
%_out.config: %.json
nextpnr-ecp5 --json $< --textcfg $@ --um5g-85k --package CABGA381 --lpf ecp5evn.lpf
%.bit: %_out.config
ecppack --svf ${PROJ}.svf $< $@
${PROJ}.svf : ${PROJ}.bit
flash: ${PROJ}.bit
openFPGALoader -b ecp5_evn -f $<
test: ${PROJ}.bit
openFPGALoader -b ecp5_evn $<
clean:
rm -f *.svf *.bit *.config *.json
.PHONY: prog clean