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
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
623818ee
Commit
623818ee
authored
Jul 27, 2018
by
Tristan Gingold
Committed by
Dimitris Lampridis
Aug 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rmq rx: remove endianness conversion.
parent
789c76fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
17 deletions
+7
-17
mt_rmq_rx.vhd
hdl/rtl/mqueue/mt_rmq_rx.vhd
+5
-7
sim-verif.c
tests/firmware/sim-verif/sim-verif.c
+2
-10
No files found.
hdl/rtl/mqueue/mt_rmq_rx.vhd
View file @
623818ee
...
...
@@ -118,17 +118,15 @@ begin
-- Data available, store it.
outb_o
<=
(
sel
=>
'1'
,
adr
=>
std_logic_vector
(
state
.
addr
),
dat
=>
(
snk_i
.
data
(
7
downto
0
)
&
snk_i
.
data
(
15
downto
8
)
&
snk_i
.
data
(
7
downto
0
)
&
snk_i
.
data
(
15
downto
8
)),
dat
=>
(
snk_i
.
data
(
15
downto
0
)
&
snk_i
.
data
(
15
downto
0
)),
we
=>
'1'
,
wmask
=>
"0000"
);
if
state
.
is_even
=
'1'
then
outb_o
.
wmask
<=
"0011"
;
else
outb_o
.
wmask
<=
"1100"
;
else
outb_o
.
wmask
<=
"0011"
;
end
if
;
if
snk_i
.
error
=
'1'
then
...
...
@@ -142,7 +140,7 @@ begin
if
(
state
.
is_hdr_d
=
'1'
and
snk_i
.
hdr
=
'0'
)
then
-- end of header
outb_o
.
adr
<=
c_mqueue_addr_payload
;
outb_o
.
wmask
<=
"
0011
"
;
outb_o
.
wmask
<=
"
1100
"
;
n_state
.
addr
<=
unsigned
(
c_mqueue_addr_payload
);
n_state
.
state
<=
CLAIM
;
n_state
.
is_even
<=
'0'
;
...
...
tests/firmware/sim-verif/sim-verif.c
View file @
623818ee
...
...
@@ -106,13 +106,7 @@ test_rmq(void)
{
int
i
;
char
*
p
;
unsigned
*
p32
;
unsigned
*
hdr
;
union
{
unsigned
char
b
[
sizeof
(
msg
)];
unsigned
int
w
[(
sizeof
(
msg
)
+
3
)
/
4
];
}
buf
;
puts
(
"#4 rmq
\n
"
);
...
...
@@ -135,11 +129,9 @@ test_rmq(void)
hdr
=
mq_map_in_header
(
TRTL_RMQ
,
0
);
if
(
hdr
[
1
]
!=
((
sizeof
(
msg
)
+
3
)
/
4
)
*
4
-
2
)
failed
(
'R'
);
p32
=
mq_map_in_buffer
(
TRTL_RMQ
,
0
);
for
(
i
=
0
;
i
<
(
sizeof
(
msg
)
+
3
)
/
4
;
i
++
)
buf
.
w
[
i
]
=
bswap32
(
p32
[
i
]);
p
=
mq_map_in_buffer
(
TRTL_RMQ
,
0
);
for
(
i
=
0
;
i
<
sizeof
(
msg
);
i
++
)
if
(
buf
.
b
[
i
]
!=
msg
[
i
])
if
(
p
[
i
]
!=
msg
[
i
])
failed
(
'r'
);
mq_discard
(
TRTL_RMQ
,
0
);
...
...
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