Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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 TDC 1ns 5cha - Software
Commits
170766f8
Commit
170766f8
authored
Jan 28, 2015
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: the time-stamp comes from the trigger
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
8ebd71c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
ft-irq.c
kernel/ft-irq.c
+11
-13
No files found.
kernel/ft-irq.c
View file @
170766f8
...
...
@@ -75,11 +75,6 @@ int ft_read_sw_fifo(struct fmctdc_dev *ft, int channel,
return
-
EINVAL
;
}
/* Write the timestamp in the trigger, it will reach the control */
ti
->
tstamp
.
tv_sec
=
ts
.
seconds
;
ti
->
tstamp
.
tv_nsec
=
ts
.
coarse
*
8
;
ti
->
tstamp_extra
=
ts
.
frac
;
ctrl
=
chan
->
current_ctrl
;
v
=
ctrl
->
attr_channel
.
ext_val
;
...
...
@@ -98,26 +93,29 @@ int ft_read_sw_fifo(struct fmctdc_dev *ft, int channel,
if
(
likely
(
ts
.
gseq_id
>
ts_last
.
gseq_id
))
{
ft_ts_sub
(
&
ts
,
&
ts_last
);
v
[
FT_ATTR_TDC_DELAY_REF_SEQ
]
=
ts_last
.
gseq_id
;
pr_info
(
"%s:%d gseq last ref %d
\n
"
,
__func__
,
__LINE__
,
ts_last
.
gseq_id
);
}
else
{
/*
* It seems that we are not able to compute the delay.
* Inform the user by clearing the reference and its
* sequence number
* Inform the user by setting the time stamp to 0
*/
v
[
FT_ATTR_TDC_DELAY_REF
]
=
0
;
v
[
FT_ATTR_TDC_DELAY_REF_SEQ
]
=
0
;
memset
(
&
ts
,
0
,
sizeof
(
struct
ft_wr_timestamp
));
pr_info
(
"%s:%d can't do it %d - %d %d
\n
"
,
__func__
,
__LINE__
,
st
->
delay_reference
-
1
,
ts
.
gseq_id
>
ts_last
.
gseq_id
);
}
}
/* Write the timestamp in the trigger, it will reach the control */
ti
->
tstamp
.
tv_sec
=
ts
.
seconds
;
ti
->
tstamp
.
tv_nsec
=
ts
.
coarse
;
/* we use 8ns steps */
ti
->
tstamp_extra
=
ts
.
frac
;
/*
* This is different than it was. We used to fill the active block,
* but now zio copies chan->current_ctrl at a later time, so we
* must fill _those_ attributes instead
*/
ctrl
->
tstamp
.
secs
=
ts
.
seconds
;
ctrl
->
tstamp
.
ticks
=
ts
.
coarse
;
ctrl
->
tstamp
.
bins
=
ts
.
frac
;
ctrl
->
nsamples
=
1
;
/*
...
...
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