Communications | Digital Signal Processing (DSP ) | Radio Propagation k
#/usr/bin/perl # # (c) 2001 XCAD Corporation # Date: October 19, 2001 # @noises=("0.0","0.1","0.15","0.16","0.18","0.2","0.25","0.3","0.4","0.5","0.6","0.7","0.8","0.9","1.0"); @bits=("100000000","100000000","100000000","100000000","100000000","100000000","100000000","10000000","10000000","10000000","10000000","10000000","10000000","10000000","10000000"); $k=0; foreach $noise (@noises) { print "Processing $noise at total bits $bits[$k]\n"; open(TEMPLATE,"sys-ete-ber.template") || die "Could not open template!\n"; open(TEMP_TOPOLOGY,">temp.t") || die "Could not open temp topology!\n"; while () { s/NOISE_LEVEL/$noise/; s/BITS/$bits[$k]/; print TEMP_TOPOLOGY $_; } close(TEMPLATE); close(TEMP_TOPOLOGY); `./ccapsim temp.t`; $k++; }
# topology file: sys-ete-ber.t #--------------------------------------------------- # Title: # Author: # Date: # Description: #--------------------------------------------------- inform title inform author inform date inform descrip arg 0 float 0.5 "Rolloff Factor" arg 1 float 1.5e+06 "tx center frequency" arg 2 float 1.5e+06 "rx center frequency" arg 3 int BITS "number of bits" arg 4 float 0 "rx phase" arg 5 int 4 "Timing Sample" param arg 3 param int 12 param float 1 param int 128 star bdata0 bdata star qpsk0 qpsk param int 8 star stc0 stc param int 8 param int 8 param arg 0 star sqrtnyq0 sqrtnyq param int 8 star stc1 stc param int 8 param int 8 param arg 0 star sqrtnyq1 sqrtnyq star node1 node param int -1 param float 1 param float 1e+07 param arg 1 param float 0 param float 1 param int 128 star sine0 sine star mixer0 mixer star mixer1 mixer star add0 add param float NOISE_LEVEL param int 333 star addnoise0 addnoise star node0 node param int -1 param float 1 param float 1e+07 param arg 2 param arg 4 param float 1 param int 128 star sine1 sine star mixer2 mixer star mixer3 mixer param int 8 param int 8 param arg 0 star sqrtnyq2 sqrtnyq param int 8 param int 8 param arg 0 star sqrtnyq3 sqrtnyq param int 8 param array 1 0 star demux0 demux param int 8 param array 1 0 star demux1 demux param int 128 param int 0 param file Scatter param file X param file Y param int 2 param int 0 param float -1.2 param float 1.2 param float -1.2 param float 1.2 param int 0 param int 0 param int 0 param int 0 star scatter1 scatter param float 1 star dec_qpsk1 dec_qpsk star node2 node param int 24 star delay0 delay param int 100 param int 1000000 param file ecount.dat star ecountfap0 ecountfap connect bdata0 0 qpsk0 0 connect bdata0 1 delay0 0 connect qpsk0 0 stc0 0 connect qpsk0 1 stc1 0 connect stc0 0 sqrtnyq0 0 connect sqrtnyq0 0 mixer0 0 connect stc1 0 sqrtnyq1 0 connect sqrtnyq1 0 node1 0 connect node1 0 mixer1 0 connect node1 1 sine0 0 connect sine0 0 mixer0 1 connect sine0 1 mixer1 1 connect mixer0 0 add0 0 connect mixer1 0 add0 1 connect add0 0 addnoise0 0 connect addnoise0 0 node0 0 connect node0 0 mixer2 0 connect node0 1 mixer3 0 connect node0 2 sine1 0 connect sine1 0 mixer2 1 connect sine1 1 mixer3 1 connect mixer2 0 sqrtnyq2 0 connect mixer3 0 sqrtnyq3 0 connect sqrtnyq2 0 demux0 0 connect sqrtnyq3 0 demux1 0 connect demux0 0 scatter1 0 connect demux1 0 scatter1 1 connect scatter1 0 dec_qpsk1 0 connect scatter1 1 dec_qpsk1 1 connect dec_qpsk1 0 node2 0 connect node2 0 ecountfap0 1 connect delay0 0 ecountfap0 0