Skip to content
Snippets Groups Projects
Commit 41c7f396 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

The test case no runs PASSED for --tel a --unb 0,1 --beamlets 0 --channels 0....

The test case no runs PASSED for --tel a --unb 0,1 --beamlets 0 --channels 0. It is important that dp_xonoff is on from the start.
parent 12537f19
No related branches found
No related tags found
No related merge requests found
......@@ -53,6 +53,7 @@ N_pol = 2
N_tp = N_pol * N_dish # = 24
N_vis = N_tp * (N_tp + 1) / 2
N_band = 16
N_slot = 1024
N_clk = 256
N_blk = 176 # 8b mode
Q_interleave = 2
......@@ -67,8 +68,14 @@ nof_10g = 3 # Number of external 10G links per PN on UniBoard
c_dbSize = 1024
c_dbPattern = [13]*c_dbSize
c_expDstMac = 0x123456789ABC
c_baseSrcMac = 0x002286080000
c_wcudata = 1 # is 1 if Data Write is 'wcudata1', else is 2 if DataWriter is 'wcudata2', as defined in central_commands.sh
if c_wcudata==1:
c_baseDstMacEth01 = 0xe41d2de42690
c_baseDstMacEth23 = 0xe41d2dbc3cd0
else:
c_baseDstMacEth01 = 0xe41d2dbc3dc0
c_baseDstMacEth23 = 0xe41d2de40d30
wsrtTelescopes = ['2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd']
......@@ -207,9 +214,14 @@ for bui in beamlets:
rdData = dbOutputReadData[ni]
reportStr = 'unb = %2d, pn = %d, bui = %3d, ch = %2d : ' % (unb, pn, bui, ch)
# . dst mac
rdDstMac = to_unsigned(rdData[0], 16) << 32
rdDstMac += to_unsigned(rdData[1], 32)
# . dst mac as defined in central_commands.sh
if unb< 4: expDstMac = c_baseDstMacEth01
elif unb< 8: expDstMac = c_baseDstMacEth01 + 1
elif unb<12: expDstMac = c_baseDstMacEth23
elif unb<16: expDstMac = c_baseDstMacEth23 + 1
rdDstMac = cm.to_unsigned(rdData[0], 16) << 32
rdDstMac += cm.to_unsigned(rdData[1], 32)
if rdDstMac == expDstMac:
tc.append_log(tc.V_INFO_DETAILS, reportStr + 'destination MAC = 0x%012X is OK' % rdDstMac)
else:
......@@ -217,9 +229,9 @@ for bui in beamlets:
tc.set_result('FAILED')
# . src mac
expSrcMac = baseSrcMac + unb * 256 + pn
rdSrcMac = to_unsigned(rdData[2], 32) << 16
rdSrcMac += to_unsigned(rdData[3], 32) >> 16
expSrcMac = c_baseSrcMac + unb * 256 + pn
rdSrcMac = cm.to_unsigned(rdData[2], 32) << 16
rdSrcMac += cm.to_unsigned(rdData[3], 32) >> 16
if rdSrcMac == expSrcMac:
tc.append_log(tc.V_INFO_DETAILS, reportStr + 'source MAC = 0x%012X is OK' % rdSrcMac)
else:
......@@ -227,7 +239,7 @@ for bui in beamlets:
tc.set_result('FAILED')
# . beamlet
rdBeamlet = to_unsigned(rdData[11], 16)
rdBeamlet = cm.to_unsigned(rdData[11], 16)
if rdBeamlet == expBeamlet:
tc.append_log(tc.V_INFO_DETAILS, reportStr + 'beamlet = %d is OK' % rdBeamlet)
else:
......@@ -235,7 +247,7 @@ for bui in beamlets:
tc.set_result('FAILED')
# . channel
rdChannel = to_unsigned(rdData[12], 32) >> 16
rdChannel = cm.to_unsigned(rdData[12], 32) >> 16
if rdChannel == expChannel:
tc.append_log(tc.V_INFO_DETAILS, reportStr + 'channel = %d is OK' % rdChannel)
else:
......@@ -243,8 +255,8 @@ for bui in beamlets:
tc.set_result('FAILED')
# . timestamp (= bsn)
rdBsn = to_unsigned(rdData[13], 32) << 32
rdBsn += to_unsigned(rdData[14], 32)
rdBsn = cm.to_unsigned(rdData[13], 32) << 32
rdBsn += cm.to_unsigned(rdData[14], 32)
tc.append_log(tc.V_INFO_DETAILS, reportStr + 'read BSN = %d' % rdBsn)
......
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