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

using argument -s for selecting stream device (1GBE or 10GBE)

parent 15fc0376
No related branches found
No related tags found
No related merge requests found
...@@ -96,7 +96,7 @@ def test_BG_to_DB(tc,io,cmd): ...@@ -96,7 +96,7 @@ def test_BG_to_DB(tc,io,cmd):
tc.set_section_id('Read - ') tc.set_section_id('Read - ')
nof_streams=5 nof_streams=5
blocksize=0 blocksize=0
Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams,ramSizePerChannel=blocksize,instanceName='10GBE') Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams,ramSizePerChannel=blocksize,instanceName=tc.gpString)
Bg.write_disable() Bg.write_disable()
settings = Bg.read_block_gen_settings() settings = Bg.read_block_gen_settings()
...@@ -104,9 +104,9 @@ def test_BG_to_DB(tc,io,cmd): ...@@ -104,9 +104,9 @@ def test_BG_to_DB(tc,io,cmd):
gapsize = settings[0][3] gapsize = settings[0][3]
blocksize = pow(2, ceil_log2(samples_per_packet+gapsize)) blocksize = pow(2, ceil_log2(samples_per_packet+gapsize))
Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams, ramSizePerChannel=blocksize,instanceName='10GBE') Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams, ramSizePerChannel=blocksize,instanceName=tc.gpString)
#Bg.write_block_gen_settings(samplesPerPacket=700, blocksPerSync=781250, gapSize=300, memLowAddr=0, memHighAddr=701, BSNInit=42) #Bg.write_block_gen_settings(samplesPerPacket=700, blocksPerSync=781250, gapSize=300, memLowAddr=0, memHighAddr=701, BSNInit=42)
Db = pi_diag_data_buffer.PiDiagDataBuffer(tc,io,nofStreams=nof_streams,ramSizePerStream=blocksize,instanceName='10GBE') Db = pi_diag_data_buffer.PiDiagDataBuffer(tc,io,nofStreams=nof_streams,ramSizePerStream=blocksize,instanceName=tc.gpString)
resetptrn = [0xc1ea1ed1]*blocksize #samples_per_packet + [0]*(blocksize-samples_per_packet) resetptrn = [0xc1ea1ed1]*blocksize #samples_per_packet + [0]*(blocksize-samples_per_packet)
for s in tc.gpNumbers: for s in tc.gpNumbers:
Db.overwrite_data_buffer(resetptrn,streamNr=s,vLevel=9) Db.overwrite_data_buffer(resetptrn,streamNr=s,vLevel=9)
...@@ -484,11 +484,11 @@ Cmd['WDI'] = (test_wdi, 'using pi_wdi to reset to image in bank 0 (acces ...@@ -484,11 +484,11 @@ Cmd['WDI'] = (test_wdi, 'using pi_wdi to reset to image in bank 0 (acces
Cmd['XAUI'] = (test_tr_xaui, 'using pi_tr_xaui to read xaui status (access REG_TR_XAUI)','(-r for addressing streams)') Cmd['XAUI'] = (test_tr_xaui, 'using pi_tr_xaui to read xaui status (access REG_TR_XAUI)','(-r for addressing streams)')
Cmd['10GBE'] = (test_tr_10GbE,'using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)','(-r for addressing streams)') Cmd['10GBE'] = (test_tr_10GbE,'using pi_tr_10GbE to read 10GbE status (access REG_TR_10GBE)','(-r for addressing streams)')
Cmd['BSN'] = (test_bsn_mon, 'using pi_bsn_monitor to read BSN monitor (access REG_BSN_MONITOR)','') 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)','(-r for addressing streams, -n1 for use pps)') Cmd['BGDB'] = (test_BG_to_DB,'using BG (pi_diag_block_gen.py) and DB (pi_diag_data_buffer.py)','(-r and -s for addressing streams, -n1 for use pps)')
Cmd['BGs00100'] = (write_BG_00100,'set test BG pattern ...000000000010000000000...','(-r for addressing streams)') Cmd['BGs00100'] = (write_BG_00100,'set test BG pattern ...000000000010000000000...','(-r and -s for addressing streams)')
Cmd['BGsff7ff'] = (write_BG_ff7ff,'set test BG pattern ...ffffffffff7ffffffffff...','(-r for addressing streams)') Cmd['BGsff7ff'] = (write_BG_ff7ff,'set test BG pattern ...ffffffffff7ffffffffff...','(-r and -s for addressing streams)')
Cmd['BGsrand'] = (write_BG_rand, 'set test BG pattern with pseudo random (seed=10)','(-r for addressing streams)') Cmd['BGsrand'] = (write_BG_rand, 'set test BG pattern with pseudo random (seed=10)','(-r and -s for addressing streams)')
Cmd['BGscount'] = (write_BG_count,'set test BG pattern with counter data','(-r for addressing streams)') Cmd['BGscount'] = (write_BG_count,'set test BG pattern with counter data','(-r and -s for addressing streams)')
Cmd['sleep1'] = (sleep, 'Sleep 1 second','') Cmd['sleep1'] = (sleep, 'Sleep 1 second','')
Cmd['sleep5'] = (sleep, 'Sleep 5 seconds','') Cmd['sleep5'] = (sleep, 'Sleep 5 seconds','')
Cmd['example'] = (show_help, 'show several example commands','') Cmd['example'] = (show_help, 'show several example commands','')
...@@ -505,6 +505,8 @@ def help_text(tc,io,cmd): ...@@ -505,6 +505,8 @@ 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: --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, ' <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, ' <command sequence>: use: --seq <command(s) separated by ",">:')
tc.append_log(0, ' <streamdevice>: use: -s 10GBE or -s 1GBE to select stream device')
tc.append_log(0, ' <streamnumber>: use: -r N to select a stream number (N can also be 0:2)')
tc.append_log(0, '') tc.append_log(0, '')
for cmd in sorted(Cmd): for cmd in sorted(Cmd):
tc.append_log(0, ' . %s\t%s %s' % (cmd,Cmd[cmd][1],Cmd[cmd][2])) tc.append_log(0, ' . %s\t%s %s' % (cmd,Cmd[cmd][1],Cmd[cmd][2]))
......
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