Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Production Test Suite
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
Production Test Suite
Commits
a779408d
Commit
a779408d
authored
Jul 12, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmc_adc: Move timetag core to fmc_adc class.
parent
ea23d039
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
184 additions
and
139 deletions
+184
-139
fmc_adc.py
test/fmcadc100m14b4cha/python/fmc_adc.py
+150
-107
fmc_adc_demo.py
test/fmcadc100m14b4cha/python/fmc_adc_demo.py
+8
-8
test12.py
test/fmcadc100m14b4cha/python/test12.py
+10
-8
test14.py
test/fmcadc100m14b4cha/python/test14.py
+8
-8
test15.py
test/fmcadc100m14b4cha/python/test15.py
+8
-8
No files found.
test/fmcadc100m14b4cha/python/fmc_adc.py
View file @
a779408d
This diff is collapsed.
Click to expand it.
test/fmcadc100m14b4cha/python/fmc_adc_demo.py
View file @
a779408d
...
...
@@ -194,10 +194,10 @@ def poll_timer_cb():
temp
=
"
%3.3
f"
%
fmc
.
get_temp
()
temp
+=
u'
\u00B0
'
+
'C'
m
.
mezz_temp
.
setText
(
temp
)
trig_tag
=
carrier
.
get_utc_trig_tag
()
start_tag
=
carrier
.
get_utc_start_tag
()
stop_tag
=
carrier
.
get_utc_stop_tag
()
end_tag
=
carrier
.
get_utc_end_tag
()
trig_tag
=
fmc
.
get_utc_trig_tag
()
start_tag
=
fmc
.
get_utc_start_tag
()
stop_tag
=
fmc
.
get_utc_stop_tag
()
end_tag
=
fmc
.
get_utc_end_tag
()
trig_tag_s
=
"
%09
d.
%010
d s"
%
(
trig_tag
[
2
],(
trig_tag
[
3
]
*
8
))
start_tag_s
=
"
%09
d.
%010
d s"
%
(
start_tag
[
2
],(
start_tag
[
3
]
*
8
))
stop_tag_s
=
"
%09
d.
%010
d s"
%
(
stop_tag
[
2
],(
stop_tag
[
3
]
*
8
))
...
...
@@ -239,11 +239,11 @@ if __name__ == "__main__":
# Set UTC
current_time
=
time
.
time
()
utc_seconds
=
int
(
current_time
)
carrier
.
set_utc_second_cnt
(
utc_seconds
)
#print('UTC core seconds counter: %d')%
carrier
.get_utc_second_cnt()
fmc
.
set_utc_second_cnt
(
utc_seconds
)
#print('UTC core seconds counter: %d')%
fmc
.get_utc_second_cnt()
utc_coarse
=
int
((
current_time
-
utc_seconds
)
/
8E-9
)
carrier
.
set_utc_coarse_cnt
(
utc_coarse
)
#print('UTC core coarse counter: %d')%
carrier
.get_utc_coarse_cnt()
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
#print('UTC core coarse counter: %d')%
fmc
.get_utc_coarse_cnt()
# Variables from GUI
ch_range
=
[
m
.
ch1_range
,
m
.
ch2_range
,
m
.
ch3_range
,
m
.
ch4_range
]
...
...
test/fmcadc100m14b4cha/python/test12.py
View file @
a779408d
...
...
@@ -196,12 +196,12 @@ def main (default_directory='.'):
# Set UTC
current_time
=
time
.
time
()
utc_seconds
=
int
(
current_time
)
carrier
.
set_utc_second_cnt
(
utc_seconds
)
print
"UTC core seconds counter initialised to :
%
d"
%
carrier
.
get_utc_second_cnt
()
fmc
.
set_utc_second_cnt
(
utc_seconds
)
print
"UTC core seconds counter initialised to :
%
d"
%
fmc
.
get_utc_second_cnt
()
utc_coarse
=
int
((
current_time
-
utc_seconds
)
/
8E-9
)
carrier
.
set_utc_coarse_cnt
(
utc_coarse
)
print
"UTC core coarse counter initialised to :
%
d"
%
carrier
.
get_utc_coarse_cnt
()
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
print
"UTC core coarse counter initialised to :
%
d"
%
fmc
.
get_utc_coarse_cnt
()
# Print configuration
fmc
.
print_adc_core_config
()
...
...
@@ -243,15 +243,17 @@ def main (default_directory='.'):
acq_data
=
acq_channels
(
fmc
,
carrier
,
ADC_FS
[
IN_RANGE
],
ACQ_PAUSE
)
channels_data
[
ch
]
=
acq_data
[
ch
::
4
]
# Get time-tags
trig_tag
=
carrier
.
get_utc_trig_tag
()
start_tag
=
carrier
.
get_utc_start_tag
()
stop_tag
=
carrier
.
get_utc_stop_tag
()
end_tag
=
carrier
.
get_utc_end_tag
()
trig_tag
=
fmc
.
get_utc_trig_tag
()
start_tag
=
fmc
.
get_utc_start_tag
()
stop_tag
=
fmc
.
get_utc_stop_tag
()
end_tag
=
fmc
.
get_utc_end_tag
()
print
(
'Acq stop time-tag :
%10.10
f [s]'
)
%
(
stop_tag
[
2
]
+
(
stop_tag
[
3
]
*
8E-9
))
print
(
'Acq start time-tag :
%10.10
f [s]'
)
%
(
start_tag
[
2
]
+
(
start_tag
[
3
]
*
8E-9
))
print
(
'Trigger time-tag :
%10.10
f [s]'
)
%
(
trig_tag
[
2
]
+
(
trig_tag
[
3
]
*
8E-9
))
print
(
'Acq end time-tag :
%10.10
f [s]'
)
%
(
end_tag
[
2
]
+
(
end_tag
[
3
]
*
8E-9
))
fmc
.
print_utc_core_regs
()
# Calculate mean for each channel data
ch_mean
=
[]
for
ch
in
range
(
NB_CHANNELS
):
...
...
test/fmcadc100m14b4cha/python/test14.py
View file @
a779408d
...
...
@@ -169,12 +169,12 @@ def main (default_directory='.'):
# Set UTC
current_time
=
time
.
time
()
utc_seconds
=
int
(
current_time
)
spec_
fmc
.
set_utc_second_cnt
(
utc_seconds
)
print
(
'UTC core seconds counter:
%
d'
)
%
spec_
fmc
.
get_utc_second_cnt
()
fmc
.
set_utc_second_cnt
(
utc_seconds
)
print
(
'UTC core seconds counter:
%
d'
)
%
fmc
.
get_utc_second_cnt
()
utc_coarse
=
int
((
current_time
-
utc_seconds
)
/
8E-9
)
spec_
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
print
(
'UTC core coarse counter:
%
d'
)
%
spec_
fmc
.
get_utc_coarse_cnt
()
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
print
(
'UTC core coarse counter:
%
d'
)
%
fmc
.
get_utc_coarse_cnt
()
# Set sine params
sine
.
frequency
=
1E6
...
...
@@ -213,10 +213,10 @@ def main (default_directory='.'):
# Print time-tags
print
(
'UTC time-tags:'
)
trig_tag
=
spec_
fmc
.
get_utc_trig_tag
()
start_tag
=
spec_
fmc
.
get_utc_start_tag
()
stop_tag
=
spec_
fmc
.
get_utc_stop_tag
()
end_tag
=
spec_
fmc
.
get_utc_end_tag
()
trig_tag
=
fmc
.
get_utc_trig_tag
()
start_tag
=
fmc
.
get_utc_start_tag
()
stop_tag
=
fmc
.
get_utc_stop_tag
()
end_tag
=
fmc
.
get_utc_end_tag
()
print
trig_tag
print
start_tag
print
stop_tag
...
...
test/fmcadc100m14b4cha/python/test15.py
View file @
a779408d
...
...
@@ -224,11 +224,11 @@ def main (default_directory='.'):
# Set UTC
current_time
=
time
.
time
()
utc_seconds
=
int
(
current_time
)
spec_
fmc
.
set_utc_second_cnt
(
utc_seconds
)
print
"
\n
UTC core seconds counter:
%
d"
%
spec_
fmc
.
get_utc_second_cnt
()
fmc
.
set_utc_second_cnt
(
utc_seconds
)
print
"
\n
UTC core seconds counter:
%
d"
%
fmc
.
get_utc_second_cnt
()
utc_coarse
=
int
((
current_time
-
utc_seconds
)
/
8E-9
)
spec_
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
print
"UTC core coarse counter:
%
d"
%
spec_
fmc
.
get_utc_coarse_cnt
()
fmc
.
set_utc_coarse_cnt
(
utc_coarse
)
print
"UTC core coarse counter:
%
d"
%
fmc
.
get_utc_coarse_cnt
()
# Connects channel 1 to AWG
ch
=
1
...
...
@@ -333,10 +333,10 @@ def main (default_directory='.'):
# Print time-tags
print
"
\n
UTC time-tags:"
trig_tag
=
spec_
fmc
.
get_utc_trig_tag
()
start_tag
=
spec_
fmc
.
get_utc_start_tag
()
stop_tag
=
spec_
fmc
.
get_utc_stop_tag
()
end_tag
=
spec_
fmc
.
get_utc_end_tag
()
trig_tag
=
fmc
.
get_utc_trig_tag
()
start_tag
=
fmc
.
get_utc_start_tag
()
stop_tag
=
fmc
.
get_utc_stop_tag
()
end_tag
=
fmc
.
get_utc_end_tag
()
print
"Trigger time-tag :
%10.10
f [s]"
%
(
trig_tag
[
2
]
+
(
trig_tag
[
3
]
*
8E-9
))
print
"Acq start time-tag :
%10.10
f [s]"
%
(
start_tag
[
2
]
+
(
start_tag
[
3
]
*
8E-9
))
print
"Acq stop time-tag :
%10.10
f [s]"
%
(
stop_tag
[
2
]
+
(
stop_tag
[
3
]
*
8E-9
))
...
...
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