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
ecf09b7f
Commit
ecf09b7f
authored
3 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Added multi-instance support to MMS wrapper.
parent
1effe572
No related branches found
No related tags found
3 merge requests
!101
Merged sub-branch L2SDP-151 into L2SDP-143 (st_histogram rework)
,
!99
Cleaned/rewrote st_histogram.
,
!98
Major rework on st_histogram.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/dsp/st/src/vhdl/mms_st_histogram.vhd
+68
-72
68 additions, 72 deletions
libraries/dsp/st/src/vhdl/mms_st_histogram.vhd
with
68 additions
and
72 deletions
libraries/dsp/st/src/vhdl/mms_st_histogram.vhd
+
68
−
72
View file @
ecf09b7f
...
@@ -18,37 +18,10 @@
...
@@ -18,37 +18,10 @@
--
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Author:
--
-- . Daniel van der Schuur
-- Author: J.W.E. Oudman
-- Purpose:
-- Purpose: Create a histogram from the input data and present it to the MM bus
-- . MM-wrapper that adds registers and multi-instance support to st_histogram.
-- Description:
-- mms_st_histogram couples the st_histogram component which works entirely
-- in the dp clock domain through st_histogram_reg that handles the cross
-- domain conversion to the MM bus.
--
--
-- --------------------------------------
-- | mms_st_histogram |
-- | |
-- | ---------------- | -------
-- snk_in -->|-->| st_histogram | | ^
-- | ---------------- | |
-- | | ^ |
-- | | | | dp clock domain
-- | ram_st_histogram_miso |
-- | | | |
-- | | ram_st_histogram_mosi | |
-- | v | | v
-- | -------------------- | -------
-- | | st_histogram_reg |-- ram_miso -->|--> mm clock domain
-- | | |<-- ram_mosi --|<--
-- | -------------------- | -------
-- | |
-- --------------------------------------
--
--
-------------------------------------------------------------------------------
LIBRARY
IEEE
,
common_lib
,
mm_lib
,
technology_lib
,
dp_lib
;
LIBRARY
IEEE
,
common_lib
,
mm_lib
,
technology_lib
,
dp_lib
;
USE
IEEE
.
std_logic_1164
.
ALL
;
USE
IEEE
.
std_logic_1164
.
ALL
;
...
@@ -59,67 +32,90 @@ USE technology_lib.technology_select_pkg.ALL;
...
@@ -59,67 +32,90 @@ USE technology_lib.technology_select_pkg.ALL;
ENTITY
mms_st_histogram
IS
ENTITY
mms_st_histogram
IS
GENERIC
(
GENERIC
(
g_nof_instances
:
NATURAL
;
g_data_w
:
NATURAL
;
g_data_w
:
NATURAL
;
g_nof_bins
:
NATURAL
;
g_nof_bins
:
NATURAL
;
g_nof_data_per_sync
:
NATURAL
g_nof_data_per_sync
:
NATURAL
);
);
PORT
(
PORT
(
dp_clk
:
IN
STD_LOGIC
;
dp_clk
:
IN
STD_LOGIC
;
dp_rst
:
IN
STD_LOGIC
;
dp_rst
:
IN
STD_LOGIC
;
snk_in
:
IN
t_dp_sosi
;
snk_in
_arr
:
IN
t_dp_sosi
_arr
(
g_nof_instances
-1
DOWNTO
0
)
;
mm_clk
:
IN
STD_LOGIC
;
mm_clk
:
IN
STD_LOGIC
;
mm_rst
:
IN
STD_LOGIC
;
mm_rst
:
IN
STD_LOGIC
;
reg_mosi
:
IN
t_mem_mosi
;
reg_mosi
:
IN
t_mem_mosi
;
reg_miso
:
OUT
t_mem_miso
;
reg_miso
:
OUT
t_mem_miso
;
ram_mosi
:
IN
t_mem_mosi
;
ram_mosi
:
IN
t_mem_mosi
;
ram_miso
:
OUT
t_mem_miso
ram_miso
:
OUT
t_mem_miso
);
);
END
mms_st_histogram
;
END
mms_st_histogram
;
ARCHITECTURE
str
OF
mms_st_histogram
IS
ARCHITECTURE
str
OF
mms_st_histogram
IS
SIGNAL
ram_clear
:
STD_LOGIC
;
SIGNAL
reg_mosi_arr
:
t_mem_mosi_arr
(
g_nof_instances
-1
DOWNTO
0
);
SIGNAL
ram_clearing
:
STD_LOGIC
;
SIGNAL
reg_miso_arr
:
t_mem_miso_arr
(
g_nof_instances
-1
DOWNTO
0
);
SIGNAL
ram_mosi_arr
:
t_mem_mosi_arr
(
g_nof_instances
-1
DOWNTO
0
);
SIGNAL
ram_miso_arr
:
t_mem_miso_arr
(
g_nof_instances
-1
DOWNTO
0
);
SIGNAL
ram_clear_arr
:
STD_LOGIC_VECTOR
(
g_nof_instances
-1
DOWNTO
0
);
SIGNAL
ram_clearing_arr
:
STD_LOGIC_VECTOR
(
g_nof_instances
-1
DOWNTO
0
);
BEGIN
BEGIN
-------------------------------------------------------------------------------
-- st_histogram instances and their registers
-------------------------------------------------------------------------------
gen_st_histogram
:
FOR
i
IN
0
TO
g_nof_instances
-1
GENERATE
u_st_histogram
:
ENTITY
work
.
st_histogram
GENERIC
MAP
(
g_data_w
=>
g_data_w
,
g_nof_bins
=>
g_nof_bins
,
g_nof_data_per_sync
=>
g_nof_data_per_sync
)
PORT
MAP
(
dp_clk
=>
dp_clk
,
dp_rst
=>
dp_rst
,
snk_in
=>
snk_in_arr
(
i
),
u_st_histogram
:
ENTITY
work
.
st_histogram
ram_clear
=>
ram_clear_arr
(
i
),
GENERIC
MAP
(
ram_clearing
=>
ram_clearing_arr
(
i
),
g_data_w
=>
g_data_w
,
g_nof_bins
=>
g_nof_bins
,
ram_mosi
=>
ram_mosi_arr
(
i
),
g_nof_data_per_sync
=>
g_nof_data_per_sync
ram_miso
=>
ram_miso_arr
(
i
)
)
);
PORT
MAP
(
dp_clk
=>
dp_clk
,
u_st_histogram_reg
:
ENTITY
work
.
st_histogram_reg
dp_rst
=>
dp_rst
,
PORT
MAP
(
dp_clk
=>
dp_clk
,
snk_in
=>
snk_in
,
dp_rst
=>
dp_rst
,
ram_clear
=>
ram_clear
,
ram_clearing
=>
ram_clearing_arr
(
i
),
ram_clearing
=>
ram_clearing
,
ram_mosi
=>
ram_mosi
,
ram_miso
=>
ram_miso
);
u_st_histogram_reg
:
ENTITY
work
.
st_histogram_reg
mm_clk
=>
mm_clk
,
PORT
MAP
(
mm_rst
=>
mm_rst
,
dp_clk
=>
dp_clk
,
dp_rst
=>
dp_rst
,
ram_clear
=>
ram_clear_arr
(
i
),
reg_mosi
=>
reg_mosi
,
reg_miso
=>
reg_miso
);
END
GENERATE
;
ram_clearing
=>
ram_clearing
,
mm_clk
=>
mm_clk
,
-------------------------------------------------------------------------------
mm_rst
=>
mm_rst
,
-- reg_mosi/miso multiplexer from g_nof_instances to 1
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- ram_mosi/miso multiplexer from g_nof_instances to 1
-------------------------------------------------------------------------------
ram_clear
=>
ram_clear
,
reg_mosi
=>
reg_mosi
,
reg_miso
=>
reg_miso
);
END
str
;
END
str
;
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