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
fbf88efd
Commit
fbf88efd
authored
Aug 29, 2016
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swcore: move some constants to swcore_pkg, add shared arrays for ll pages
parent
3c083b1a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
swc_swcore_pkg.vhd
modules/wrsw_swcore/swc_swcore_pkg.vhd
+9
-0
xswc_core.vhd
modules/wrsw_swcore/xswc_core.vhd
+2
-2
No files found.
modules/wrsw_swcore/swc_swcore_pkg.vhd
View file @
fbf88efd
...
...
@@ -54,6 +54,11 @@ use work.swc_wbgen2_pkg.all;
package
swc_swcore_pkg
is
-- Constants that configure the SwCore
constant
c_ll_addr_width
:
integer
:
=
10
;
-- calculated for mem size 64kB and page size 64 words (128B)
constant
c_ll_data_width
:
integer
:
=
15
;
-- calculated for addr_width=10; oobsize=2, +3
----------------------------------------
type
t_swcore_gen_parameters
is
record
num_ports
:
integer
;
mem_pages
:
integer
;
...
...
@@ -65,6 +70,10 @@ package swc_swcore_pkg is
type
t_classes_array
is
array
(
integer
range
<>
)
of
std_logic_vector
(
7
downto
0
);
type
t_ports_masks
is
array
(
integer
range
<>
)
of
std_logic_vector
(
c_RTU_MAX_PORTS
+
1-1
downto
0
);
type
t_lladr_array
is
array
(
integer
range
<>
)
of
std_logic_vector
(
c_ll_addr_width
-1
downto
0
);
type
t_lldat_array
is
array
(
integer
range
<>
)
of
std_logic_vector
(
c_ll_data_width
-1
downto
0
);
component
swc_prio_encoder
generic
(
g_num_inputs
:
integer
range
2
to
80
;
...
...
modules/wrsw_swcore/xswc_core.vhd
View file @
fbf88efd
...
...
@@ -157,8 +157,8 @@ architecture rtl of xswc_core is
constant
c_mpm_partial_sel_width
:
integer
:
=
integer
(
g_wb_sel_width
-1
);
constant
c_mpm_page_size_width
:
integer
:
=
integer
(
CEIL
(
LOG2
(
real
(
g_mpm_page_size
-1
))));
constant
c_ll_addr_width
:
integer
:
=
c_mpm_page_addr_width
;
constant
c_ll_data_width
:
integer
:
=
c_mpm_page_addr_width
+
c_max_oob_size_width
+
3
;
--
constant c_ll_addr_width : integer := c_mpm_page_addr_width;
--
constant c_ll_data_width : integer := c_mpm_page_addr_width + c_max_oob_size_width + 3;
-- resource management -----------------------
constant
c_res_mmu_max_pck_size
:
integer
:
=
759
;
-- in 16 bit words (1518 [octets])/(2 [octets])
...
...
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