You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
620 B

4 years ago
  1. #!/bin/bash -x
  2. #adapted from https://github.com/leedowthwaite/HelloIce
  3. #changes: separate folder for dev files
  4. #simplified bash script
  5. #added vhdl2verilog per: https://github.com/4ilo/Ice40-vhdl-example
  6. mkdir txtbin
  7. echo convert vhdl to verilog
  8. ./vhd2vl_bin $1.vhd $1.v
  9. echo Using yosys to synthesize design
  10. yosys -p "synth_ice40 -blif txtbin/$1.blif" ./$1.v
  11. echo Place and route with arachne-pnr
  12. arachne-pnr -d 1k -p icestick.pcf txtbin/$1.blif -o txtbin/$1.txt
  13. echo Converting ASCII output to bitstream
  14. icepack txtbin/$1.txt txtbin/$1.bin
  15. echo Sending bitstream to device
  16. iceprog ${ICEPROG_ARGS} txtbin/$1.bin