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
57fe9396
There was an error fetching the commit references. Please try again later.
Commit
57fe9396
authored
13 years ago
by
Mathias Kreider
Browse files
Options
Downloads
Patches
Plain Diff
yet another bugfix for long reads
parent
1a2e7d13
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hdl/EB_SPEC_Test/EB_2_wb_converter.vhd
+41
-37
41 additions, 37 deletions
hdl/EB_SPEC_Test/EB_2_wb_converter.vhd
with
41 additions
and
37 deletions
hdl/EB_SPEC_Test/EB_2_wb_converter.vhd
+
41
−
37
View file @
57fe9396
...
@@ -201,6 +201,19 @@ begin
...
@@ -201,6 +201,19 @@ begin
end
if
;
end
if
;
end
active_high
;
end
active_high
;
impure
function
wb_stb_mid_packet
(
op_count
:
unsigned
)
return
std_logic
is
begin
return
((
not
s_fifo_rx_am_empty
and
active_high
(
op_count
>
0
))
or
(
s_WB_STB
and
s_WB_master_i
.
STALL
));
end
wb_stb_mid_packet
;
impure
function
wb_stb_end_packet
(
op_count
:
unsigned
)
return
std_logic
is
begin
return
(
not
s_fifo_rx_empty
and
active_high
(
s_EB_RX_byte_cnt
=
s_EB_packet_length
)
and
active_high
(
op_count
>
0
));
end
wb_stb_end_packet
;
component
alt_FIFO_am_full_flag
IS
component
alt_FIFO_am_full_flag
IS
PORT
PORT
(
(
...
@@ -343,13 +356,13 @@ begin
...
@@ -343,13 +356,13 @@ begin
end
if
;
end
if
;
--Counter: WB ACKs received
--Counter: WB ACKs
or ERRs
received
if
(
s_state_RX
=
IDLE
)
then
if
(
s_state_RX
=
IDLE
)
then
s_WB_ACK_cnt_big
<=
(
others
=>
'0'
);
s_WB_ACK_cnt_big
<=
(
others
=>
'0'
);
else
else
if
(
s_state_RX
=
CYC_HDR_WRITE_PROC
)
then
if
(
s_state_RX
=
CYC_HDR_WRITE_PROC
)
then
a_WB_ACK_cnt
<=
s_EB_RX_CUR_CYCLE
.
RD_CNT
+
s_EB_RX_CUR_CYCLE
.
WR_CNT
;
a_WB_ACK_cnt
<=
s_EB_RX_CUR_CYCLE
.
RD_CNT
+
s_EB_RX_CUR_CYCLE
.
WR_CNT
;
elsif
(
s_WB_master_i
.
ACK
=
'1'
)
then
elsif
(
s_WB_master_i
.
ACK
=
'1'
OR
s_WB_master_i
.
ERR
=
'1'
)
then
a_WB_ACK_cnt
<=
a_WB_ACK_cnt
-1
;
a_WB_ACK_cnt
<=
a_WB_ACK_cnt
-1
;
end
if
;
end
if
;
end
if
;
end
if
;
...
@@ -725,29 +738,20 @@ begin
...
@@ -725,29 +738,20 @@ begin
end
if
;
end
if
;
end
if
;
end
if
;
when
WB_WRITE
=>
when
WB_WRITE
=>
s_WB_ADR
<=
std_logic_vector
(
s_WB_addr_cnt
);
s_WB_WE
<=
'1'
;
s_fifo_rx_pop
<=
'0'
;
s_WB_STB
<=
(
not
s_fifo_rx_empty
and
active_high
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
>
0
))
or
(
s_WB_STB
and
s_WB_master_i
.
STALL
);
s_WB_STB
<=
wb_stb_mid_packet
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
)
or
wb_stb_end_packet
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
);
s_WB_ADR
<=
std_logic_vector
(
s_WB_addr_cnt
);
s_WB_WE
<=
'1'
;
s_fifo_rx_pop
<=
'0'
;
if
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
>
0
)
then
--underflow of RX_cyc_wr_count
if
(
s_fifo_rx_empty
=
'0'
and
(
s_WB_master_i
.
STALL
=
'0'
or
s_WB_STB
=
'0'
))
then
if
((
wb_stb_mid_packet
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
)
or
wb_stb_end_packet
(
s_EB_RX_CUR_CYCLE
.
WR_CNT
))
=
'1'
s_EB_RX_CUR_CYCLE
.
WR_CNT
<=
s_EB_RX_CUR_CYCLE
.
WR_CNT
-1
;
and
not
(
s_WB_STB
=
'1'
and
s_WB_master_i
.
STALL
=
'1'
))
then
end
if
;
s_EB_RX_CUR_CYCLE
.
WR_CNT
<=
s_EB_RX_CUR_CYCLE
.
WR_CNT
-1
;
if
(
s_WB_master_i
.
STALL
=
'0'
and
s_WB_STB
=
'1'
)
then
if
(
s_EB_RX_CUR_CYCLE
.
WR_FIFO
=
'0'
)
then
if
(
s_EB_RX_CUR_CYCLE
.
WR_FIFO
=
'0'
)
then
s_WB_addr_cnt
<=
s_WB_addr_cnt
+
4
;
s_WB_addr_cnt
<=
s_WB_addr_cnt
+
4
;
end
if
;
end
if
;
end
if
;
end
if
;
end
if
;
...
@@ -774,20 +778,20 @@ begin
...
@@ -774,20 +778,20 @@ begin
s_WB_SEL
<=
s_EB_RX_CUR_CYCLE
.
SEL
;
s_WB_SEL
<=
s_EB_RX_CUR_CYCLE
.
SEL
;
end
if
;
end
if
;
when
WB_READ
=>
if
((
s_state_TX
=
DATA_SEND
)
or
(
s_EB_RX_HDR
.
NO_RESPONSE
=
'1'
))
then
when
WB_READ
=>
if
((
s_state_TX
=
DATA_SEND
)
or
(
s_EB_RX_HDR
.
NO_RESPONSE
=
'1'
))
then
s_WB_ADR
<=
s_fifo_rx_q
;
s_WB_ADR
<=
s_fifo_rx_q
;
s_WB_STB
<=
not
s_fifo_tx_am_full
and
(
(
not
s_fifo_rx_empty
and
active_high
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
>
0
))
or
(
s_WB_STB
and
s_WB_master_i
.
STALL
))
;
s_fifo_rx_pop
<=
'0'
;
s_fifo_rx_pop
<=
'0'
;
s_WB_STB
<=
wb_stb_mid_packet
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
)
or
wb_stb_end_packet
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
)
;
if
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
>
0
)
then
--underflow of RX_cyc_wr_count
if
(
(
wb_stb_mid_packet
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
)
or
wb_stb_end_packet
(
s_EB_RX_CUR_CYCLE
.
RD_CNT
))
=
'1'
and
not
(
s_WB_STB
=
'1'
and
s_WB_master_i
.
STALL
=
'1'
))
then
if
(
s_fifo_rx_empty
=
'0'
and
s_fifo_tx_am_full
=
'0'
and
(
s_
W
B_
master_i
.
STALL
=
'0'
or
s_
W
B_
STB
=
'0'
))
then
s_
E
B_
RX_CUR_CYCLE
.
RD_CNT
<=
s_
E
B_
RX_CUR_CYCLE
.
RD_CNT
-1
;
s_EB_RX_CUR_CYCLE
.
RD_CNT
<=
s_EB_RX_CUR_CYCLE
.
RD_CNT
-1
;
end
if
;
end
if
;
end
if
;
end
if
;
end
if
;
when
CYC_DONE
=>
if
(
a_WB_ACK_cnt
=
0
AND
s_fifo_tx_we
=
'0'
)
then
when
CYC_DONE
=>
if
(
a_WB_ACK_cnt
=
0
AND
s_fifo_tx_we
=
'0'
)
then
...
...
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