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

added the other 2 stream stat info for REG_TR_10GBE

parent 54cd9ed1
No related branches found
No related tags found
No related merge requests found
...@@ -107,11 +107,11 @@ def test_BG_to_DB(tc,io,cmd): ...@@ -107,11 +107,11 @@ def test_BG_to_DB(tc,io,cmd):
#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) Db = pi_diag_data_buffer.PiDiagDataBuffer(tc,io,nofStreams=nof_streams,ramSizePerStream=blocksize)
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.spNrs: for s in tc.gpNumbers:
Db.overwrite_data_buffer(resetptrn,streamNr=s,vLevel=9) Db.overwrite_data_buffer(resetptrn,streamNr=s,vLevel=9)
# Trigger by reading databuffers: # Trigger by reading databuffers:
for s in tc.spNrs: for s in tc.gpNumbers:
Db.read_data_buffer(streamNr=s,vLevel=9) Db.read_data_buffer(streamNr=s,vLevel=9)
if use_pps==True: if use_pps==True:
...@@ -122,7 +122,7 @@ def test_BG_to_DB(tc,io,cmd): ...@@ -122,7 +122,7 @@ def test_BG_to_DB(tc,io,cmd):
bg_ram = [] bg_ram = []
for s in tc.spNrs: for s in tc.gpNumbers:
ram = Bg.read_waveform_ram(channelNr=s,vLevel=5) ram = Bg.read_waveform_ram(channelNr=s,vLevel=5)
rram=[] rram=[]
for r in ram: for r in ram:
...@@ -133,7 +133,7 @@ def test_BG_to_DB(tc,io,cmd): ...@@ -133,7 +133,7 @@ def test_BG_to_DB(tc,io,cmd):
bg_ram.append(rram) bg_ram.append(rram)
db_ram = [] db_ram = []
for s in tc.spNrs: for s in tc.gpNumbers:
databuf = Db.read_data_buffer(streamNr=s,vLevel=5) databuf = Db.read_data_buffer(streamNr=s,vLevel=5)
rram=[] rram=[]
for r in databuf: for r in databuf:
...@@ -188,7 +188,7 @@ def write_BG(tc,io,buf): ...@@ -188,7 +188,7 @@ def write_BG(tc,io,buf):
blocksize=get_BG_blocksize(tc,io) blocksize=get_BG_blocksize(tc,io)
Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams, ramSizePerChannel=blocksize) Bg = pi_diag_block_gen.PiDiagBlockGen(tc,io,nofChannels=nof_streams, ramSizePerChannel=blocksize)
Bg.write_disable() Bg.write_disable()
for s in tc.spNrs: for s in tc.gpNumbers:
Bg.write_waveform_ram(buf,channelNr=s) Bg.write_waveform_ram(buf,channelNr=s)
def write_BG_00100(tc,io,cmd): def write_BG_00100(tc,io,cmd):
...@@ -254,25 +254,29 @@ def test_tr_10GbE(tc,io,cmd): ...@@ -254,25 +254,29 @@ def test_tr_10GbE(tc,io,cmd):
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd)) tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>') tc.append_log(3, '>>>')
from pi_tr_10GbE import REGMAP,PiTr10GbE nof_streams=3
tr10 = PiTr10GbE(tc,io,nof_inst=1) from pi_tr_10GbE import REGMAP,PiTr10GbE,ADDR_W
tr10 = PiTr10GbE(tc,io,nof_inst=nof_streams)
if tc.verbosity > 5: if tc.verbosity > 5:
on_execute(class_definition=PiTr10GbE,regmap=REGMAP) # this reads/shows ALL status on_execute(class_definition=PiTr10GbE,regmap=REGMAP) # this reads/shows ALL status
for s in tc.gpNumbers:
inst_offs = s*2**ADDR_W
# set rx/tr _frame_maxlength to 9000 (jumbo) as it inits at 1518 and causing frame errors: # set rx/tr _frame_maxlength to 9000 (jumbo) as it inits at 1518 and causing frame errors:
frame_size_jumbo = 9000 frame_size_jumbo = 9000
tr10.write_reg(tc.nodeNrs,'REG_TR_10GBE',(REGMAP['rx_frame_maxlength'][2][0]),[frame_size_jumbo]) tr10.write_reg(tc.nodeNrs,'REG_TR_10GBE',inst_offs+(REGMAP['rx_frame_maxlength'][2][0]),[frame_size_jumbo])
tr10.write_reg(tc.nodeNrs,'REG_TR_10GBE',(REGMAP['tx_frame_maxlength'][2][0]),[frame_size_jumbo]) tr10.write_reg(tc.nodeNrs,'REG_TR_10GBE',inst_offs+(REGMAP['tx_frame_maxlength'][2][0]),[frame_size_jumbo])
tc.set_section_id('Read/verify tr_10GbE status over Nodes %s - ' % tc.nodeNrs) tc.set_section_id('Read/verify tr_10GbE status over Nodes %s stream=%d ' % (tc.nodeNrs,s))
tc.append_log(3, '') tc.append_log(3, '')
status_names = ['rx_stats_framesErr','tx_stats_framesErr','rx_stats_framesCRCErr', \ status_names = ['rx_stats_framesErr','tx_stats_framesErr','rx_stats_framesCRCErr', \
'tx_stats_framesCRCErr','rx_stats_etherStatsCRCErr','tx_stats_etherStatsCRCErr'] 'tx_stats_framesCRCErr','rx_stats_etherStatsCRCErr','tx_stats_etherStatsCRCErr']
for stat_name in status_names: for stat_name in status_names:
verify_10GbE_status(tc,stat_name,tr10.read_reg(tc.nodeNrs,'REG_TR_10GBE',(REGMAP[stat_name][2][0]),1)) verify_10GbE_status(tc,stat_name,tr10.read_reg(tc.nodeNrs,'REG_TR_10GBE',inst_offs+(REGMAP[stat_name][2][0]),1))
...@@ -458,14 +462,14 @@ Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (acces ...@@ -458,14 +462,14 @@ Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (acces
Cmd['ETH'] = (test_eth, 'using pi_eth to read eth status','') Cmd['ETH'] = (test_eth, 'using pi_eth to read eth status','')
Cmd['REMU'] = (test_remu, 'using pi_remu to load user image (access REG_REMU)','') Cmd['REMU'] = (test_remu, 'using pi_remu to load user image (access REG_REMU)','')
Cmd['WDI'] = (test_wdi, 'using pi_wdi to reset to image in bank 0 (access REG_WDI)','') Cmd['WDI'] = (test_wdi, 'using pi_wdi to reset to image in bank 0 (access REG_WDI)','')
Cmd['XAUI'] = (test_tr_xaui, 'using pi_tr_xaui to read xaui status (access REG_TR_XAUI)','') 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)','(-n1 for set maxframesize to jumbo)') 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)','(--sp 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 for addressing streams, -n1 for use pps)')
Cmd['BGs00100'] = (write_BG_00100,'set test BG pattern ...000000000010000000000...','(--sp for addressing streams)') Cmd['BGs00100'] = (write_BG_00100,'set test BG pattern ...000000000010000000000...','(-r for addressing streams)')
Cmd['BGsff7ff'] = (write_BG_ff7ff,'set test BG pattern ...ffffffffff7ffffffffff...','(--sp for addressing streams)') Cmd['BGsff7ff'] = (write_BG_ff7ff,'set test BG pattern ...ffffffffff7ffffffffff...','(-r for addressing streams)')
Cmd['BGsrand'] = (write_BG_rand, 'set test BG pattern with pseudo random (seed=10)','(--sp for addressing streams)') Cmd['BGsrand'] = (write_BG_rand, 'set test BG pattern with pseudo random (seed=10)','(-r for addressing streams)')
Cmd['BGscount'] = (write_BG_count,'set test BG pattern with counter data','(--sp for addressing streams)') Cmd['BGscount'] = (write_BG_count,'set test BG pattern with counter data','(-r 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','')
...@@ -501,7 +505,7 @@ def help_text(tc,io,cmd): ...@@ -501,7 +505,7 @@ def help_text(tc,io,cmd):
tc.append_log(0, '[reset to factory] sequence: --seq WDI,REGMAP') tc.append_log(0, '[reset to factory] sequence: --seq WDI,REGMAP')
tc.append_log(0, '[program user image] sequence: --seq FLASH -s file.rbf') tc.append_log(0, '[program user image] sequence: --seq FLASH -s file.rbf')
tc.append_log(0, '[load user image] sequence: --seq REMU,REGMAP') tc.append_log(0, '[load user image] sequence: --seq REMU,REGMAP')
tc.append_log(0, '[modelsim BG-DB test] arguments: --unb 0 --fn 0 --seq BGDB --sim --sp 0:2') tc.append_log(0, '[modelsim BG-DB test] arguments: --unb 0 --fn 0 --seq BGDB --sim -r 0:2')
tc.append_log(0, '\n') tc.append_log(0, '\n')
else: else:
str = Cmd[cmd][1] str = Cmd[cmd][1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment