Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv RS485 OPT RTM
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Conv RS485 OPT RTM
Commits
69f454c8
Commit
69f454c8
authored
Mar 20, 2019
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend test02 to take into account a 5th (reference) CTR
parent
8ca6d5de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
4 deletions
+33
-4
test02.py
pts/python/tests/test02.py
+33
-4
No files found.
pts/python/tests/test02.py
View file @
69f454c8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment