Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
Mock Turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
Mock Turtle
Commits
dcb45dc4
Commit
dcb45dc4
authored
Jul 31, 2015
by
Tomasz Wlostowski
Committed by
Federico Vaga
Jul 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrtd:rt: take the adjusted timestamp for dead time check
parent
5ab4d21c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
rt-fd.c
applications/wrtd/rt/fd/rt-fd.c
+8
-2
No files found.
applications/wrtd/rt/fd/rt-fd.c
View file @
dcb45dc4
...
...
@@ -295,6 +295,8 @@ struct lrt_output {
struct
lrt_output_rule
*
pending_trig
;
/* Output pulse queue */
struct
lrt_pulse_queue
queue
;
/* Last enqueued trigger + delay (for dead time checking). */
struct
wr_timestamp
prev_pulse
;
};
/* A pointer/handle to a trigger rule in the hash table. Used by the host to
...
...
@@ -420,8 +422,8 @@ static int check_dead_time( struct lrt_output *out, struct wr_timestamp *ts )
if
(
out
->
idle
)
return
1
;
int
delta_s
=
ts
->
seconds
-
out
->
last_enqueued
.
ts
.
seconds
;
int
delta_c
=
ts
->
ticks
-
out
->
last_enqueued
.
ts
.
ticks
;
int
delta_s
=
ts
->
seconds
-
out
->
prev_pulse
.
seconds
;
int
delta_c
=
ts
->
ticks
-
out
->
prev_pulse
.
ticks
;
if
(
delta_c
<
0
)
{
delta_c
+=
125
*
1000
*
1000
;
...
...
@@ -621,12 +623,14 @@ void enqueue_trigger(int output, struct lrt_output_rule *rule,
ent
.
seq
=
seq
;
if
(
!
check_dead_time
(
out
,
&
adjusted
))
{
rule
->
misses
++
;
out
->
miss_deadtime
++
;
log_trigger
(
WRTD_LOG_MISSED
,
WRTD_MISS_DEAD_TIME
,
out
,
&
ent
);
return
;
}
if
(
!
wr_is_timing_ok
())
{
rule
->
misses
++
;
out
->
miss_no_timing
++
;
log_trigger
(
WRTD_LOG_MISSED
,
WRTD_MISS_NO_WR
,
out
,
&
ent
);
return
;
...
...
@@ -688,6 +692,8 @@ void enqueue_trigger(int output, struct lrt_output_rule *rule,
out
->
last_enqueued
.
id
=
*
id
;
out
->
last_enqueued
.
seq
=
seq
;
out
->
prev_pulse
=
adjusted
;
log_trigger
(
WRTD_LOG_FILTERED
,
0
,
out
,
&
out
->
last_enqueued
);
}
...
...
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