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
13e7d8e2
Commit
13e7d8e2
authored
1 year ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Add func_sdp_compose_cep_header() variants.
parent
0490d7b1
Branches
Branches containing commit
No related tags found
1 merge request
!359
Clarify g_nof_destinations_max design revision parameter and package constants...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+99
-28
99 additions, 28 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
with
99 additions
and
28 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+
99
−
28
View file @
13e7d8e2
...
@@ -62,22 +62,43 @@ package tb_sdp_pkg is
...
@@ -62,22 +62,43 @@ package tb_sdp_pkg is
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Beamlet output via 10GbE to CEP (= central processor)
-- Beamlet output via 10GbE to CEP (= central processor)
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
ip_header_checksum
:
natural
;
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
gn_index
:
natural
;
payload_error
:
std_logic
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
beamlet_index
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
payload_error
:
std_logic
;
sdp_info
:
t_sdp_info
;
-- app header
beamlet_scale
:
natural
;
gn_index
:
natural
;
beamlet_index
:
natural
;
payload_error
:
std_logic
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
;
function
func_sdp_verify_cep_header
(
in_hdr
,
exp_hdr
:
t_sdp_cep_header
)
return
boolean
;
function
func_sdp_verify_cep_header
(
in_hdr
,
exp_hdr
:
t_sdp_cep_header
)
return
boolean
;
...
@@ -109,8 +130,8 @@ package tb_sdp_pkg is
...
@@ -109,8 +130,8 @@ package tb_sdp_pkg is
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Beamlet output packet
-- Beamlet output packet
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- beamlet part index [0 : 3] of X, Y, X, Y in network longword:
-- beamlet
complex
part index [0 : 3] of X, Y, X, Y in network longword:
-- - use separate array for re and for im:
-- - use separate array for re
part
and for im
part
:
-- . re[0 : 3] at 0, 2, 4, 6 in longword
-- . re[0 : 3] at 0, 2, 4, 6 in longword
-- . im[0 : 3] at 1, 3, 5, 7 in longword
-- . im[0 : 3] at 1, 3, 5, 7 in longword
subtype
t_sdp_beamlet_part_arr
is
t_slv_8_arr
(
0
to
c_sdp_nof_beamlets_per_longword
*
c_sdp_N_pol_bf
-
1
);
subtype
t_sdp_beamlet_part_arr
is
t_slv_8_arr
(
0
to
c_sdp_nof_beamlets_per_longword
*
c_sdp_N_pol_bf
-
1
);
...
@@ -311,14 +332,16 @@ package body tb_sdp_pkg is
...
@@ -311,14 +332,16 @@ package body tb_sdp_pkg is
return
true
;
return
true
;
end
func_sdp_verify_stat_header
;
end
func_sdp_verify_stat_header
;
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
ip_header_checksum
:
natural
;
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
gn_index
:
natural
;
payload_error
:
std_logic
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
beamlet_index
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
is
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
is
-- Use sim default dst and src MAC, IP, UDP port from sdp_pkg.vhd and based on gn_index
-- Use sim default dst and src MAC, IP, UDP port from sdp_pkg.vhd and based on gn_index
constant
c_mac_15_0
:
std_logic_vector
(
15
downto
0
)
:
=
func_sdp_gn_index_to_mac_15_0
(
gn_index
);
constant
c_mac_15_0
:
std_logic_vector
(
15
downto
0
)
:
=
func_sdp_gn_index_to_mac_15_0
(
gn_index
);
variable
v_hdr
:
t_sdp_cep_header
;
variable
v_hdr
:
t_sdp_cep_header
;
...
@@ -367,14 +390,60 @@ package body tb_sdp_pkg is
...
@@ -367,14 +390,60 @@ package body tb_sdp_pkg is
v_hdr
.
app
.
sdp_reserved
:
=
TO_UVEC
(
0
,
32
);
v_hdr
.
app
.
sdp_reserved
:
=
TO_UVEC
(
0
,
32
);
v_hdr
.
app
.
sdp_beamlet_scale
:
=
TO_UVEC
(
beamlet_scale
,
16
);
v_hdr
.
app
.
sdp_beamlet_scale
:
=
TO_UVEC
(
beamlet_scale
,
16
);
v_hdr
.
app
.
sdp_beamlet_index
:
=
TO_UVEC
(
beamlet_index
,
16
);
v_hdr
.
app
.
sdp_beamlet_index
:
=
TO_UVEC
(
beamlet_index
,
16
);
v_hdr
.
app
.
sdp_nof_blocks_per_packet
:
=
TO_UVEC
(
c_sdp_cep_
nof_blocks_per_packet
,
8
);
v_hdr
.
app
.
sdp_nof_blocks_per_packet
:
=
TO_UVEC
(
nof_blocks_per_packet
,
8
);
v_hdr
.
app
.
sdp_nof_beamlets_per_block
:
=
TO_UVEC
(
c_sdp_cep_
nof_beamlets_per_block
,
16
);
v_hdr
.
app
.
sdp_nof_beamlets_per_block
:
=
TO_UVEC
(
nof_beamlets_per_block
,
16
);
v_hdr
.
app
.
sdp_block_period
:
=
sdp_info
.
block_period
;
v_hdr
.
app
.
sdp_block_period
:
=
sdp_info
.
block_period
;
v_hdr
.
app
.
dp_bsn
:
=
TO_UVEC
(
dp_bsn
,
64
);
v_hdr
.
app
.
dp_bsn
:
=
TO_UVEC
(
dp_bsn
,
64
);
return
v_hdr
;
return
v_hdr
;
end
func_sdp_compose_cep_header
;
end
func_sdp_compose_cep_header
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
nof_blocks_per_packet
:
natural
;
nof_beamlets_per_block
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
is
-- Use sim default dst and src MAC, IP, UDP port from sdp_pkg.vhd and based on gn_index
constant
c_ip_15_0
:
std_logic_vector
(
15
downto
0
)
:
=
func_sdp_gn_index_to_ip_15_0
(
gn_index
);
constant
c_ip_src_addr
:
std_logic_vector
(
31
downto
0
)
:
=
c_sdp_cep_ip_src_addr_31_16
&
c_ip_15_0
;
begin
return
func_sdp_compose_cep_header
(
c_ip_src_addr
,
ip_header_checksum
,
sdp_info
,
gn_index
,
payload_error
,
beamlet_scale
,
beamlet_index
,
nof_blocks_per_packet
,
nof_beamlets_per_block
,
dp_bsn
);
end
func_sdp_compose_cep_header
;
function
func_sdp_compose_cep_header
(
ip_src_addr
:
std_logic_vector
;
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
payload_error
:
std_logic
;
beamlet_scale
:
natural
;
beamlet_index
:
natural
;
dp_bsn
:
natural
)
return
t_sdp_cep_header
is
begin
return
func_sdp_compose_cep_header
(
ip_src_addr
,
ip_header_checksum
,
sdp_info
,
gn_index
,
payload_error
,
beamlet_scale
,
beamlet_index
,
c_sdp_cep_nof_blocks_per_packet
,
c_sdp_cep_nof_beamlets_per_block
,
dp_bsn
);
end
func_sdp_compose_cep_header
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
function
func_sdp_compose_cep_header
(
ip_header_checksum
:
natural
;
sdp_info
:
t_sdp_info
;
-- app header
sdp_info
:
t_sdp_info
;
-- app header
gn_index
:
natural
;
gn_index
:
natural
;
...
@@ -393,6 +462,8 @@ package body tb_sdp_pkg is
...
@@ -393,6 +462,8 @@ package body tb_sdp_pkg is
payload_error
,
payload_error
,
beamlet_scale
,
beamlet_scale
,
beamlet_index
,
beamlet_index
,
c_sdp_cep_nof_blocks_per_packet
,
c_sdp_cep_nof_beamlets_per_block
,
dp_bsn
);
dp_bsn
);
end
func_sdp_compose_cep_header
;
end
func_sdp_compose_cep_header
;
...
...
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