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
2c50144e
Commit
2c50144e
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Add func_sdp_subband_equalizer().
parent
56d411ae
No related branches found
No related tags found
1 merge request
!311
Correct beamlet output indexing in tr_10GbE_src_out.data. Verify exact beamlet...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+39
-0
39 additions, 0 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
with
39 additions
and
0 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+
39
−
0
View file @
2c50144e
...
...
@@ -77,6 +77,19 @@ PACKAGE tb_sdp_pkg is
FUNCTION
func_sdp_verify_cep_header
(
in_hdr
,
exp_hdr
:
t_sdp_cep_header
)
RETURN
BOOLEAN
;
-----------------------------------------------------------------------------
-- Subband equalizer (ESub)
-----------------------------------------------------------------------------
-- - ESub is like a two input beamformer
-- - Esub function calculates the expected subband level for signal input sp:
-- sp phasor * sp_weight + cross_phasor * cross weigth, where
-- . sp phasor = (sp_subband_ampl, sp_subband_phase)
-- . sp_weight = (sp_esub_gain, sp_esub_phase)
-- . cross_phasor = (cross_subband_ampl, cross_subband_phase)
-- . cross_weight = (cross_esub_gain, cross_esub_phase)
FUNCTION
func_sdp_subband_equalizer
(
sp_subband_ampl
,
sp_subband_phase
,
sp_esub_gain
,
sp_esub_phase
,
cross_subband_ampl
,
cross_subband_phase
,
cross_esub_gain
,
cross_esub_phase
:
REAL
)
RETURN
t_real_arr
;
-- 0:3 = ampl, phase, re, im
END
PACKAGE
tb_sdp_pkg
;
...
...
@@ -393,4 +406,30 @@ PACKAGE BODY tb_sdp_pkg IS
RETURN
TRUE
;
END
func_sdp_verify_cep_header
;
FUNCTION
func_sdp_subband_equalizer
(
sp_subband_ampl
,
sp_subband_phase
,
sp_esub_gain
,
sp_esub_phase
,
cross_subband_ampl
,
cross_subband_phase
,
cross_esub_gain
,
cross_esub_phase
:
REAL
)
RETURN
t_real_arr
IS
-- 0:3 = ampl, phase, re, im
VARIABLE
v_sp_ampl
,
v_sp_phase
,
v_sp_re
,
v_sp_im
:
REAL
;
VARIABLE
v_cross_ampl
,
v_cross_phase
,
v_cross_re
,
v_cross_im
:
REAL
;
VARIABLE
v_sum_ampl
,
v_sum_phase
,
v_sum_re
,
v_sum_im
:
REAL
;
VARIABLE
v_tuple
:
t_real_arr
(
0
TO
3
);
BEGIN
v_sp_ampl
:
=
sp_subband_ampl
*
sp_esub_gain
;
v_sp_phase
:
=
sp_subband_phase
+
sp_esub_phase
;
v_sp_re
:
=
COMPLEX_RE
(
v_sp_ampl
,
v_sp_phase
);
v_sp_im
:
=
COMPLEX_IM
(
v_sp_ampl
,
v_sp_phase
);
v_cross_ampl
:
=
cross_subband_ampl
*
cross_esub_gain
;
v_cross_phase
:
=
cross_subband_phase
+
cross_esub_phase
;
v_cross_re
:
=
COMPLEX_RE
(
v_cross_ampl
,
v_cross_phase
);
v_cross_im
:
=
COMPLEX_IM
(
v_cross_ampl
,
v_cross_phase
);
v_sum_re
:
=
v_sp_re
+
v_cross_re
;
-- ESub sum re
v_sum_im
:
=
v_sp_im
+
v_cross_im
;
-- ESub sum im
v_sum_ampl
:
=
COMPLEX_RADIUS
(
v_sum_re
,
v_sum_im
);
v_sum_phase
:
=
COMPLEX_PHASE
(
v_sum_re
,
v_sum_im
);
v_tuple
:
=
(
0
=>
v_sum_ampl
,
1
=>
v_sum_phase
,
2
=>
v_sum_re
,
3
=>
v_sum_im
);
RETURN
v_tuple
;
END
;
END
tb_sdp_pkg
;
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