#!/bin/sh
#  Generate code for Polyphase interpolating Root-Raised-Cosine filter with fractional interpolation factor"
#
#  Copyright (C) 2007 Martin Dudok van Heel"
#
#  This program is free software; you can redistribute it and/or modify"
#  it under the terms of the GNU General Public License as published by"
#  the Free Software Foundation; either version 2 of the License, or"
#  (at your option) any later version."
#
#  This program is distributed in the hope that it will be useful,"
#  but WITHOUT ANY WARRANTY; without even the implied warranty of"
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"
#  GNU General Public License for more details."
#
#  You should have received a copy of the GNU General Public License"
#  along with this program; if not, write to the Free Software"
#  Foundation, Inc., 51 Franklin Street, Boston, MA  02110-1301  USA"
#  "
echo "Generating code for fractional interpolating Root-Raised_Cosine filters in verilog for USRP"
echo "Generating verilog files for both I and Q channels for alpha 0.2 and 0.35 and for 4 Mbit and 40 Mbit"
echo "*int16_dec10*.v are for 40 Mbit QPSK and *int16_dec1*.v are for 4 Mbit QPSK" 
./generate_frac_interp_05nov2007.py -c 0 -d 10 -i 16 -a 0.35 >frac_interp_alpha0.35_int16_dec10_DACint4X_chan0.v
./generate_frac_interp_05nov2007.py -c 1 -d 10 -i 16 -a 0.35 >frac_interp_alpha0.35_int16_dec10_DACint4X_chan1.v
./generate_frac_interp_05nov2007.py -c 0 -d 1  -i 16 -a 0.35 >frac_interp_alpha0.35_int16_dec1_DACint4X_chan0.v
./generate_frac_interp_05nov2007.py -c 1 -d 1  -i 16 -a 0.35 >frac_interp_alpha0.35_int16_dec1_DACint4X_chan1.v
./generate_frac_interp_05nov2007.py -c 0 -d 10 -i 16 -a 0.2  >frac_interp_alpha0.2_int16_dec10_DACint4X_chan0.v
./generate_frac_interp_05nov2007.py -c 1 -d 10 -i 16 -a 0.2  >frac_interp_alpha0.2_int16_dec10_DACint4X_chan1.v
./generate_frac_interp_05nov2007.py -c 0 -d 1  -i 16 -a 0.2  >frac_interp_alpha0.2_int16_dec1_DACint4X_chan0.v
./generate_frac_interp_05nov2007.py -c 1 -d 1  -i 16 -a 0.2  >frac_interp_alpha0.2_int16_dec1_DACint4X_chan1.v
echo "done"
echo "For bitrate=40 Mbit/sec and alpha=0.35 use the following two files"
ls frac_interp_alpha0.35_int16_dec10_DACint4X_chan0.v
ls frac_interp_alpha0.35_int16_dec10_DACint4X_chan1.v
echo "For bitrate=4 Mbit/sec and alpha=0.35 use the following two files"
ls frac_interp_alpha0.35_int16_dec1_DACint4X_chan0.v
ls frac_interp_alpha0.35_int16_dec1_DACint4X_chan1.v
echo "For bitrate=40 Mbit/sec and alpha=0.2 use the following two files"
ls frac_interp_alpha0.2_int16_dec10_DACint4X_chan1.v
ls frac_interp_alpha0.2_int16_dec10_DACint4X_chan0.v
echo "For bitrate=4 Mbit/sec and alpha=0.2 use the following two files"
ls frac_interp_alpha0.2_int16_dec1_DACint4X_chan0.v
ls frac_interp_alpha0.2_int16_dec1_DACint4X_chan1.v
echo "Copy the two files to usrp/fpga/sdr_lib/frac_interp_0.v and frac_interp_1.v"
echo "After copying the two files, build the rbf file with the Altera Quartus II software."
echo "Make sure you use this special patched usrp sourcetree for usrp_qpsk. At the moment the standard usrp sourctree doesn't know about these files"
echo "Written by Martin Dudok van Heel, 2007"
echo "Olifantasia"

