Skip to content
Snippets Groups Projects
Commit 615926ad authored by Kenneth Hiemstra's avatar Kenneth Hiemstra
Browse files

added BG overwrite functions

parent 5875926d
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@ Description:
# System imports
import sys
import signal
import random
import test_case
import node_io
import pi_system_info
......@@ -190,8 +191,7 @@ def write_BG(tc,io,buf):
for s in tc.spNrs:
Bg.write_waveform_ram(buf,channelNr=s)
def write_BG_0(tc,io,cmd):
def write_BG_00100(tc,io,cmd):
tc.append_log(3, '>>>')
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>')
......@@ -200,8 +200,7 @@ def write_BG_0(tc,io,cmd):
ptrn[blocksize/2]=1
write_BG(tc,io,ptrn)
def write_BG_f(tc,io,cmd):
def write_BG_ff7ff(tc,io,cmd):
tc.append_log(3, '>>>')
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>')
......@@ -210,6 +209,22 @@ def write_BG_f(tc,io,cmd):
ptrn[blocksize/2]=0xffff7fff
write_BG(tc,io,ptrn)
def write_BG_rand(tc,io,cmd):
tc.append_log(3, '>>>')
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>')
blocksize=get_BG_blocksize(tc,io)
random.seed(10)
ptrn = [random.randint(0,0xffffffff) for r in range(blocksize)]
write_BG(tc,io,ptrn)
def write_BG_count(tc,io,cmd):
tc.append_log(3, '>>>')
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>')
blocksize=get_BG_blocksize(tc,io)
ptrn = range(blocksize)
write_BG(tc,io,ptrn)
def test_tr_xaui(tc,io,cmd):
......@@ -447,8 +462,10 @@ Cmd['XAUI'] = (test_tr_xaui, 'using pi_tr_xaui to read xaui status (access RE
Cmd['10GBE'] = (test_tr_10GbE,'using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)','(-n1 for set maxframesize to jumbo)')
Cmd['BSN'] = (test_bsn_mon, 'using pi_bsn_monitor to read BSN monitor (access REG_BSN_MONITOR)','')
Cmd['BGDB'] = (test_BG_to_DB,'using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)','(--sp for addressing streams, -n1 for use pps)')
Cmd['BG0'] = (write_BG_0, 'write test BG pattern ...000000000010000000000...','(--sp for addressing streams)')
Cmd['BGf'] = (write_BG_f, 'write test BG pattern ...ffffffffff7ffffffffff...','(--sp for addressing streams)')
Cmd['BGs00100'] = (write_BG_00100,'set test BG pattern ...000000000010000000000...','(--sp for addressing streams)')
Cmd['BGsff7ff'] = (write_BG_ff7ff,'set test BG pattern ...ffffffffff7ffffffffff...','(--sp for addressing streams)')
Cmd['BGsrand'] = (write_BG_rand, 'set test BG pattern with pseudo random (seed=10)','(--sp for addressing streams)')
Cmd['BGscount'] = (write_BG_count,'set test BG pattern with counter data','(--sp for addressing streams)')
Cmd['sleep1'] = (sleep, 'Sleep 1 second','')
Cmd['sleep5'] = (sleep, 'Sleep 5 seconds','')
Cmd['example'] = (show_help, 'show several example commands','')
......@@ -465,8 +482,10 @@ def help_text(tc,io,cmd):
tc.append_log(0, ' <nodes>: use: --unb N --fn N --bn N (N is a number or vector) or:')
tc.append_log(0, ' <nodes>: use: --gn N (N is a number or vector)')
tc.append_log(0, ' <command sequence>: use: --seq <command(s) separated by ",">:')
tc.append_log(0, '')
for cmd in sorted(Cmd):
tc.append_log(0, ' . %s\t%s %s' % (cmd,Cmd[cmd][1],Cmd[cmd][2]))
tc.append_log(0, '')
tc.append_log(0, ' [-vN]: verbose level N (default=5): %s' % tc.verbose_levels())
tc.append_log(0, ' [--rep N]: N=number of repeats, where -1 is forever, non-stop')
help_text(tc,io,'example')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment