Skip to content
GitLab
Explore
Sign in
Register
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
3d2282d4
Commit
3d2282d4
authored
4 years ago
by
Reinier van der Walle
Browse files
Options
Downloads
Patches
Plain Diff
Added dedicated mem constant.
parent
6059a772
No related branches found
Branches containing commit
No related tags found
1 merge request
!33
Added si_arr.vhd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/dsp/si/src/vhdl/si_arr.vhd
+97
-95
97 additions, 95 deletions
libraries/dsp/si/src/vhdl/si_arr.vhd
with
97 additions
and
95 deletions
libraries/dsp/si/src/vhdl/si_arr.vhd
+
97
−
95
View file @
3d2282d4
-------------------------------------------------------------------------------
--
-- Copyright 2020
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
-- Author: R. van der Walle
-- Purpose: Array wrapper for Spectral inversion.
-- Description:
-- . Adds array support and Memory Mapped enable interface to si.vhd.
-- Remark:
-- . See si.vhd for more detail.
-------------------------------------------------------------------------------
LIBRARY
IEEE
,
common_lib
,
dp_lib
;
USE
IEEE
.
STD_LOGIC_1164
.
ALL
;
USE
common_lib
.
common_pkg
.
ALL
;
USE
common_lib
.
common_mem_pkg
.
ALL
;
USE
dp_lib
.
dp_stream_pkg
.
ALL
;
ENTITY
si_arr
IS
GENERIC
(
g_nof_streams
:
NATURAL
:
=
1
;
g_pipeline
:
NATURAL
:
=
1
;
-- 0 for wires, 1 for output pipeline
g_dat_w
:
NATURAL
:
=
18
);
PORT
(
in_sosi_arr
:
IN
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
out_sosi_arr
:
OUT
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
reg_si_mosi
:
IN
t_mem_mosi
:
=
c_mem_mosi_rst
;
reg_si_miso
:
OUT
t_mem_miso
;
mm_rst
:
IN
STD_LOGIC
;
mm_clk
:
IN
STD_LOGIC
;
dp_clk
:
IN
STD_LOGIC
;
dp_rst
:
IN
STD_LOGIC
);
END
si_arr
;
ARCHITECTURE
str
OF
si_arr
IS
SIGNAL
reg_si_en
:
STD_LOGIC_VECTOR
(
c_mem_reg
.
dat_w
*
c_mem_reg
.
nof_dat
-1
DOWNTO
0
);
BEGIN
u_mms_common_reg
:
ENTITY
common_lib
.
mms_common_reg
GENERIC
MAP
(
g_mm_reg
=>
c_mem_reg
)
PORT
MAP
(
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
st_rst
=>
dp_rst
,
st_clk
=>
dp_clk
,
reg_mosi
=>
reg_si_mosi
,
reg_miso
=>
reg_si_miso
,
in_reg
=>
reg_si_en
,
out_reg
=>
reg_si_en
);
gen_nof_streams
:
FOR
I
in
0
TO
g_nof_streams
-1
GENERATE
u_si
:
ENTITY
work
.
si
GENERIC
MAP
(
g_pipeline
=>
g_pipeline
,
g_dat_w
=>
g_dat_w
)
PORT
MAP
(
in_sosi
=>
in_sosi_arr
(
I
),
out_sosi
=>
out_sosi_arr
(
I
),
si_en
=>
reg_si_en
(
0
),
clk
=>
dp_clk
,
rst
=>
dp_rst
);
END
GENERATE
;
END
str
;
-------------------------------------------------------------------------------
--
-- Copyright 2020
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
--
-- Author: R. van der Walle
-- Purpose: Array wrapper for Spectral inversion.
-- Description:
-- . Adds array support and Memory Mapped enable interface to si.vhd.
-- Remark:
-- . See si.vhd for more detail.
-------------------------------------------------------------------------------
LIBRARY
IEEE
,
common_lib
,
dp_lib
;
USE
IEEE
.
STD_LOGIC_1164
.
ALL
;
USE
common_lib
.
common_pkg
.
ALL
;
USE
common_lib
.
common_mem_pkg
.
ALL
;
USE
dp_lib
.
dp_stream_pkg
.
ALL
;
ENTITY
si_arr
IS
GENERIC
(
g_nof_streams
:
NATURAL
:
=
1
;
g_pipeline
:
NATURAL
:
=
1
;
-- 0 for wires, 1 for output pipeline
g_dat_w
:
NATURAL
:
=
18
);
PORT
(
in_sosi_arr
:
IN
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
out_sosi_arr
:
OUT
t_dp_sosi_arr
(
g_nof_streams
-1
DOWNTO
0
);
reg_si_mosi
:
IN
t_mem_mosi
:
=
c_mem_mosi_rst
;
reg_si_miso
:
OUT
t_mem_miso
;
mm_rst
:
IN
STD_LOGIC
;
mm_clk
:
IN
STD_LOGIC
;
dp_clk
:
IN
STD_LOGIC
;
dp_rst
:
IN
STD_LOGIC
);
END
si_arr
;
ARCHITECTURE
str
OF
si_arr
IS
CONSTANT
c_si_mem_reg
:
t_c_mem
:
=
(
c_mem_reg_rd_latency
,
1
,
1
,
1
,
'0'
);
SIGNAL
reg_si_en
:
STD_LOGIC_VECTOR
(
c_si_mem_reg
.
dat_w
*
c_si_mem_reg
.
nof_dat
-1
DOWNTO
0
);
BEGIN
u_mms_common_reg
:
ENTITY
common_lib
.
mms_common_reg
GENERIC
MAP
(
g_mm_reg
=>
c_si_mem_reg
)
PORT
MAP
(
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
st_rst
=>
dp_rst
,
st_clk
=>
dp_clk
,
reg_mosi
=>
reg_si_mosi
,
reg_miso
=>
reg_si_miso
,
in_reg
=>
reg_si_en
,
out_reg
=>
reg_si_en
);
gen_nof_streams
:
FOR
I
in
0
TO
g_nof_streams
-1
GENERATE
u_si
:
ENTITY
work
.
si
GENERIC
MAP
(
g_pipeline
=>
g_pipeline
,
g_dat_w
=>
g_dat_w
)
PORT
MAP
(
in_sosi
=>
in_sosi_arr
(
I
),
out_sosi
=>
out_sosi_arr
(
I
),
si_en
=>
reg_si_en
(
0
),
clk
=>
dp_clk
,
rst
=>
dp_rst
);
END
GENERATE
;
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