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
0af62398
Commit
0af62398
authored
1 year ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Add procedure proc_sdp_cep_rx_beamlets().
parent
50d7c758
No related branches found
No related tags found
1 merge request
!357
Move func_sdp_bdo_cep_hdr_field_sel_dest() from sdp_bdo_pkg to...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+72
-1
72 additions, 1 deletion
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
with
72 additions
and
1 deletion
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd
+
72
−
1
View file @
0af62398
...
...
@@ -25,10 +25,12 @@
-- . This package contains specific constants, functions for sdp test benches.
-- Description:
-------------------------------------------------------------------------------
library
IEEE
,
common_lib
,
reorder_lib
;
library
IEEE
,
common_lib
,
dp_lib
,
reorder_lib
;
use
IEEE
.
std_logic_1164
.
all
;
use
common_lib
.
common_pkg
.
all
;
use
common_lib
.
common_network_layers_pkg
.
all
;
use
common_lib
.
tb_common_pkg
.
all
;
use
dp_lib
.
dp_stream_pkg
.
all
;
use
reorder_lib
.
reorder_pkg
.
all
;
use
work
.
sdp_pkg
.
all
;
...
...
@@ -124,6 +126,17 @@ package tb_sdp_pkg is
function
func_sdp_bdo_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
;
-- CEP Read Rx 10GbE Stream
procedure
proc_sdp_cep_rx_beamlets
(
signal
clk
:
in
std_logic
;
signal
rx_beamlet_sosi
:
in
t_dp_sosi
;
signal
rx_beamlet_cnt
:
inout
natural
;
signal
rx_beamlet_valid
:
out
std_logic
;
signal
rx_beamlet_arr_re
:
out
t_sdp_beamlet_part_arr
;
signal
rx_beamlet_arr_im
:
out
t_sdp_beamlet_part_arr
;
signal
rx_packet_list_re
:
out
t_sdp_beamlet_packet_list
;
signal
rx_packet_list_im
:
out
t_sdp_beamlet_packet_list
);
end
package
tb_sdp_pkg
;
package
body
tb_sdp_pkg
is
...
...
@@ -524,4 +537,62 @@ package body tb_sdp_pkg is
return
v_list
;
end
func_sdp_bdo_transpose_packet
;
-----------------------------------------------------------------------------
-- CEP Read Rx 10GbE Stream
-----------------------------------------------------------------------------
-- Show received beamlets from 10GbE stream in Wave Window
-- . The packet header is 9.25 longwords wide. The dp_offload_rx has stripped
-- the header and has realigned the payload at a longword boundary.
-- . expect c_nof_block_per_sync / c_sdp_cep_nof_blocks_per_packet *
-- c_sdp_N_beamsets = 16 / 4 * 2 = 4 * 2 = 8 packets per sync interval
-- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol
-- and complex beamlets per packet, so 2 dual pol beamlets/64b data word.
-- . Beamlets array is stored big endian in the data, so X.real index 0 first
-- in MSByte of rx_beamlet_sosi.data.
procedure
proc_sdp_cep_rx_beamlets
(
signal
clk
:
in
std_logic
;
signal
rx_beamlet_sosi
:
in
t_dp_sosi
;
signal
rx_beamlet_cnt
:
inout
natural
;
signal
rx_beamlet_valid
:
out
std_logic
;
signal
rx_beamlet_arr_re
:
out
t_sdp_beamlet_part_arr
;
signal
rx_beamlet_arr_im
:
out
t_sdp_beamlet_part_arr
;
signal
rx_packet_list_re
:
out
t_sdp_beamlet_packet_list
;
signal
rx_packet_list_im
:
out
t_sdp_beamlet_packet_list
)
is
begin
rx_beamlet_cnt
<=
0
;
rx_beamlet_valid
<=
'0'
;
-- Wait until start of a beamlet packet
proc_common_wait_until_high
(
clk
,
rx_beamlet_sosi
.
sop
);
-- c_sdp_nof_beamlets_per_longword = 2 dual pol beamlets (= XY, XY) per 64b data word
for
I
in
0
to
(
c_sdp_cep_nof_beamlets_per_packet
/
c_sdp_nof_beamlets_per_longword
)
-
1
loop
proc_common_wait_until_high
(
clk
,
rx_beamlet_sosi
.
valid
);
rx_beamlet_valid
<=
'1'
;
-- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window
rx_beamlet_arr_re
(
0
)
<=
rx_beamlet_sosi
.
data
(
63
downto
56
);
-- X
rx_beamlet_arr_im
(
0
)
<=
rx_beamlet_sosi
.
data
(
55
downto
48
);
rx_beamlet_arr_re
(
1
)
<=
rx_beamlet_sosi
.
data
(
47
downto
40
);
-- Y
rx_beamlet_arr_im
(
1
)
<=
rx_beamlet_sosi
.
data
(
39
downto
32
);
rx_beamlet_arr_re
(
2
)
<=
rx_beamlet_sosi
.
data
(
31
downto
24
);
-- X
rx_beamlet_arr_im
(
2
)
<=
rx_beamlet_sosi
.
data
(
23
downto
16
);
rx_beamlet_arr_re
(
3
)
<=
rx_beamlet_sosi
.
data
(
15
downto
8
);
-- Y
rx_beamlet_arr_im
(
3
)
<=
rx_beamlet_sosi
.
data
(
7
downto
0
);
-- Capture the beamlets block of each packet in rx_packet_list
rx_packet_list_re
(
I
*
4
+
0
)
<=
rx_beamlet_sosi
.
data
(
63
downto
56
);
-- X
rx_packet_list_im
(
I
*
4
+
0
)
<=
rx_beamlet_sosi
.
data
(
55
downto
48
);
rx_packet_list_re
(
I
*
4
+
1
)
<=
rx_beamlet_sosi
.
data
(
47
downto
40
);
-- Y
rx_packet_list_im
(
I
*
4
+
1
)
<=
rx_beamlet_sosi
.
data
(
39
downto
32
);
rx_packet_list_re
(
I
*
4
+
2
)
<=
rx_beamlet_sosi
.
data
(
31
downto
24
);
-- X
rx_packet_list_im
(
I
*
4
+
2
)
<=
rx_beamlet_sosi
.
data
(
23
downto
16
);
rx_packet_list_re
(
I
*
4
+
3
)
<=
rx_beamlet_sosi
.
data
(
15
downto
8
);
-- Y
rx_packet_list_im
(
I
*
4
+
3
)
<=
rx_beamlet_sosi
.
data
(
7
downto
0
);
proc_common_wait_until_high
(
clk
,
rx_beamlet_sosi
.
valid
);
-- Use at least one WAIT instead of proc_common_wait_some_cycles() to
-- avoid Modelsim warning: (vcom-1090) Possible infinite loop: Process
-- contains no WAIT statement.
wait
until
rising_edge
(
clk
);
rx_beamlet_valid
<=
'0'
;
rx_beamlet_cnt
<=
(
rx_beamlet_cnt
+
c_sdp_nof_beamlets_per_longword
)
mod
c_sdp_cep_nof_beamlets_per_block
;
-- 4 blocks/packet
end
loop
;
end
proc_sdp_cep_rx_beamlets
;
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