Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
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
FMC DEL 1ns 4cha
Commits
4bfacace
Commit
4bfacace
authored
May 19, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tst: fix output_period test
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
034296ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
test_fmcfd_loop.py
pytest/test-01-functionalities/test_fmcfd_loop.py
+11
-10
No files found.
pytest/test-01-functionalities/test_fmcfd_loop.py
View file @
4bfacace
...
...
@@ -154,16 +154,17 @@ class TestFmcfdLoop(object):
assert
ts
[
0
]
.
coarse
-
start
.
coarse
<=
1
# there is a ~1ns cable
@
pytest
.
mark
.
parametrize
(
"width,period"
,
[(
200000
,
1000000
),
(
200000
,
10000000
),
(
200000
,
100000000
),
(
200000
,
1000000000
),
(
200000
,
10000000000
),
(
200000
,
100000000000
),
(
200000
,
1000000000000
),
])
@
pytest
.
mark
.
parametrize
(
"width,period
_ps
"
,
[(
200000
,
1000000
),
(
200000
,
10000000
),
(
200000
,
100000000
),
(
200000
,
1000000000
),
(
200000
,
10000000000
),
(
200000
,
100000000000
),
(
200000
,
1000000000000
),
])
@
pytest
.
mark
.
parametrize
(
"count"
,
[
10
])
def
test_output_period
(
self
,
fmcfd_chan
,
fmcfd_tdc
,
width
,
period
,
count
):
def
test_output_period
(
self
,
fmcfd_chan
,
fmcfd_tdc
,
width
,
period_ps
,
count
):
"""
The test produces pulses on the given channels and catch them using
the on board TDC. The period between two timestamps must be as close
...
...
@@ -172,7 +173,7 @@ class TestFmcfdLoop(object):
ts
=
[]
start
=
fmcfd_chan
.
dev
.
time
+
FmcFineDelayTime
(
2
,
0
,
0
,
0
,
0
)
fmcfd_chan
.
pulse_generate
(
start
,
width
,
period
,
count
)
fmcfd_chan
.
pulse_generate
(
start
,
width
,
period
_ps
,
count
)
time
.
sleep
(
2
+
(
count
*
period_ps
)
/
1000000000000.0
)
assert
len
(
fmcfd_tdc
.
poll
(
10000
))
>
0
ts
=
fmcfd_tdc
.
read
(
count
,
os
.
O_NONBLOCK
)
...
...
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