bitgen.sh 316 B

123456789101112
  1. #!/bin/dash
  2. # compile to bitstream
  3. yosys -p 'synth_ice40' -o $1.json $1.v
  4. nextpnr-ice40 --hx8k --pcf $2.pcf --package ct256 --json $1.json --asc $1.asc
  5. icepack $1.asc $1.bin
  6. #iceprog $1.bin
  7. #icetime -tmd hx8k $1.asc
  8. # pad bitstream till 2MB
  9. dd if=/dev/zero of=image bs=2M count=1
  10. dd if=$1.bin of=image conv=notrunc