Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Gateware
Manage
Activity
Members
Labels
Plan
Issues
14
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
White Rabbit Switch - Gateware
Commits
1a662f42
Commit
1a662f42
authored
8 years ago
by
Grzegorz Daniluk
Browse files
Options
Downloads
Patches
Plain Diff
swcore: fix output block frame dropping on HP (still not perfect)
parent
7a1b9191
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/wrsw_swcore/xswc_output_block_new.vhd
+25
-7
25 additions, 7 deletions
modules/wrsw_swcore/xswc_output_block_new.vhd
with
25 additions
and
7 deletions
modules/wrsw_swcore/xswc_output_block_new.vhd
+
25
−
7
View file @
1a662f42
...
...
@@ -284,6 +284,7 @@ architecture behavoural of xswc_output_block_new is
signal
cycle_frozen_cnt
:
unsigned
(
9
downto
0
);
signal
current_tx_prio
:
std_logic_vector
(
g_queue_num
-
1
downto
0
);
signal
new_tx_prio
:
std_logic_vector
(
g_queue_num
-
1
downto
0
);
signal
hp_prio_mask
:
std_logic_vector
(
g_queue_num
-
1
downto
0
);
signal
zero_prio_mask
:
std_logic_vector
(
g_queue_num
-
1
downto
0
);
...
...
@@ -570,19 +571,23 @@ begin -- behavoural
begin
if
rising_edge
(
clk_i
)
then
if
(
rst_n_i
=
'0'
)
then
current
_tx_prio
<=
(
others
=>
'0'
);
new
_tx_prio
<=
(
others
=>
'0'
);
else
if
(
rd_valid
=
'1'
)
then
current
_tx_prio
<=
r
ea
d_array
;
new
_tx_prio
<=
rd_array
;
elsif
((
s_send_pck
=
S_EOF
)
and
(
s_prep_to_send
=
S_IDLE
))
then
current
_tx_prio
<=
(
others
=>
'0'
);
new
_tx_prio
<=
(
others
=>
'0'
);
end
if
;
end
if
;
end
if
;
end
process
p_track_tx_prio
;
-- deciding whether to drop currently tx-ed frame
hp_in_queuing
<=
'1'
when
((
read_array
and
hp_prio_mask
)
/=
zero_prio_mask
)
else
'0'
;
hp_in_queuing
<=
'1'
when
((
read_array
and
hp_prio_mask
)
/=
zero_prio_mask
)
else
'1'
when
((
new_tx_prio
and
hp_prio_mask
)
/=
zero_prio_mask
)
else
--'1' when ((new_tx_prio and hp_prio_mask) /= zero_prio_mask and (new_tx_prio /= current_tx_prio)) else
'0'
;
--non_hp_txing <= '1' when ((new_tx_prio and (not hp_prio_mask)) /= zero_prio_mask) else '0';
non_hp_txing
<=
'1'
when
((
current_tx_prio
and
(
not
hp_prio_mask
))
/=
zero_prio_mask
)
else
'0'
;
abord_tx_at_hp
<=
non_hp_txing
and
-- we are currently sending frame which is not HP
...
...
@@ -661,7 +666,7 @@ begin -- behavoural
--===========================================================================================
when
S_NEWPCK_PAGE_SET_IN_ADVANCE
=>
--===========================================================================================
if
(
request_retry
=
'1'
)
then
if
(
request_retry
=
'1'
or
(
abord_tx_at_hp
=
'1'
and
mpm_pg_req_i
=
'0'
)
)
then
mpm_abort
<=
'1'
;
s_prep_to_send
<=
S_RETRY_PREPARE
;
mpm_pg_addr_memorized_valid
<=
'1'
;
...
...
@@ -701,7 +706,13 @@ begin -- behavoural
when
S_RETRY_PREPARE
=>
--===========================================================================================
if
(
mpm_pg_req_i
=
'1'
)
then
mpm_pg_addr
<=
pck_start_pgaddr
;
--mpm_pg_addr <= pck_start_pgaddr;
if
(
mpm_pg_addr_memorized_valid
=
'1'
)
then
mpm_pg_addr
<=
mpm_pg_addr_memorized
;
mpm_pg_addr_memorized_valid
<=
'0'
;
else
mpm_pg_addr
<=
pck_start_pgaddr
;
end
if
;
mpm_pg_valid
<=
'1'
;
s_prep_to_send
<=
S_RETRY_READY
;
end
if
;
...
...
@@ -760,6 +771,7 @@ begin -- behavoural
tmp_dat
<=
(
others
=>
'0'
);
tmp_sel
<=
(
others
=>
'0'
);
page_set_in_advance
<=
'0'
;
current_tx_prio
<=
(
others
=>
'0'
);
--========================================
else
-- default values
...
...
@@ -773,10 +785,12 @@ begin -- behavoural
when
S_IDLE
=>
--===========================================================================================
if
(
s_prep_to_send
=
S_NEWPCK_PAGE_READY
and
src_i
.
err
=
'0'
and
src_i
.
stall
=
'0'
and
ifg_count
=
x"0"
)
then
if
((
s_prep_to_send
=
S_NEWPCK_PAGE_READY
or
s_prep_to_send
=
S_RETRY_READY
)
and
src_i
.
err
=
'0'
and
src_i
.
stall
=
'0'
and
ifg_count
=
x"0"
)
then
src_out_int
.
cyc
<=
'1'
;
s_send_pck
<=
S_DATA
;
pck_start_pgaddr
<=
mpm_pg_addr
;
current_tx_prio
<=
new_tx_prio
;
end
if
;
--===========================================================================================
...
...
@@ -866,7 +880,9 @@ begin -- behavoural
src_out_int
.
cyc
<=
'1'
;
s_send_pck
<=
S_DATA
;
pck_start_pgaddr
<=
mpm_pg_addr
;
current_tx_prio
<=
new_tx_prio
;
else
current_tx_prio
<=
(
others
=>
'0'
);
s_send_pck
<=
S_IDLE
;
end
if
;
else
...
...
@@ -891,7 +907,9 @@ begin -- behavoural
src_out_int
.
cyc
<=
'1'
;
s_send_pck
<=
S_DATA
;
pck_start_pgaddr
<=
mpm_pg_addr
;
current_tx_prio
<=
new_tx_prio
;
else
current_tx_prio
<=
(
others
=>
'0'
);
s_send_pck
<=
S_IDLE
;
end
if
;
end
if
;
...
...
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