Commit 69f454c8 authored by Dimitris Lampridis's avatar Dimitris Lampridis

extend test02 to take into account a 5th (reference) CTR

parent 8ca6d5de
......@@ -77,6 +77,14 @@ def main (card=None, default_directory='.',suite=None, serial=""):
duration = float(config['CTR.FEC']['TstDuration'])
ref_ms1 = 0
ref_pll1 = 0
ref_miss1 = 0
ref_ms2 = 0
ref_pll2 = 0
ref_miss2 = 0
ms1 = [0, 0, 0, 0]
pll1 = [0, 0, 0, 0]
miss1 = [0, 0, 0, 0]
......@@ -102,13 +110,34 @@ def main (card=None, default_directory='.',suite=None, serial=""):
test_results['PLL LEDs'] = 0
util.err_msg("Some of the optical transmitters/receivers might be broken")
else:
for i in range(0,4):
ms1[i], pll1[i], miss1[i] = get_ctrtest_err(user, rsa, host, port, i+1)
done = 0
while (not done):
# get error status from reference CTR
ref_ms1, ref_pll1, ref_miss1 = get_ctrtest_err(user, rsa, host, port, 5)
# get error status from DUT CTRs
for i in range(0,4):
ms1[i], pll1[i], miss1[i] = get_ctrtest_err(user, rsa, host, port, i+1)
# sleep for some time, waiting for errors (not) to happen
time.sleep(duration)
# get error status from DUT CTRs
for i in range(0,4):
ms2[i], pll2[i], miss2[i] = get_ctrtest_err(user, rsa, host, port, i+1)
# get error status from reference CTR
ref_ms2, ref_pll2, ref_miss2 = get_ctrtest_err(user, rsa, host, port, 5)
time.sleep(duration)
# check for errors on reference CTR
if ((ref_ms1 != ref_ms2) or (ref_pll1 != ref_pll2) or (ref_miss1 != ref_miss2)):
util.user_msg("WARNING: timing errors detected on reference CTR, repeating test...")
else:
done = 1
# Check for errors on DUT CTRs
for i in range(0,4):
ms2[i], pll2[i], miss2[i] = get_ctrtest_err(user, rsa, host, port, i+1)
if (ms1[i] != ms2[i]):
test_results['Ms errors'] = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment