-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerator-pipes.sh
31 lines (26 loc) · 1.11 KB
/
generator-pipes.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh
MATRIX=1024-512-8.txt
RSBYTES=223
FILE=test.txt
CLIENTES=$1
COUNT=$2
# generamos archivo random,32 Megabits
dd if=/dev/urandom of=test.txt count=${COUNT}
SCRAMBLEBLOCK=$(echo "${RSBYTES}*4" | bc)
echo "----------------------------------------"
echo "Scrambler block:" ${SCRAMBLEBLOCK}
python -c "print 'Aprovechamiento: %f' % (((${CLIENTES}/330.0)/1)*(${RSBYTES}/(${RSBYTES} + 32.0)))"
# filtro via files
rm *.out
./rsenc <${FILE} | ./scrambler ${SCRAMBLEBLOCK} >rs.out
./raw2bin < rs.out >ldpc.out
#./bfenc ${CLIENTES} < ldpc.out | ./noisesim 120 100db 100db | ./bfdec ${CLIENTES} >bf.out
# ./bfenc ${CLIENTES} < ldpc.out | ./bfdec ${CLIENTES} >bf.out
./bfenc ${CLIENTES} < ldpc.out >AT_${CLIENTES}_${COUNT}.dat
#./bfenc-orig ${CLIENTES} < ldpc.out | ./bfdec-orig ${CLIENTES} >bf.out
# ./bin2raw <bf.out >ldpcdec.out
# ./descramble ${SCRAMBLEBLOCK} <ldpcdec.out | ./rsdec >rsdec.out
# echo "BER post-bloomfilter: " `./ber ldpc.out bf.out`
# echo "BER post-ldpc: " `./ber rs.out ldpcdec.out`
# echo "BER post-reed-solomon: " `./ber ${FILE} rsdec.out`
# echo ${CLIENTES} " " `./ber ${FILE} rsdec.out`