initial
[fpgammix.git] / tools / data2mif.sh
bloba6b2394ed5da9811ba8757f230780a660f670ca5
1 #!/bin/bash
3 depth=256
5 printf "WIDTH=32;\n"
6 printf "DEPTH=%d;\n" $depth
7 printf "ADDRESS_RADIX=HEX;\n"
8 printf "DATA_RADIX=HEX;\n"
9 printf "CONTENT BEGIN\n"
10 a=0
11 while read v
13 printf " %02x : %08x ;\n" $a 0x$v
14 a=$(($a + 1))
15 done < $1
16 printf " [%02x..%x] : 00000000;\n" $a $((depth - 1))
17 printf "END;\n"