Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
euro-adc-65m-14b-40cha-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
eurocard
euro-adc-65m-14b-40cha
euro-adc-65m-14b-40cha-gw
Commits
ee784216
Commit
ee784216
authored
Aug 26, 2017
by
Dave Newbold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding functions to alignment script
parent
b34118cf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
align_adc.py
projects/64ch/software/align_adc.py
+20
-5
No files found.
projects/64ch/software/align_adc.py
View file @
ee784216
...
...
@@ -110,14 +110,29 @@ for i_chan in chans:
board
.
getNode
(
"daq.timing.csr.ctrl.chan_slip"
)
.
write
(
0x0
)
board
.
dispatch
()
print
"Chan, OK slips"
,
hex
(
i_chan
),
tr
trp
=
""
for
i
in
res
:
if
i
==
None
:
min
=
0
max
=
0
non_cont
=
False
for
i
in
range
(
len
(
res
)
-
1
):
if
res
[
i
+
1
]
and
not
res
[
i
]:
if
min
=
0
:
min
=
i
+
1
else
:
non_cont
=
True
elif
res
[
i
]
and
not
res
[
i
+
1
]:
if
max
=
0
:
max
=
i
else
:
non_cont
=
True
if
res
[
i
]
==
None
:
trp
+=
"_"
elif
i
:
elif
res
[
i
]
:
trp
+=
"+"
else
:
trp
+=
"."
print
"Chan, res:"
,
hex
(
i_chan
),
trp
a
=
int
((
min
+
max
)
/
2
)
d_slip
=
a
mod
taps_per_slip
d_tap
=
a
%
taps_per_slip
print
"Chan, min, max, rec_slip, rec_tap:"
,
hex
(
i_chan
),
hex
(
min
),
hex
(
max
),
hex
(
d_slip
),
hex
(
d_tap
)
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