Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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 TTL Blocking
Commits
27f89c97
Commit
27f89c97
authored
Apr 07, 2014
by
Theodor-Adrian Stana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software: Update tsdiff.py and README.txt
parent
5299a711
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
README.txt
software/diag/timetag/README.txt
+12
-12
tsdiff.py
software/diag/timetag/tsdiff.py
+1
-1
No files found.
software/diag/timetag/README.txt
View file @
27f89c97
...
...
@@ -3,34 +3,34 @@ Scripts for the time-tagging logic
On the time-tagging side, the following scripts exist:
rd
fifo.py -- Read samples of the tag FIFO
while they exist
tsdiff.py -- Output the difference between two time-stamps from the
FIFO
rd
tb.py -- Read samples of the tag buffer
while they exist
tsdiff.py -- Output the difference between two time-stamps from the
buffer
tsset.py -- set TAI time stamp value, clearing the cycles counter in the
process
While the last script is pretty straightforward, the first two need some
further notes on their functioning.
rd
fifo
.py
rd
tb
.py
---------
First, the rd
fifo.py script can be used to read the FIFO
and output its
First, the rd
tb.py script can be used to read the timetag ring buffer
and output its
contents. The output can be the prompt (stdout), or a file if the user selects
it. When the script is started, it asks for the slot number (as usual), then
whether it should output to a file, and the filename if it should:
%> python rd
fifo
.py
%> python rd
tb
.py
Slot no.: 1
Output samples to file? (y/n) y
File name (with extension): myfile.txt
The last part of the output is -- no matter whether you selected to output to
a file or not -- the number of pulses stored to the
FIFO
on each channel,
a file or not -- the number of pulses stored to the
timetag ring buffer
on each channel,
calculated based on the number of times the channel mask was containing a '1'
for a particular channel.
The output file can be used by the tsdiff.py script to print the difference
between two timestamps on stdout. The format of the
FIFO
output is the
between two timestamps on stdout. The format of the
timetag ring buffer
output is the
following:
(<USEDW>) <channel mask> : <TAI value>.<seconds value>
...
...
@@ -46,21 +46,21 @@ tsdiff.py
---------
This script can be used to calculated the difference between consecutive
timestamps in the
FIFO. It requires an output file from the rdfifo
.py script
timestamps in the
timetag ring buffer. It requires an output file from the rdtb
.py script
and then retrieves the TAI and seconds value from the script's output,
printing the difference between one timestamp and the previous.
Additionally, the script calculates when the timestamp difference is less than
6 us (the pulse rejection period on the CONV-TTL-BLO) and prints an extra
warning to the
sample.
the pulse rejection period on the CONV-TTL-BLO and prints an extra warning to the
sample.
The output -- based on that of the rd
fifo
.py output -- is:
The output -- based on that of the rd
tb
.py output -- is:
(<channel mask>) <TAI difference>.<seconds difference>
Note that the first sample in the output is always the first timestamp value.
To run (considering the output file in the rd
fifo
.py section):
To run (considering the output file in the rd
tb
.py section):
%> python tsdiff.py
Input file name (with extension): myfile.txt
...
...
software/diag/timetag/tsdiff.py
View file @
27f89c97
...
...
@@ -44,7 +44,7 @@ if __name__ == "__main__":
# Print
p
=
"(
%
s)
%
d.
%09
d"
%
(
"{0:#08b}"
.
format
(
ch
)[
2
:],
sd
,
nsd
)
if
(
sd
==
0
)
and
(
nsd
<
6
000
)
and
(
ch
&
prch
):
if
(
sd
==
0
)
and
(
nsd
<
240
000
)
and
(
ch
&
prch
):
p
+=
" [!!!]"
print
(
p
)
prch
=
ch
...
...
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