#!/bin/bash
# This takes a .mem file (produced with -v in axasm, for example)
# and pushes it into the block RAM on the OneDer CPU (topbox.bit)
# the result is left as a bit file that iMpact can download
if [ $# -ne 2 ]
then
cat <<EOF
  Usage:
  data2mem input.mem output.bit
Where:
  input.mem is an input mem file (use -v from axasm)
  output.bit is a bit file ready for iMPACT.
Note:
  Requires Xilinx data2mem command to be on the path
EOF
exit 1
fi
LIB=`dirname $0`
data2mem -bm $LIB/bflash_bd.bmm -bd $1 -bt $LIB/topbox.bit -o b $2

