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
Merge requests
!38
Resolve
L2SDP-130
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve
L2SDP-130
L2SDP-130
into
master
Overview
16
Commits
8
Pipelines
0
Changes
5
Merged
Reinier van der Walle
requested to merge
L2SDP-130
into
master
4 years ago
Overview
16
Commits
8
Pipelines
0
Changes
5
Expand
Closes
L2SDP-130
0
0
Merge request reports
Compare
master
version 5
04f41dba
4 years ago
version 4
5166274d
4 years ago
version 3
ad374a6d
4 years ago
version 2
ccb077f3
4 years ago
version 1
efdeafd2
4 years ago
master (base)
and
latest version
latest version
20123629
8 commits,
4 years ago
version 5
04f41dba
7 commits,
4 years ago
version 4
5166274d
6 commits,
4 years ago
version 3
ad374a6d
5 commits,
4 years ago
version 2
ccb077f3
4 commits,
4 years ago
version 1
efdeafd2
2 commits,
4 years ago
5 files
+
417
−
6
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
applications/lofar2/libraries/sdp/src/vhdl/node_sdp_filterbank.vhd
0 → 100644
+
201
−
0
Options
-------------------------------------------------------------------------------
--
-- 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:
-- . Implements the functionality of the subband filterbank (Fsub) in the
-- LOFAR2 SDPFW design.
-- Description:
-- . The subband filterbank seperates the incoming timestamped ADC samples into
-- 512 frequency bands called subbands.
-- . It implements a critically sampled poly-phase filterbank (PFB). The PFB consists of a
-- poly-phase finite impulse response (PFIR) filter per real input and a
-- complex fast fourier transform (FFT) per 2 real inputs.
-- . The number of points of the FFT is 1024.
-- Remark:
-- .
-------------------------------------------------------------------------------
LIBRARY
IEEE
,
common_lib
,
dp_lib
,
rTwoSDF_lib
,
wpfb_lib
,
filter_lib
,
si_lib
,
st_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
;
USE
rTwoSDF_lib
.
rTwoSDFPkg
.
ALL
;
USE
filter_lib
.
fil_pkg
.
ALL
;
USE
wpfb_lib
.
wpfb_pkg
.
ALL
;
USE
work
.
sdp_pkg
.
ALL
;
ENTITY
node_sdp_filterbank
IS
GENERIC
(
g_sim
:
BOOLEAN
:
=
FALSE
;
g_scope_selected_subband
:
NATURAL
:
=
0
);
PORT
(
dp_clk
:
IN
STD_LOGIC
;
dp_rst
:
IN
STD_LOGIC
;
in_sosi_arr
:
IN
t_dp_sosi_arr
(
c_sdp_S_pn
-1
DOWNTO
0
);
pfb_sosi_arr
:
OUT
t_dp_sosi_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
);
mm_rst
:
IN
STD_LOGIC
;
mm_clk
:
IN
STD_LOGIC
;
reg_si_mosi
:
IN
t_mem_mosi
:
=
c_mem_mosi_rst
;
reg_si_miso
:
OUT
t_mem_miso
;
ram_st_sst_mosi
:
IN
t_mem_mosi
:
=
c_mem_mosi_rst
;
ram_st_sst_miso
:
OUT
t_mem_miso
;
ram_fil_coefs_mosi
:
IN
t_mem_mosi
:
=
c_mem_mosi_rst
;
ram_fil_coefs_miso
:
OUT
t_mem_miso
);
END
node_sdp_filterbank
;
ARCHITECTURE
str
OF
node_sdp_filterbank
IS
CONSTANT
c_coefs_file_prefix
:
STRING
:
=
"UNUSED"
;
--"data/coefs_wide";
SIGNAL
ram_st_sst_mosi_arr
:
t_mem_mosi_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_mem_mosi_rst
);
SIGNAL
ram_st_sst_miso_arr
:
t_mem_miso_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_mem_miso_rst
);
SIGNAL
si_sosi_arr
:
t_dp_sosi_arr
(
c_sdp_S_pn
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
wpfb_unit_out_sosi_arr
:
t_dp_sosi_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
wpfb_unit_fil_sosi_arr
:
t_dp_sosi_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
wpfb_unit_in_sosi_arr
:
t_dp_sosi_arr
(
c_sdp_P_pfb
-1
DOWNTO
0
)
:
=
(
OTHERS
=>
c_dp_sosi_rst
);
SIGNAL
scope_sosi_arr
:
t_dp_sosi_integer_arr
(
c_sdp_S_pn
-1
DOWNTO
0
);
BEGIN
---------------------------------------------------------------
-- SPECTRAL INVERSION
---------------------------------------------------------------
u_si_arr
:
ENTITY
si_lib
.
si_arr
GENERIC
MAP
(
g_nof_streams
=>
c_sdp_S_pn
,
g_pipeline
=>
1
,
g_dat_w
=>
c_sdp_W_adc
)
PORT
MAP
(
in_sosi_arr
=>
in_sosi_arr
,
out_sosi_arr
=>
si_sosi_arr
,
reg_si_mosi
=>
reg_si_mosi
,
reg_si_miso
=>
reg_si_miso
,
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
dp_clk
=>
dp_clk
,
dp_rst
=>
dp_rst
);
---------------------------------------------------------------
-- POLY-PHASE FILTERBANK
---------------------------------------------------------------
-- Connect the 12 ADC streams to the re and im fields of the PFB input.
p_pfb_streams
:
PROCESS
(
si_sosi_arr
)
BEGIN
FOR
I
IN
0
TO
c_sdp_P_pfb
-1
LOOP
wpfb_unit_in_sosi_arr
(
I
)
<=
si_sosi_arr
(
2
*
I
);
wpfb_unit_in_sosi_arr
(
I
)
.
re
<=
RESIZE_DP_DSP_DATA
(
si_sosi_arr
(
2
*
I
)
.
data
);
wpfb_unit_in_sosi_arr
(
I
)
.
im
<=
RESIZE_DP_DSP_DATA
(
si_sosi_arr
(
2
*
I
+
1
)
.
data
);
END
LOOP
;
END
PROCESS
;
-- PFB
u_wpfb_unit_dev
:
ENTITY
wpfb_lib
.
wpfb_unit_dev
GENERIC
MAP
(
g_wpfb
=>
c_sdp_wpfb_subbands
,
g_use_prefilter
=>
TRUE
,
g_stats_ena
=>
FALSE
,
g_use_bg
=>
FALSE
,
g_coefs_file_prefix
=>
c_coefs_file_prefix
)
PORT
MAP
(
dp_rst
=>
dp_rst
,
dp_clk
=>
dp_clk
,
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
ram_fil_coefs_mosi
=>
ram_fil_coefs_mosi
,
ram_fil_coefs_miso
=>
ram_fil_coefs_miso
,
in_sosi_arr
=>
wpfb_unit_in_sosi_arr
,
fil_sosi_arr
=>
wpfb_unit_fil_sosi_arr
,
out_sosi_arr
=>
wpfb_unit_out_sosi_arr
);
-- Output PFB streams
pfb_sosi_arr
<=
wpfb_unit_out_sosi_arr
;
---------------------------------------------------------------
-- SUBBAND STATISTICS
---------------------------------------------------------------
gen_stats_streams
:
FOR
I
IN
0
TO
c_sdp_P_pfb
-1
GENERATE
u_subband_stats
:
ENTITY
st_lib
.
st_sst
GENERIC
MAP
(
g_nof_stat
=>
c_sdp_N_fft
,
g_in_data_w
=>
c_sdp_W_subband
,
g_stat_data_w
=>
c_sdp_wpfb_subbands
.
stat_data_w
,
g_stat_data_sz
=>
c_sdp_wpfb_subbands
.
stat_data_sz
)
PORT
MAP
(
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
dp_rst
=>
dp_rst
,
dp_clk
=>
dp_clk
,
in_complex
=>
wpfb_unit_out_sosi_arr
(
I
),
ram_st_sst_mosi
=>
ram_st_sst_mosi_arr
(
I
),
ram_st_sst_miso
=>
ram_st_sst_miso_arr
(
I
)
);
END
GENERATE
;
---------------------------------------------------------------
-- COMBINE MEMORY MAPPED INTERFACES
---------------------------------------------------------------
-- Combine the internal array of mm interfaces for the subband
-- statistics to one array.
u_mem_mux_sst
:
ENTITY
common_lib
.
common_mem_mux
GENERIC
MAP
(
g_nof_mosi
=>
c_sdp_P_pfb
,
g_mult_addr_w
=>
ceil_log2
(
c_sdp_N_sub
*
c_sdp_Q_fft
*
c_sdp_wpfb_subbands
.
stat_data_sz
)
)
PORT
MAP
(
mosi
=>
ram_st_sst_mosi
,
miso
=>
ram_st_sst_miso
,
mosi_arr
=>
ram_st_sst_mosi_arr
,
miso_arr
=>
ram_st_sst_miso_arr
);
---------------------------------------------------------------
-- SIGNAL SCOPE
---------------------------------------------------------------
u_sdp_scope
:
ENTITY
work
.
sdp_scope
GENERIC
MAP
(
g_sim
=>
g_sim
,
g_selected_subband
=>
g_scope_selected_subband
)
PORT
MAP
(
clk
=>
dp_clk
,
rst
=>
dp_rst
,
sp_sosi_arr
=>
wpfb_unit_out_sosi_arr
,
scope_sosi_arr
=>
scope_sosi_arr
);
END
str
;
Loading