Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RTSD
HDL
Commits
ab5b6170
Commit
ab5b6170
authored
10 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Added MM broadcast access option.
parent
e9418603
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/common/src/vhdl/common_mem_mux.vhd
+14
-3
14 additions, 3 deletions
libraries/base/common/src/vhdl/common_mem_mux.vhd
with
14 additions
and
3 deletions
libraries/base/common/src/vhdl/common_mem_mux.vhd
+
14
−
3
View file @
ab5b6170
...
@@ -42,6 +42,11 @@
...
@@ -42,6 +42,11 @@
-- . not selected mosi_arr get mosi but with wr='0', rd='0'
-- . not selected mosi_arr get mosi but with wr='0', rd='0'
-- . not selected miso_arr are ignored
-- . not selected miso_arr are ignored
--
--
-- Use default g_broadcast=FALSE for multiplexed individual MM access to
-- each mosi_arr/miso_arr MM port. When g_broadcast=TRUE then a write
-- access to MM port [0] is passed on to all ports and a read access is
-- done from MM port [0]. The other ports cannot be read.
--
-- Remarks:
-- Remarks:
-- . In simulation selecting an unused element address will cause a simulation
-- . In simulation selecting an unused element address will cause a simulation
-- failure. Therefore the element index is only accepted when it is in the
-- failure. Therefore the element index is only accepted when it is in the
...
@@ -58,7 +63,8 @@ USE common_lib.common_pkg.ALL;
...
@@ -58,7 +63,8 @@ USE common_lib.common_pkg.ALL;
USE
common_lib
.
common_mem_pkg
.
ALL
;
USE
common_lib
.
common_mem_pkg
.
ALL
;
ENTITY
common_mem_mux
IS
ENTITY
common_mem_mux
IS
GENERIC
(
GENERIC
(
g_broadcast
:
BOOLEAN
:
=
FALSE
;
g_nof_mosi
:
POSITIVE
:
=
256
;
-- Number of memory interfaces in the array.
g_nof_mosi
:
POSITIVE
:
=
256
;
-- Number of memory interfaces in the array.
g_mult_addr_w
:
POSITIVE
:
=
8
;
-- Address width of each memory-interface element in the muliplexed array.
g_mult_addr_w
:
POSITIVE
:
=
8
;
-- Address width of each memory-interface element in the muliplexed array.
g_rd_latency
:
NATURAL
:
=
0
g_rd_latency
:
NATURAL
:
=
0
...
@@ -83,12 +89,12 @@ ARCHITECTURE rtl OF common_mem_mux IS
...
@@ -83,12 +89,12 @@ ARCHITECTURE rtl OF common_mem_mux IS
BEGIN
BEGIN
gen_single
:
IF
g_nof_mosi
=
1
GENERATE
gen_single
:
IF
g_broadcast
=
FALSE
AND
g_nof_mosi
=
1
GENERATE
mosi_arr
(
0
)
<=
mosi
;
mosi_arr
(
0
)
<=
mosi
;
miso
<=
miso_arr
(
0
);
miso
<=
miso_arr
(
0
);
END
GENERATE
;
END
GENERATE
;
gen_multiple
:
IF
g_nof_mosi
>
1
GENERATE
gen_multiple
:
IF
g_broadcast
=
FALSE
AND
g_nof_mosi
>
1
GENERATE
-- The activated element of the array is detected here
-- The activated element of the array is detected here
index_arr
(
0
)
<=
TO_UINT
(
mosi
.
address
(
c_total_addr_w
-1
DOWNTO
g_mult_addr_w
));
index_arr
(
0
)
<=
TO_UINT
(
mosi
.
address
(
c_total_addr_w
-1
DOWNTO
g_mult_addr_w
));
...
@@ -129,4 +135,9 @@ BEGIN
...
@@ -129,4 +135,9 @@ BEGIN
END
PROCESS
;
END
PROCESS
;
END
GENERATE
;
END
GENERATE
;
gen_broadcast
:
IF
g_broadcast
=
TRUE
GENERATE
mosi_arr
<=
(
OTHERS
=>
mosi
);
-- broadcast write to all [g_nof_mosi-1:0] MM ports
miso
<=
miso_arr
(
0
);
-- broadcast read only from MM port [0]
END
GENERATE
;
END
rtl
;
END
rtl
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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