Skip to content

Commit

Permalink
Added test script to test readout with FLIB on eda02.
Browse files Browse the repository at this point in the history
  • Loading branch information
oTTer-Chief committed Mar 1, 2017
1 parent 4dc7348 commit f4c1e3f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
62 changes: 62 additions & 0 deletions contrib/readout_eda02.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

# Number of FLIBs (1 or 2)
NUM_FLIBS=1

# FLIB settings
ADDR[0]=83:00.0

# FLIB 0
LINK[0]=pgen_near
LINK[1]=pgen_near
LINK[2]=pgen_near
LINK[3]=pgen_near
LINK[4]=pgen_near
LINK[5]=pgen_near
LINK[6]=pgen_near
LINK[7]=pgen_near

BASE_EQID[0]=0xF00

PGEN_RATE=1
#PGEN_RATE=0.14

# general setting

TIMESLICE_SIZE=100
OVERLAP_SIZE=1
OUTPUT_ARCHIVE_BYTES=2000000000
# leave empty for infinit running
MAX_TIMESLICES=1000

#TRANSPORT=RDMA
TRANSPORT=ZeroMQ

# Microslice size in ns and link max. thoughput in MB/s.
# These numbers are used to determine buffer sizes and should represent
# DPB settings. In case of FLIB pgen they are also used to configure the pgen.
MC_SIZE_NS=102400
#MC_SIZE_NS=1638400
MAX_THROUGHPUT_MB_S=1250

# Buffer calculations (absolute minimums):
# buffer_size_bytes = timeslice_size_bytes *2
# timeslice_size_bytes = mc_size_limit_bytes * (timeslice_size + overlap_size)
# min_mc_size_limit_bytes >= mc_size_time * max_throughput

MIN_MC_SIZE_LIMIT_BYTES=`echo "scale=0; ${MC_SIZE_NS}*${MAX_THROUGHPUT_MB_S}/1000" | bc -l`
echo "*** INFO *** min. mc size limit = $MIN_MC_SIZE_LIMIT_BYTES bytes"
#MC_SIZE_LIMIT_BYTES=$(($MIN_MC_SIZE_LIMIT_BYTES + 1000))
#MC_SIZE_LIMIT_BYTES=524288
MC_SIZE_LIMIT_BYTES=2097152
echo "*** INFO *** mc size limit set = $MC_SIZE_LIMIT_BYTES bytes"

MIN_BUF_SIZE=`echo "2 * $MC_SIZE_LIMIT_BYTES * ($TIMESLICE_SIZE + $OVERLAP_SIZE)" | bc`
# calculate next base2 exponent for given arg1
MIN_BUF_SIZE_EXP=`echo "exp=l($MIN_BUF_SIZE-1)/l(2); scale=0; exp/1+1" | bc -l`
echo "*** INFO *** abs. min. buffer size per link = 2^$MIN_BUF_SIZE_EXP bytes"
#BUF_SIZE_EXP=$MIN_BUF_SIZE_EXP
#BUF_SIZE_EXP=27
BUF_SIZE_EXP=28
echo "*** INFO *** buffer size per link set = 2^$BUF_SIZE_EXP bytes"

9 changes: 9 additions & 0 deletions test/test_flib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e
DIR="$(git rev-parse --show-toplevel)"

timeout 60 $DIR/build/readout config $DIR/contrib/readout_eda02.conf
grep -q -e "INFO: total timeslices processed: 1000" tsclient.log

echo "TEST PASSED"

0 comments on commit f4c1e3f

Please sign in to comment.