Skip to content

Instantly share code, notes, and snippets.

@stylesuxx
Created February 3, 2016 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stylesuxx/0bc913943fc388ee65da to your computer and use it in GitHub Desktop.
Save stylesuxx/0bc913943fc388ee65da to your computer and use it in GitHub Desktop.
example.blif: example.v
yosys -p 'synth_ice40 -blif example.blif' example.v
example.txt: example.blif example.pcf
arachne-pnr -d 8k -p example.pcf -o example.txt example.blif
example.bin: example.txt
icepack example.txt example.bin
example_sram: icoprog example.bin
sudo ./icoprog -p < example.bin
example_flash: example.bin
sudo icoprog -f < example.bin
sudo icoprog -b
reset:
sudo icoprog -f < example.pcf
sudo icoprog -b
clean:
rm -f example.blif example.txt example.bin
.PHONY: example_sram example_flash reset clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment