Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit core collection
Commits
a369cba9
Commit
a369cba9
authored
May 08, 2014
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eca: add late/conflict flags to ActionEntry
parent
673d20fb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
23 deletions
+44
-23
eca-ctl.cpp
modules/wr_eca/eca-ctl.cpp
+28
-6
eca.h
modules/wr_eca/eca.h
+10
-11
hw-channel.cpp
modules/wr_eca/lib/hw-channel.cpp
+1
-3
hw-queue.cpp
modules/wr_eca/lib/hw-queue.cpp
+5
-3
No files found.
modules/wr_eca/eca-ctl.cpp
View file @
a369cba9
...
...
@@ -186,11 +186,7 @@ static void dump_channel(ECA& eca, ActionChannel& channel) {
for
(
unsigned
i
=
0
;
i
<
queue
.
size
();
++
i
)
{
ActionEntry
&
ae
=
queue
[
i
];
char
late
=
' '
;
if
((
ae
.
time
>>
63
)
!=
0
)
{
ae
.
time
=
-
ae
.
time
;
late
=
'!'
;
}
char
late
=
(
ae
.
status
!=
VALID
)
?
'!'
:
' '
;
if
(
numeric
)
{
printf
(
"0x%016"
PRIx64
" 0x%016"
PRIx64
" 0x%08"
PRIx32
" 0x%08"
PRIx32
" %c0x%016"
PRIx64
"
\n
"
,
...
...
@@ -202,6 +198,30 @@ static void dump_channel(ECA& eca, ActionChannel& channel) {
}
}
static
void
dump_queue_entry
(
ECA
&
eca
,
ActionEntry
&
qe
)
{
if
(
!
quiet
)
{
if
(
numeric
)
{
printf
(
"----------------------------------------------------------------------------------
\n
"
);
printf
(
"EventID Param Tag Tef Execution Time
\n
"
);
printf
(
"----------------------------------------------------------------------------------
\n
"
);
}
else
{
printf
(
"---------------------------------------------------------------------------------------------
\n
"
);
printf
(
"EventID Param Tag Tef Execution Time (TAI)
\n
"
);
printf
(
"---------------------------------------------------------------------------------------------
\n
"
);
}
}
char
late
=
(
qe
.
status
!=
VALID
)
?
'!'
:
' '
;
if
(
numeric
)
{
printf
(
"0x%016"
PRIx64
" 0x%016"
PRIx64
" 0x%08"
PRIx32
" 0x%08"
PRIx32
" %c0x%016"
PRIx64
"
\n
"
,
qe
.
event
,
qe
.
param
,
qe
.
tag
,
qe
.
tef
,
late
,
qe
.
time
);
}
else
{
printf
(
"0x%016"
PRIx64
" 0x%016"
PRIx64
" 0x%08"
PRIx32
" 0x%08"
PRIx32
" %c%s
\n
"
,
qe
.
event
,
qe
.
param
,
qe
.
tag
,
qe
.
tef
,
late
,
eca
.
date
(
qe
.
time
).
c_str
());
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
opt
,
error
;
char
*
value_end
;
...
...
@@ -661,7 +681,7 @@ int main(int argc, char** argv) {
return
1
;
}
Queue
Entry
qe
;
Action
Entry
qe
;
if
(
verbose
)
{
printf
(
"Popping ActionQueue #%d (0x%"
EB_ADDR_FMT
") on ECA #%d
\"
%s
\"
(0x%"
EB_ADDR_FMT
")
\n
"
,
channel_id
,
ecas
[
eca_id
].
channels
[
channel_id
].
queue
.
front
().
address
,
...
...
@@ -669,6 +689,8 @@ int main(int argc, char** argv) {
}
if
((
status
=
ecas
[
eca_id
].
channels
[
channel_id
].
queue
.
front
().
pop
(
qe
))
!=
EB_OK
)
die
(
status
,
"ActionQueue::pop()"
);
dump_queue_entry
(
ecas
[
eca_id
],
qe
);
}
/* -------------------------------------------------------------------- */
...
...
modules/wr_eca/eca.h
View file @
a369cba9
...
...
@@ -53,6 +53,12 @@ struct EventEntry {
:
event
(
e
),
param
(
p
),
tef
(
t
),
time
(
i
)
{
}
};
enum
ActionStatus
{
VALID
=
0
,
CONFLICT
,
LATE
};
/* An action queued to be executed has these fields */
struct
ActionEntry
{
Event
event
;
...
...
@@ -60,17 +66,10 @@ struct ActionEntry {
Tag
tag
;
Tef
tef
;
Time
time
;
ActionStatus
status
;
ActionEntry
(
Event
e
=
0
,
Param
p
=
0
,
Tag
a
=
0
,
Tef
t
=
0
,
Time
i
=
0
)
:
event
(
e
),
param
(
p
),
tag
(
a
),
tef
(
t
),
time
(
i
)
{
}
};
struct
QueueEntry
:
public
ActionEntry
{
bool
late
;
bool
conflict
;
QueueEntry
(
Event
e
=
0
,
Param
p
=
0
,
Tag
a
=
0
,
Tef
t
=
0
,
Time
i
=
0
,
bool
l
=
false
,
bool
c
=
false
)
:
ActionEntry
(
e
,
p
,
a
,
t
,
i
),
late
(
l
),
conflict
(
c
)
{
}
ActionEntry
(
Event
e
=
0
,
Param
p
=
0
,
Tag
a
=
0
,
Tef
t
=
0
,
Time
i
=
0
,
ActionStatus
s
=
VALID
)
:
event
(
e
),
param
(
p
),
tag
(
a
),
tef
(
t
),
time
(
i
),
status
(
s
)
{
}
};
/* Software condition table entry fields */
...
...
@@ -152,7 +151,7 @@ struct ActionQueue {
status_t
hook_overflow
(
bool
enable
,
uint32_t
dest
);
/* Pop the next queued action from the queue */
status_t
pop
(
Queue
Entry
&
queue
);
status_t
pop
(
Action
Entry
&
queue
);
};
/* ======================================================================= */
...
...
modules/wr_eca/lib/hw-channel.cpp
View file @
a369cba9
...
...
@@ -203,9 +203,7 @@ status_t ActionChannel::load(std::vector<ActionEntry>& table) {
ae
.
tag
=
tag
;
ae
.
tef
=
tef
;
ae
.
time
=
time1
;
ae
.
time
<<=
32
;
ae
.
time
+=
time0
;
/* late events have negative timestamps */
if
(((
ctl
>>
24
)
&
ECAC_STATUS_LATE
)
==
1
)
ae
.
time
=
-
ae
.
time
;
ae
.
status
=
(((
ctl
>>
24
)
&
ECAC_STATUS_LATE
)
==
1
)
?
LATE
:
VALID
;
table
.
push_back
(
ae
);
}
...
...
modules/wr_eca/lib/hw-queue.cpp
View file @
a369cba9
...
...
@@ -121,7 +121,7 @@ status_t ActionQueue::hook_overflow(bool enable, uint32_t dest) {
return
EB_OK
;
}
status_t
ActionQueue
::
pop
(
Queue
Entry
&
queue
)
{
status_t
ActionQueue
::
pop
(
Action
Entry
&
queue
)
{
Cycle
cycle
;
eb_status_t
status
;
eb_data_t
queued
,
flags
;
...
...
@@ -150,8 +150,10 @@ status_t ActionQueue::pop(QueueEntry& queue) {
if
((
status
=
cycle
.
close
())
!=
EB_OK
)
return
status
;
queue
.
late
=
(
flags
&
1
)
!=
0
;
queue
.
conflict
=
(
flags
&
2
)
!=
0
;
queue
.
status
=
(
flags
&
2
)
!=
0
?
CONFLICT
:
(
flags
&
1
)
!=
0
?
LATE
:
VALID
;
queue
.
event
=
event1
;
queue
.
event
<<=
32
;
queue
.
event
+=
event0
;
queue
.
param
=
param1
;
queue
.
param
<<=
32
;
queue
.
param
+=
param0
;
queue
.
tag
=
tag
;
...
...
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