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
15
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
634b63db
Commit
634b63db
authored
11 years ago
by
Maciej Lipinski
Browse files
Options
Downloads
Patches
Plain Diff
[swcore/alloc] added comments, changed manifest
parent
b8ce9f54
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/wrsw_swcore/Manifest.py
+9
-3
9 additions, 3 deletions
modules/wrsw_swcore/Manifest.py
modules/wrsw_swcore/new_allocator/swc_multiport_page_allocator.vhd
+76
-29
76 additions, 29 deletions
...rsw_swcore/new_allocator/swc_multiport_page_allocator.vhd
with
85 additions
and
32 deletions
modules/wrsw_swcore/Manifest.py
+
9
−
3
View file @
634b63db
...
@@ -11,12 +11,18 @@ files = [
...
@@ -11,12 +11,18 @@ files = [
"
swc_core.vhd
"
,
"
swc_core.vhd
"
,
"
swc_multiport_linked_list.vhd
"
,
"
swc_multiport_linked_list.vhd
"
,
"
optimized_new_allocator/swc_multiport_page_allocator.vhd
"
,
"
optimized_new_allocator/swc_page_alloc_ram_bug.vhd
"
,
#"optimized_new_allocator/swc_page_alloc.vhd",
# new by TOM
#"new_allocator/swc_multiport_page_allocator.vhd",
#"new_allocator/swc_multiport_page_allocator.vhd",
#"new_allocator/swc_page_alloc_ram_bug.vhd",
#"new_allocator/swc_page_alloc_ram_bug.vhd",
#"new_allocator/swc_page_alloc.vhd",
# working
"
old_allocator/swc_multiport_page_allocator.vhd
"
,
#
"old_allocator/swc_multiport_page_allocator.vhd",
"
old_allocator/swc_page_alloc_old.vhd
"
,
#
"old_allocator/swc_page_alloc_old.vhd",
"
swc_alloc_resource_manager.vhd
"
,
"
swc_alloc_resource_manager.vhd
"
,
...
...
This diff is collapsed.
Click to expand it.
modules/wrsw_swcore/new_allocator/swc_multiport_page_allocator.vhd
+
76
−
29
View file @
634b63db
...
@@ -55,7 +55,14 @@ entity swc_multiport_page_allocator is
...
@@ -55,7 +55,14 @@ entity swc_multiport_page_allocator is
g_page_addr_width
:
integer
:
=
10
;
--:= c_swc_page_addr_width;
g_page_addr_width
:
integer
:
=
10
;
--:= c_swc_page_addr_width;
g_num_ports
:
integer
:
=
7
;
--:= c_swc_num_ports
g_num_ports
:
integer
:
=
7
;
--:= c_swc_num_ports
g_page_num
:
integer
:
=
1024
;
--:= c_swc_packet_mem_num_pages
g_page_num
:
integer
:
=
1024
;
--:= c_swc_packet_mem_num_pages
g_usecount_width
:
integer
:
=
3
--:= c_swc_usecount_width
g_usecount_width
:
integer
:
=
3
;
--:= c_swc_usecount_width
--- resource manager
g_max_pck_size
:
integer
;
g_page_size
:
integer
;
g_special_res_num_pages
:
integer
;
g_resource_num
:
integer
;
-- this include 1 for unknown
g_resource_num_width
:
integer
;
g_num_dbg_vector_width
:
integer
);
);
port
(
port
(
rst_n_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
...
@@ -83,7 +90,32 @@ entity swc_multiport_page_allocator is
...
@@ -83,7 +90,32 @@ entity swc_multiport_page_allocator is
nomem_o
:
out
std_logic
;
nomem_o
:
out
std_logic
;
tap_out_o
:
out
std_logic_vector
(
62
+
49
downto
0
)
--------------------------- resource management ----------------------------------
-- resource number
resource_i
:
in
std_logic_vector
(
g_num_ports
*
g_resource_num_width
-1
downto
0
);
-- outputed when freeing
resource_o
:
out
std_logic_vector
(
g_num_ports
*
g_resource_num_width
-1
downto
0
);
-- used only when freeing page,
-- if HIGH then the input resource_i value will be used
-- if LOW then the value read from memory will be used (stored along with usecnt)
free_resource_i
:
in
std_logic_vector
(
g_num_ports
*
g_resource_num_width
-
1
downto
0
);
free_resource_valid_i
:
in
std_logic_vector
(
g_num_ports
-
1
downto
0
);
force_free_resource_i
:
in
std_logic_vector
(
g_num_ports
*
g_resource_num_width
-
1
downto
0
);
force_free_resource_valid_i
:
in
std_logic_vector
(
g_num_ports
-
1
downto
0
);
-- number of pages added to the resurce
rescnt_page_num_i
:
in
std_logic_vector
(
g_num_ports
*
g_page_addr_width
-1
downto
0
);
-- indicates whether the resources where re-located to the proper resource, if not, then the
-- whole usecnt operation is abandoned
set_usecnt_succeeded_o
:
out
std_logic_vector
(
g_num_ports
-1
downto
0
);
res_full_o
:
out
std_logic_vector
(
g_num_ports
*
g_resource_num
-1
downto
0
);
res_almost_full_o
:
out
std_logic_vector
(
g_num_ports
*
g_resource_num
-1
downto
0
);
dbg_o
:
out
std_logic_vector
(
g_num_dbg_vector_width
-
1
downto
0
)
-- tap_out_o : out std_logic_vector(62 + 49 downto 0)
);
);
end
swc_multiport_page_allocator
;
end
swc_multiport_page_allocator
;
...
@@ -349,32 +381,47 @@ begin -- syn
...
@@ -349,32 +381,47 @@ begin -- syn
end
if
;
end
if
;
end
process
;
end
process
;
tap_out_o
<=
f_slv_resize
(
--------------------------------------------------------------------------------------------------
dbg_q_write
&
-- Resource Manager logic and instantiation
dbg_q_read
&
--------------------------------------------------------------------------------------------------
dbg_initializing
&
-- dummy
alloc_i
&
set_usecnt_succeeded_o
<=
(
others
=>
'1'
);
free_i
&
res_full_o
<=
(
others
=>
'0'
);
force_free_i
&
res_almost_full_o
<=
(
others
=>
'0'
);
set_usecnt_i
&
resource_o
<=
(
others
=>
'0'
);
alloc_done
&
free_done
&
force_free_done
&
-- 56
set_usecnt_done
&
-- 48
--------------------------------------------------------------------------------------------------
pg_alloc
&
-- 47
pg_free
&
-- 46
-- tap_out_o <= f_slv_resize
pg_free_last_usecnt
&
-- 45
-- (
pg_force_free
&
-- 44
-- dbg_q_write &
pg_set_usecnt
&
-- 43
-- dbg_q_read &
pg_usecnt
&
-- 40
-- dbg_initializing &
pg_addr
&
-- 30
-- alloc_i &
pg_addr_alloc
&
-- 20
-- free_i &
pg_done
&
-- 19
-- force_free_i &
pg_nomem
&
-- 18
-- set_usecnt_i &
dbg_double_free
&
-- 17
--
dbg_double_force_free
,
-- 16
-- alloc_done&
50
+
62
);
-- free_done &
-- force_free_done& -- 56
-- set_usecnt_done & -- 48
-- pg_alloc & -- 47
-- pg_free & -- 46
-- pg_free_last_usecnt & -- 45
-- pg_force_free & -- 44
-- pg_set_usecnt & -- 43
-- pg_usecnt & -- 40
-- pg_addr & -- 30
-- pg_addr_alloc & -- 20
-- pg_done & -- 19
-- pg_nomem & -- 18
-- dbg_double_free & -- 17
-- dbg_double_force_free , -- 16
-- 50 + 62);
end
syn
;
end
syn
;
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