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
94eda902
Commit
94eda902
authored
1 year ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Add types and function for beamlet output packet verification.
parent
8455a6fb
No related branches found
No related tags found
1 merge request
!348
Use use_bdo_transpose = true in c_bf revision. Test use_bdo_transpose = false...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+41
-0
41 additions, 0 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
with
41 additions
and
0 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+
41
−
0
View file @
94eda902
...
...
@@ -105,6 +105,22 @@ package tb_sdp_pkg is
nof_rem
:
natural
)
return
t_real_arr
;
-- 0:3 = ampl, phase, re, im
-----------------------------------------------------------------------------
-- Beamlet output packet
-----------------------------------------------------------------------------
-- beamlet part index in longword [0 : 3] = X, Y, X, Y
subtype
t_sdp_beamlet_longword_list
is
t_slv_8_arr
(
0
to
c_sdp_cep_nof_beamlets_per_longword
*
c_sdp_N_pol_bf
-
1
);
-- beamlet part index in packet [0 : 4 * 488 * 2 - 1] = [0 : 3903]
subtype
t_sdp_beamlet_packet_list
is
t_slv_8_arr
(
0
to
c_sdp_cep_nof_beamlets_per_packet
*
c_sdp_N_pol_bf
-
1
);
-- beamlet part index in block [0 : 488 * 2 - 1] = [0 : 975]
subtype
t_sdp_beamlet_block_list
is
t_slv_8_arr
(
0
to
c_sdp_cep_nof_beamlets_per_block
*
c_sdp_N_pol_bf
-
1
);
function
func_sdp_transpose_packet
(
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
packet_list
:
t_sdp_beamlet_packet_list
)
return
t_sdp_beamlet_packet_list
;
end
package
tb_sdp_pkg
;
package
body
tb_sdp_pkg
is
...
...
@@ -475,4 +491,29 @@ package body tb_sdp_pkg is
return
v_tuple
;
end
;
-- input packet_list:
-- . blk 0, 1, 2, 3, for nof_blocks_per_packet = 4
-- . blet 0:487, 0:487, 0:487, 0:487, for nof_beamlets_per_block = 488
-- . v_in 0,1,2, ... 1951
-- return v_list = transposed packet_list:
-- 0, 1, ..., 487
-- 0:3, 0:3, ..., 0:3
-- 0,488,976,1464, 1,489,977,1465, ..., 487,975,1463,1951
-- . v_out 0,4,8,...,1948, 1,5,9,...,1949, 2,6,10,...,1950, 3,7,11,...,1951
function
func_sdp_transpose_packet
(
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
packet_list
:
t_sdp_beamlet_packet_list
)
return
t_sdp_beamlet_packet_list
is
variable
v_list
:
t_sdp_beamlet_packet_list
;
variable
v_in
:
natural
;
variable
v_out
:
natural
;
begin
for
blk
in
0
to
nof_blocks_per_packet
-
1
loop
for
blet
in
0
to
nof_beamlets_per_block
-
1
loop
v_in
:
=
blk
*
nof_beamlets_per_block
+
blet
;
v_out
:
=
blet
*
nof_blocks_per_packet
+
blk
;
v_list
(
v_out
)
:
=
packet_list
(
v_in
);
end
loop
;
end
loop
;
end
func_sdp_transpose_packet
;
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