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
621cf0e4
Commit
621cf0e4
authored
Mar 18, 2011
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HDL: wrsw_swcore: migrated RAMS/FIFOs to genrams
parent
e4fb4e04
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
268 additions
and
249 deletions
+268
-249
swc_input_block.vhd
swc_input_block.vhd
+14
-11
swc_lost_pck_dealloc.vhd
swc_lost_pck_dealloc.vhd
+13
-16
swc_page_alloc.vhd
swc_page_alloc.vhd
+214
-195
swc_pck_pg_free_module.vhd
swc_pck_pg_free_module.vhd
+27
-27
No files found.
swc_input_block.vhd
View file @
621cf0e4
...
...
@@ -6,7 +6,7 @@
-- Author : Maciej Lipinski
-- Company : CERN BE-Co-HT
-- Created : 2010-10-28
-- Last update: 201
0-12-07
-- Last update: 201
1-03-16
-- Platform : FPGA-generic
-- Standard : VHDL'87
-------------------------------------------------------------------------------
...
...
@@ -63,7 +63,7 @@ use ieee.numeric_std.all;
library
work
;
use
work
.
swc_swcore_pkg
.
all
;
use
work
.
platform_specific
.
all
;
use
work
.
genram_pkg
.
all
;
entity
swc_input_block
is
...
...
@@ -191,6 +191,7 @@ architecture syn of swc_input_block is
signal
fifo_data_in
:
std_logic_vector
(
c_swc_data_width
+
c_swc_ctrl_width
+
2
-
1
downto
0
);
signal
fifo_wr
:
std_logic
;
signal
fifo_clean
:
std_logic
;
signal
fifo_clear_n
:
std_logic
;
signal
fifo_rd
:
std_logic
;
signal
fifo_data_out
:
std_logic_vector
(
c_swc_data_width
+
c_swc_ctrl_width
+
2
-
1
downto
0
);
signal
fifo_empty
:
std_logic
;
...
...
@@ -427,28 +428,30 @@ begin --arch
or
fifo_full
=
'1'
)
else
'0'
;
fifo_full_in_advance
<=
'1'
when
((
fifo_usedw
>
std_logic_vector
(
to_unsigned
(
c_swc_fifo_full_in_advance
,
c_swc_input_fifo_size_log2
)))
when
((
fifo_usedw
>
std_logic_vector
(
to_unsigned
(
c_swc_fifo_full_in_advance
,
c_swc_input_fifo_size_log2
)))
or
fifo_full
=
'1'
)
else
'0'
;
FIFO
:
generic_sync_fifo
fifo_clear_n
<=
not
fifo_clean
;
U_FIFO
:
generic_sync_fifo
generic
map
(
g_width
=>
c_swc_data_width
+
c_swc_ctrl_width
+
2
,
g_
depth
=>
c_swc_input_fifo_size
,
g_
depth_log2
=>
c_swc_input_fifo_size_log2
g_
data_
width
=>
c_swc_data_width
+
c_swc_ctrl_width
+
2
,
g_
size
=>
c_swc_input_fifo_size
,
g_
with_count
=>
true
)
port
map
(
clk_i
=>
clk_i
,
clear_i
=>
fifo_clea
n
,
rst_n_i
=>
fifo_clear_
n
,
w
r_req
_i
=>
fifo_wr
,
w
e
_i
=>
fifo_wr
,
d_i
=>
fifo_data_in
,
rd_
req_
i
=>
fifo_rd
,
rd_i
=>
fifo_rd
,
q_o
=>
fifo_data_out
,
empty_o
=>
fifo_empty
,
full_o
=>
fifo_full
,
usedw
_o
=>
fifo_usedw
count
_o
=>
fifo_usedw
);
--==================================================================================================
...
...
swc_lost_pck_dealloc.vhd
View file @
621cf0e4
...
...
@@ -6,7 +6,7 @@
-- Author : Maciej Lipinski
-- Company : CERN BE-Co-HT
-- Created : 2010-11-15
-- Last update: 201
0-11
-15
-- Last update: 201
1-03
-15
-- Platform : FPGA-generic
-- Standard : VHDL'87
-------------------------------------------------------------------------------
...
...
@@ -48,7 +48,7 @@ use ieee.numeric_std.all;
library
work
;
use
work
.
swc_swcore_pkg
.
all
;
use
work
.
platform_specific
.
all
;
use
work
.
genram_pkg
.
all
;
entity
swc_lost_pck_dealloc
is
...
...
@@ -107,18 +107,16 @@ architecture syn of swc_lost_pck_dealloc is
signal
next_page
:
std_logic_vector
(
c_swc_page_addr_width
-
1
downto
0
);
signal
ll_read_req
:
std_logic
;
signal
mmu_force_free
:
std_logic
;
signal
ll_read_req
:
std_logic
;
signal
mmu_force_free
:
std_logic
;
signal
ones
:
std_logic_vector
(
c_swc_page_addr_width
-
1
downto
0
);
begin
-- syn
ones
<=
(
others
=>
'1'
);
fifo_clean
<=
not
rst_n_i
;
INPUT
:
process
(
clk_i
,
rst_n_i
)
begin
...
...
@@ -161,25 +159,24 @@ begin -- syn
end
process
;
FIFO
:
generic_sync_fifo
U_
FIFO
:
generic_sync_fifo
generic
map
(
g_width
=>
c_swc_page_addr_width
,
g_depth
=>
16
,
g_depth_log2
=>
4
g_data_width
=>
c_swc_page_addr_width
,
g_size
=>
16
)
port
map
(
clk_i
=>
clk_i
,
clear_i
=>
fifo_clean
,
rst_n_i
=>
rst_n_i
,
w
r_req
_i
=>
fifo_wr
,
w
e
_i
=>
fifo_wr
,
d_i
=>
fifo_data_in
,
rd_
req_
i
=>
fifo_rd
,
rd_i
=>
fifo_rd
,
q_o
=>
fifo_data_out
,
empty_o
=>
fifo_empty
,
full_o
=>
fifo_full
,
usedw
_o
=>
open
count
_o
=>
open
);
...
...
swc_page_alloc.vhd
View file @
621cf0e4
This diff is collapsed.
Click to expand it.
swc_pck_pg_free_module.vhd
View file @
621cf0e4
...
...
@@ -6,7 +6,7 @@
-- Author : Maciej Lipinski
-- Company : CERN BE-Co-HT
-- Created : 2010-11-15
-- Last update: 201
0-11
-15
-- Last update: 201
1-03
-15
-- Platform : FPGA-generic
-- Standard : VHDL'87
-------------------------------------------------------------------------------
...
...
@@ -48,8 +48,7 @@ use ieee.numeric_std.all;
library
work
;
use
work
.
swc_swcore_pkg
.
all
;
use
work
.
platform_specific
.
all
;
use
work
.
genram_pkg
.
all
;
entity
swc_pck_pg_free_module
is
...
...
@@ -93,7 +92,7 @@ architecture syn of swc_pck_pg_free_module is
S_READ_NEXT_PAGE_ADDR
,
S_FREE_CURRENT_PAGE_ADDR
,
S_FORCE_FREE_CURRENT_PAGE_ADDR
);
);
signal
state
:
t_state
;
...
...
@@ -120,6 +119,7 @@ architecture syn of swc_pck_pg_free_module is
signal
ones
:
std_logic_vector
(
c_swc_page_addr_width
-
1
downto
0
);
signal
freeing_mode
:
std_logic_vector
(
1
downto
0
);
signal
fifo_clear_n
:
std_logic
;
begin
-- syn
...
...
@@ -175,29 +175,29 @@ begin -- syn
end
if
;
end
process
;
FIFO
:
generic_sync_fifo
generic
map
(
g_width
=>
c_swc_page_addr_width
+
2
,
g_depth
=>
c_swc_freeing_fifo_size
,
--16,
g
_depth_log2
=>
c_swc_freeing_fifo_log2
--4
)
port
map
(
clk_i
=>
clk_i
,
clear_i
=>
fifo_clean
,
wr_req_i
=>
fifo_wr
,
d_i
=>
fifo_data_in
,
rd_req_i
=>
fifo_rd
,
q_o
=>
fifo_data_out
,
empty_o
=>
fifo_empty
,
full_o
=>
fifo_full
,
usedw_o
=>
open
);
fifo_clear_n
<=
not
fifo_clean
;
-- replaced by GenRams component: TW
U_FIFO
:
generic_sync_fifo
g
eneric
map
(
g_data_width
=>
c_swc_page_addr_width
+
2
,
g_size
=>
c_swc_freeing_fifo_size
)
port
map
(
rst_n_i
=>
fifo_clear_n
,
clk_i
=>
clk_i
,
d_i
=>
fifo_data_in
,
we_i
=>
fifo_wr
,
q_o
=>
fifo_data_out
,
rd_i
=>
fifo_rd
,
empty_o
=>
fifo_empty
,
full_o
=>
fifo_full
,
almost_empty_o
=>
open
,
almost_full_o
=>
open
,
count_o
=>
open
);
fsm_force_free
:
process
(
clk_i
,
rst_n_i
)
begin
if
rising_edge
(
clk_i
)
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