#!/bin/bash

ftw_hex=`echo $1 | tr a-f A-F`

freq_wrclk=125000000
ftw=`echo "ibase=16; $ftw_hex" | bc -q`
#echo "ftw=$ftw"
prod=`echo "$ftw*$freq_wrclk" | bc -q`
#echo "prod=$prod"
fout=`echo "$prod/(2^48)" | bc -q`
echo "Fout=$fout"
fout_rf=`echo "$fout*4620" | bc -q`
echo "Fout=$fout_rf"

