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
55d9f347
Commit
55d9f347
authored
Dec 05, 2010
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swcore: all known bugs fixed
parent
52c35760
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
+29
-11
swc_input_block.vhd
swc_input_block.vhd
+23
-9
swc_multiport_page_allocator.vhd
swc_multiport_page_allocator.vhd
+2
-2
swc_page_alloc.vhd
swc_page_alloc.vhd
+4
-0
No files found.
swc_input_block.vhd
View file @
55d9f347
...
...
@@ -575,7 +575,9 @@ begin --arch
fifo_clean
<=
'0'
;
tx_dreq
<=
'0'
;
if
(
rtu_rsp_valid_i
=
'1'
and
rtu_drop_i
=
'1'
)
then
if
(
rtu_rsp_valid_i
=
'1'
and
-- we've got RTU decision
(
rtu_drop_i
=
'1'
or
-- RTU says DROP
rtu_dst_port_mask_i
=
zeros
(
c_swc_num_ports
-
1
downto
0
)))
then
-- mask = 0 means DROP !!!
-- if we've got RTU decision to drop, we don't give a damn about
-- anything else, just pretend to be receiving the msg
...
...
@@ -646,14 +648,25 @@ begin --arch
tx_dreq
<=
'0'
;
elsif
(
rtu_rsp_valid_i
=
'1'
)
then
tx_dreq
<=
'1'
;
rtu_rsp_ack
<=
'1'
;
read_state
<=
S_WRITE_FIFO
;
--remember
read_mask
<=
rtu_dst_port_mask_i
;
read_prio
<=
rtu_prio_i
;
read_usecnt
<=
std_logic_vector
(
to_signed
(
cnt
(
rtu_dst_port_mask_i
),
read_usecnt
'length
));
rtu_rsp_ack
<=
'1'
;
if
(
rtu_drop_i
=
'1'
or
-- RTU says DROP
rtu_dst_port_mask_i
=
zeros
(
c_swc_num_ports
-
1
downto
0
)
-- mask = 0 means DROP !!!
)
then
read_state
<=
S_DROP_PCK
;
else
read_state
<=
S_WRITE_FIFO
;
--remember
read_mask
<=
rtu_dst_port_mask_i
;
read_prio
<=
rtu_prio_i
;
read_usecnt
<=
std_logic_vector
(
to_signed
(
cnt
(
rtu_dst_port_mask_i
),
read_usecnt
'length
));
end
if
;
end
if
;
...
...
@@ -892,7 +905,8 @@ begin --arch
start_transfer
<=
'0'
;
flush_reg
<=
'0'
;
mpm_pageaddr
<=
(
others
=>
'1'
);
mpm_pagereq
<=
'0'
;
-- if another page needs to be allocated for the last chunck
-- of date, transfer only if we have spare page for that.
-- otherwise, we can end up reading pck without last piece of data !!!!
...
...
swc_multiport_page_allocator.vhd
View file @
55d9f347
...
...
@@ -182,7 +182,7 @@ begin -- syn
gen_request_vec
:
for
i
in
0
to
c_swc_num_ports
-
1
generate
request_vec
(
4
*
i
+
0
)
<=
alloc_i
(
i
)
and
(
not
(
alloc_done_feedback
(
i
)
or
alloc_done
(
i
)))
and
(
not
pg_nomem
);
request_vec
(
4
*
i
+
1
)
<=
free_i
(
i
)
and
(
not
(
free_done_feedback
(
i
)
or
free_done
(
i
)));
request_vec
(
4
*
i
+
2
)
<=
set_usecnt_i
(
i
)
and
(
not
(
set_usecnt_done_feedback
(
i
)
or
set_usecnt_done
(
i
)));
request_vec
(
4
*
i
+
2
)
<=
set_usecnt_i
(
i
)
and
(
not
(
set_usecnt_done_feedback
(
i
)
));
--
or set_usecnt_done(i)));
request_vec
(
4
*
i
+
3
)
<=
force_free_i
(
i
)
and
(
not
(
force_free_done_feedback
(
i
)
or
force_free_done
(
i
)));
end
generate
gen_request_vec
;
...
...
@@ -293,7 +293,7 @@ begin -- syn
alloc_done_o
<=
alloc_done
;
free_done_o
<=
free_done
;
set_usecnt_done_o
<=
set_usecnt_done
;
set_usecnt_done_o
<=
set_usecnt_done
_feedback
;
--set_usecnt_done
;
force_free_done_o
<=
force_free_done
;
nomem_o
<=
pg_nomem
;
...
...
swc_page_alloc.vhd
View file @
55d9f347
...
...
@@ -235,9 +235,13 @@ architecture syn of swc_page_allocator is
signal
tmp_pgs
:
std_logic_vector
(
1023
downto
0
);
signal
tmp_dbg_dealloc
:
std_logic
;
signal
tmp_dbg_alloc
:
std_logic
;
begin
-- syn
tmp_dbg_dealloc
<=
'1'
when
(
state
=
FREE_RELEASE_PAGE
)
else
'0'
;
-- this guy is responsible for decoding
-- the bits of l1_bitmap register into the
-- high part of the page address
...
...
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