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
2f84ced2
Commit
2f84ced2
authored
Jan 25, 2012
by
Maciej Lipinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swcore: eliminated bug in input_block which caused page loss
parent
43baf0b2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
swc_multiport_page_allocator.vhd
modules/wrsw_swcore/swc_multiport_page_allocator.vhd
+2
-2
swc_page_alloc_old.vhd
modules/wrsw_swcore/swc_page_alloc_old.vhd
+2
-2
xswc_input_block.vhd
modules/wrsw_swcore/xswc_input_block.vhd
+13
-3
No files found.
modules/wrsw_swcore/swc_multiport_page_allocator.vhd
View file @
2f84ced2
...
@@ -156,8 +156,8 @@ begin -- syn
...
@@ -156,8 +156,8 @@ begin -- syn
-- one allocator/deallocator for all ports
-- one allocator/deallocator for all ports
ALLOC_CORE
:
swc_page_allocator_new
-- tom's new allocator
--
ALLOC_CORE : swc_page_allocator_new -- tom's new allocator
--
ALLOC_CORE : swc_page_allocator
ALLOC_CORE
:
swc_page_allocator
generic
map
(
generic
map
(
g_num_pages
=>
c_swc_packet_mem_num_pages
,
g_num_pages
=>
c_swc_packet_mem_num_pages
,
g_page_addr_bits
=>
c_swc_page_addr_width
,
g_page_addr_bits
=>
c_swc_page_addr_width
,
...
...
modules/wrsw_swcore/swc_page_alloc_old.vhd
View file @
2f84ced2
...
@@ -359,8 +359,8 @@ begin -- syn
...
@@ -359,8 +359,8 @@ begin -- syn
elsif
(
was_reset
=
'1'
)
then
elsif
(
was_reset
=
'1'
)
then
if
(
first_addr
=
'1'
)
then
if
(
first_addr
=
'1'
)
then
--
l0_wr_data <= (others => '1');
l0_wr_data
<=
(
others
=>
'1'
);
l0_wr_data
<=
x"fffffffe"
;
-- tom
--
l0_wr_data <= x"fffffffe"; -- tom
l0_wr
<=
'1'
;
l0_wr
<=
'1'
;
first_addr
<=
'0'
;
first_addr
<=
'0'
;
elsif
(
l0_wr_addr
=
ones
)
then
elsif
(
l0_wr_addr
=
ones
)
then
...
...
modules/wrsw_swcore/xswc_input_block.vhd
View file @
2f84ced2
...
@@ -292,6 +292,8 @@ type t_write_state is (S_IDLE,
...
@@ -292,6 +292,8 @@ type t_write_state is (S_IDLE,
-- interpck page allocation in advance
-- interpck page allocation in advance
signal
interpck_page_in_advance
:
std_logic
;
signal
interpck_page_in_advance
:
std_logic
;
signal
interpck_page_in_advance_d0
:
std_logic
;
signal
interpck_page_in_advance_d1
:
std_logic
;
signal
interpck_pageaddr
:
std_logic_vector
(
c_swc_page_addr_width
-
1
downto
0
);
signal
interpck_pageaddr
:
std_logic_vector
(
c_swc_page_addr_width
-
1
downto
0
);
signal
interpck_page_alloc_req
:
std_logic
;
signal
interpck_page_alloc_req
:
std_logic
;
signal
interpck_usecnt_req
:
std_logic
;
signal
interpck_usecnt_req
:
std_logic
;
...
@@ -826,7 +828,9 @@ begin --arch
...
@@ -826,7 +828,9 @@ begin --arch
if
(
mpm_pagereq
=
'0'
and
-- not setting yet new page
if
(
mpm_pagereq
=
'0'
and
-- not setting yet new page
mpm_pageend_i
=
'1'
and
-- detecting info from MPM: new page needed
mpm_pageend_i
=
'1'
and
-- detecting info from MPM: new page needed
interpck_page_in_advance
=
'1'
)
then
-- we have a spare page allocated
interpck_page_in_advance
=
'1'
)
then
-- we have a spare page allocated
-- interpck_page_in_advance = '1' and -- we have a spare page allocated
-- flush_sig = '0') then -- if there is flush, no need for next page (now !!!)
mpm_pageaddr
<=
interpck_pageaddr
;
mpm_pageaddr
<=
interpck_pageaddr
;
mpm_pagereq
<=
'1'
;
mpm_pagereq
<=
'1'
;
...
@@ -891,6 +895,7 @@ begin --arch
...
@@ -891,6 +895,7 @@ begin --arch
-- Of course, this is the case only if the pck finished while pgend request HIGH
-- Of course, this is the case only if the pck finished while pgend request HIGH
if
(
interpck_page_in_advance
=
'1'
)
then
if
(
interpck_page_in_advance
=
'1'
)
then
--if(interpck_page_in_advance_d0 = '1' and interpck_page_in_advance_d1 = '0') then
if
(
transfering_pck
=
'1'
)
then
if
(
transfering_pck
=
'1'
)
then
write_state
<=
S_STUCK_WITH_DATA
;
write_state
<=
S_STUCK_WITH_DATA
;
...
@@ -900,8 +905,8 @@ begin --arch
...
@@ -900,8 +905,8 @@ begin --arch
else
else
start_transfer
<=
'1'
;
start_transfer
<=
'1'
;
mpm_pageaddr
<=
interpck_pageaddr
;
--
mpm_pageaddr <= interpck_pageaddr;
mpm_pagereq
<=
'1'
;
--
mpm_pagereq <= '1';
if
(
write_ctrl_out
=
b"01"
)
then
if
(
write_ctrl_out
=
b"01"
)
then
write_state
<=
S_NEW_PCK_IN_FIFO
;
write_state
<=
S_NEW_PCK_IN_FIFO
;
...
@@ -1333,8 +1338,13 @@ begin --arch
...
@@ -1333,8 +1338,13 @@ begin --arch
interpck_page_in_advance
<=
'0'
;
interpck_page_in_advance
<=
'0'
;
need_pckstart_usecnt_set
<=
'0'
;
need_pckstart_usecnt_set
<=
'0'
;
need_interpck_usecnt_set
<=
'0'
;
need_interpck_usecnt_set
<=
'0'
;
interpck_page_in_advance_d0
<=
'0'
;
interpck_page_in_advance_d1
<=
'0'
;
--===================================================
--===================================================
else
else
interpck_page_in_advance_d0
<=
interpck_page_in_advance
;
interpck_page_in_advance_d1
<=
interpck_page_in_advance_d0
;
if
(
mpm_pckstart
=
'1'
)
then
if
(
mpm_pckstart
=
'1'
)
then
...
...
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