2013-06-09 18:40:20 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
if [ $# -eq 0 ]; then
|
|
|
|
echo "Usage: $0 <job_id>" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
job="$1"
|
|
|
|
set --
|
|
|
|
|
2013-06-10 14:07:22 -05:00
|
|
|
set -e
|
2013-06-11 12:49:35 -05:00
|
|
|
mkdir -p xst xst_temp/$job
|
|
|
|
cd xst_temp/$job
|
2013-06-09 18:40:20 -05:00
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
cat > $job.xst <<- EOT
|
|
|
|
run
|
2013-06-13 10:23:51 -05:00
|
|
|
-ifn $job.prj -ofn $job -p artix7 -top $job
|
|
|
|
-iobuf NO -ram_extract NO -rom_extract NO -use_dsp48 NO
|
2013-06-11 12:49:35 -05:00
|
|
|
-fsm_extract YES -fsm_encoding Auto
|
|
|
|
EOT
|
2013-06-09 18:40:20 -05:00
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
cat > $job.prj <<- EOT
|
|
|
|
verilog work "../../rtl/$job.v"
|
|
|
|
EOT
|
2013-06-10 09:17:09 -05:00
|
|
|
|
2013-06-13 10:23:51 -05:00
|
|
|
. /opt/Xilinx/14.5/ISE_DS/settings64.sh
|
2013-06-09 18:40:20 -05:00
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
xst -ifn $job.xst
|
|
|
|
netgen -w -ofmt verilog $job.ngc $job
|
|
|
|
cp $job.v ../../xst/$job.v
|
2013-06-09 18:40:20 -05:00
|
|
|
|
2013-07-03 04:19:18 -05:00
|
|
|
sync
|
2013-06-11 12:49:35 -05:00
|
|
|
exit 0
|
2013-06-09 18:40:20 -05:00
|
|
|
|