Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EtherBone Core
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
EtherBone Core
Commits
f31079fb
Commit
f31079fb
authored
13 years ago
by
Wesley W. Terpstra
Browse files
Options
Downloads
Patches
Plain Diff
Set the cycle flag correctly.
Read from correct status register offset.
parent
278f08d7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
api/v2/format/master.c
+10
-4
10 additions, 4 deletions
api/v2/format/master.c
with
10 additions
and
4 deletions
api/v2/format/master.c
+
10
−
4
View file @
f31079fb
...
...
@@ -128,7 +128,7 @@ void eb_device_flush(eb_device_t devicep) {
ops
=
0
;
readback
=
0
;
while
(
operationp
!=
EB_NULL
||
(
needs_check
&&
ops
>
0
))
{
int
wcount
,
rcount
,
rxcount
,
total
,
length
,
fifo
;
int
wcount
,
rcount
,
rxcount
,
total
,
length
,
fifo
,
cycle_end
;
eb_address_t
bwa
;
eb_operation_flags_t
rcfg
,
wcfg
;
...
...
@@ -220,7 +220,7 @@ void eb_device_flush(eb_device_t devicep) {
}
}
if
(
rcount
==
0
&&
(
ops
>=
maxops
||
(
ops
>
0
&&
needs_check
&&
scanp
==
EB_NULL
)))
{
if
(
rcount
==
0
&&
(
ops
>=
maxops
||
(
scanp
==
EB_NULL
&&
needs_check
&&
ops
>
0
)))
{
/* Insert error-flag read */
rxcount
=
1
;
rcfg
=
1
;
...
...
@@ -273,13 +273,18 @@ void eb_device_flush(eb_device_t devicep) {
}
}
/* The last record in a cycle if: */
cycle_end
=
scanp
==
EB_NULL
&&
(
!
needs_check
||
ops
==
0
||
rxcount
!=
rcount
);
/* Start by preparting the header */
memset
(
wptr
,
0
,
record_alignment
);
wptr
[
0
]
=
0x60
|
/* BCA+RFF always set */
(
rcfg
?
0x80
:
0
)
|
(
wcfg
?
0x04
:
0
)
|
(
fifo
?
0x02
:
0
)
|
(
scanp
==
EB_NULL
?
0x08
:
0
);
(
cycle_end
?
0x08
:
0
);
wptr
[
1
]
=
0
;
wptr
[
2
]
=
wcount
;
wptr
[
3
]
=
rxcount
;
...
...
@@ -305,7 +310,8 @@ void eb_device_flush(eb_device_t devicep) {
EB_mWRITE
(
wptr
,
aux
->
rba
|
1
,
alignment
);
wptr
+=
alignment
;
EB_mWRITE
(
wptr
,
0x0
,
alignment
);
/* Status register is read at differing offset for differing port widths */
EB_mWRITE
(
wptr
,
8
-
stride
,
alignment
);
wptr
+=
alignment
;
ops
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment