Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
8805f795
Commit
8805f795
authored
Nov 17, 2013
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[swcore/out_blk]: potential-bug fix when entering finish_cycle + adding freeze detection
parent
3312e191
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
xswc_output_block_new.vhd
modules/wrsw_swcore/xswc_output_block_new.vhd
+18
-17
No files found.
modules/wrsw_swcore/xswc_output_block_new.vhd
View file @
8805f795
...
...
@@ -281,7 +281,7 @@ architecture behavoural of xswc_output_block_new is
signal
mm_valid
:
std_logic
;
signal
cycle_frozen
:
std_logic
;
signal
cycle_frozen_cnt
:
unsigned
(
5
downto
0
);
signal
cycle_frozen_cnt
:
unsigned
(
9
downto
0
);
signal
current_tx_prio
:
std_logic_vector
(
g_queue_num
-
1
downto
0
);
...
...
@@ -345,14 +345,15 @@ begin -- behavoural
cycle_frozen
<=
'0'
;
cycle_frozen_cnt
<=
(
others
=>
'0'
);
else
if
(
src_out_int
.
cyc
=
'1'
)
then
if
(
src_out_int
.
stb
=
'1'
)
then
cycle_frozen_cnt
<=
(
others
=>
'0'
);
else
cycle_frozen_cnt
<=
cycle_frozen_cnt
+
1
;
if
(
cycle_frozen_cnt
=
"111111"
)
then
cycle_frozen
<=
'1'
;
end
if
;
if
(
s_prep_to_send
=
S_IDLE
or
-- from here we will enter S_NEWPCK_PAGE_READY
(
s_prep_to_send
=
S_IDLE
and
s_send_pck
=
S_EOF
))
then
-- condition of entering S_NEWPCK_PAGE_READY
cycle_frozen_cnt
<=
(
others
=>
'0'
);
cycle_frozen
<=
'0'
;
else
cycle_frozen_cnt
<=
cycle_frozen_cnt
+
1
;
if
(
cycle_frozen_cnt
=
to_unsigned
(
765
,
10
))
then
-- waits max frame size... not good
cycle_frozen
<=
'1'
;
end
if
;
end
if
;
end
if
;
...
...
@@ -807,11 +808,10 @@ begin -- behavoural
src_out_int
.
stb
<=
'1'
;
elsif
(
src_i
.
stall
=
'1'
and
mpm_dvalid_i
=
'1'
)
then
s_send_pck
<=
S_FLUSH_STALL
;
end
if
;
if
(
mpm_dlast_i
=
'1'
)
then
elsif
(
mpm_dlast_i
=
'1'
)
then
s_send_pck
<=
S_FINISH_CYCLE
;
-- we free page in EOF
end
if
;
if
(
mpm_dvalid_i
=
'1'
)
then
-- only when dvalid to avoid copying crap (i.e. XXX)
tmp_adr
<=
mpm2wb_adr_int
;
tmp_dat
<=
mpm2wb_dat_int
;
...
...
@@ -1028,12 +1028,13 @@ begin -- behavoural
x"6"
when
(
s_send_pck
=
S_WAIT_FREE_PCK
)
else
x"7"
;
prep_FSM
<=
x"5"
when
(
s_prep_to_send
=
S_IDLE
)
else
x"1"
when
(
s_prep_to_send
=
S_NEWPCK_PAGE_READY
)
else
prep_FSM
<=
x"7"
when
(
cycle_frozen
=
'1'
)
else
x"5"
when
(
s_prep_to_send
=
S_IDLE
)
else
x"1"
when
(
s_prep_to_send
=
S_NEWPCK_PAGE_READY
)
else
x"2"
when
(
s_prep_to_send
=
S_NEWPCK_PAGE_SET_IN_ADVANCE
)
else
x"3"
when
(
s_prep_to_send
=
S_NEWPCK_PAGE_USED
)
else
x"4"
when
(
s_prep_to_send
=
S_RETRY_PREPARE
)
else
x"0"
when
(
s_prep_to_send
=
S_RETRY_READY
)
else
x"3"
when
(
s_prep_to_send
=
S_NEWPCK_PAGE_USED
)
else
x"4"
when
(
s_prep_to_send
=
S_RETRY_PREPARE
)
else
x"0"
when
(
s_prep_to_send
=
S_RETRY_READY
)
else
x"6"
;
dbg_hwdu_o
(
7
downto
0
)
<=
send_FSM
&
prep_FSM
;
end
behavoural
;
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