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
4c138888
Commit
4c138888
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Rename offload signals.
parent
5a4db5e8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#28969
passed
3 years ago
Stage: simulation
Stage: synthesis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd
+38
-38
38 additions, 38 deletions
...ofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd
with
38 additions
and
38 deletions
applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd
+
38
−
38
View file @
4c138888
...
...
@@ -32,7 +32,7 @@
-- Usage:
-- > as 8
-- > run -a
-- . for header: view
test
_offload_sosi and the rx_sdp_stat_header.app fields
-- . for header: view
rx
_offload_sosi and the rx_sdp_stat_header.app fields
-- . for payload: view rx_val, rx_data and exp_data
-------------------------------------------------------------------------------
...
...
@@ -172,15 +172,15 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS
SIGNAL
in_crosslets_info_rec
:
t_sdp_crosslets_info
;
SIGNAL
in_crosslets_info_slv
:
STD_LOGIC_VECTOR
(
c_sdp_crosslets_info_reg_w
-1
DOWNTO
0
);
SIGNAL
offload_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
-- 32 bit
SIGNAL
offload_sosi
:
t_dp_sosi
;
SIGNAL
offload_siso
:
t_dp_siso
:
=
c_dp_siso_rst
;
SIGNAL
sdp_
offload_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
-- 32 bit
SIGNAL
sdp_
offload_sosi
:
t_dp_sosi
;
SIGNAL
sdp_
offload_siso
:
t_dp_siso
:
=
c_dp_siso_rst
;
SIGNAL
test
_offload_en
:
STD_LOGIC
:
=
'0'
;
SIGNAL
test
_offload_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
-- 32 bit
SIGNAL
test
_offload_sosi
:
t_dp_sosi
:
=
c_dp_sosi_rst
;
SIGNAL
test
_offload_sop_cnt
:
NATURAL
:
=
0
;
SIGNAL
test
_offload_eop_cnt
:
NATURAL
:
=
0
;
SIGNAL
rx
_offload_en
:
STD_LOGIC
:
=
'0'
;
SIGNAL
rx
_offload_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
-- 32 bit
SIGNAL
rx
_offload_sosi
:
t_dp_sosi
:
=
c_dp_sosi_rst
;
SIGNAL
rx
_offload_sop_cnt
:
NATURAL
:
=
0
;
SIGNAL
rx
_offload_eop_cnt
:
NATURAL
:
=
0
;
SIGNAL
rx_hdr_fields_out
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
);
SIGNAL
rx_hdr_fields_raw
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
...
...
@@ -316,7 +316,7 @@ BEGIN
proc_mem_mm_bus_wr
(
c_reg_enable_mm_addr_enable
,
1
,
mm_clk
,
enable_miso
,
enable_mosi
);
proc_common_wait_some_cycles
(
mm_clk
,
c_cross_clock_domain_latency
);
proc_common_wait_some_cycles
(
dp_clk
,
1
);
test
_offload_en
<=
'1'
;
rx
_offload_en
<=
'1'
;
WAIT
;
END
PROCESS
;
...
...
@@ -324,31 +324,31 @@ BEGIN
p_test_counters
:
PROCESS
(
dp_clk
)
BEGIN
IF
rising_edge
(
dp_clk
)
THEN
-- Count
test
_offload_sosi packets
IF
test
_offload_sosi
.
sop
=
'1'
THEN
test
_offload_sop_cnt
<=
test
_offload_sop_cnt
+
1
;
-- early count
-- Count
rx
_offload_sosi packets
IF
rx
_offload_sosi
.
sop
=
'1'
THEN
rx
_offload_sop_cnt
<=
rx
_offload_sop_cnt
+
1
;
-- early count
END
IF
;
IF
test
_offload_sosi
.
eop
=
'1'
THEN
test
_offload_eop_cnt
<=
test
_offload_eop_cnt
+
1
;
-- after count
IF
rx
_offload_sosi
.
eop
=
'1'
THEN
rx
_offload_eop_cnt
<=
rx
_offload_eop_cnt
+
1
;
-- after count
END
IF
;
END
IF
;
END
PROCESS
;
-- Count sync intervals using in_sosi.sync, because there is no
test
_offload_sosi.sync
-- Count sync intervals using in_sosi.sync, because there is no
rx
_offload_sosi.sync
in_sync_cnt
<=
in_sync_cnt
+
1
WHEN
rising_edge
(
dp_clk
)
AND
in_sosi
.
sync
=
'1'
;
test_sync_cnt
<=
in_sync_cnt
-
1
;
-- optionally adjust to fit
test
_offload_sosi
test_sync_cnt
<=
in_sync_cnt
-
1
;
-- optionally adjust to fit
rx
_offload_sosi
-- derive current X_sq correlator cell index
cur_X_sq_cell
<=
(
test
_offload_eop_cnt
/
g_nof_crosslets
)
MOD
c_nof_used_P_sq
;
cur_X_sq_cell
<=
(
rx
_offload_eop_cnt
/
g_nof_crosslets
)
MOD
c_nof_used_P_sq
;
-- derive current N_crosslets index index
cur_crosslet
<=
test
_offload_eop_cnt
MOD
g_nof_crosslets
;
cur_crosslet
<=
rx
_offload_eop_cnt
MOD
g_nof_crosslets
;
-- derive source RN index
source_rn
<=
func_ring_nof_hops_to_source_rn
(
cur_X_sq_cell
,
rn_index
,
g_N_rn
,
g_crosslets_direction
);
source_gn
<=
g_O_rn
+
source_rn
;
-- Prepare exp_sdp_stat_header before
test
_offload_sosi.eop, so that p_exp_sdp_stat_header can
-- verify it at
test
_offload_sosi.eop.
-- Prepare exp_sdp_stat_header before
rx
_offload_sosi.eop, so that p_exp_sdp_stat_header can
-- verify it at
rx
_offload_sosi.eop.
-- For all statistics
exp_dp_bsn
<=
TO_SVEC
(
c_bsn_init
+
1
+
test_sync_cnt
*
c_nof_block_per_sync
,
64
);
...
...
@@ -433,25 +433,25 @@ BEGIN
rx_sdp_stat_header
<=
func_sdp_map_stat_header
(
rx_hdr_fields_raw
);
p_verify_header
:
PROCESS
(
test
_offload_sosi
)
p_verify_header
:
PROCESS
(
rx
_offload_sosi
)
VARIABLE
v_bool
:
BOOLEAN
;
BEGIN
-- Prepare exp_sdp_stat_header before
test
_offload_sosi.eop, so that it can be verified at
test
_offload_sosi.eop
IF
test
_offload_sosi
.
eop
=
'1'
THEN
-- Prepare exp_sdp_stat_header before
rx
_offload_sosi.eop, so that it can be verified at
rx
_offload_sosi.eop
IF
rx
_offload_sosi
.
eop
=
'1'
THEN
v_bool
:
=
func_sdp_verify_stat_header
(
g_statistics_type
,
rx_sdp_stat_header
,
exp_sdp_stat_header
);
END
IF
;
END
PROCESS
;
-- Count number of packets in a sync interval.
-- There is no active
test
_offload_sosi.sync to restart the count, therefore
-- use in_sosi.sync to reset the count for the next
test
_offload_sosi.sync
-- There is no active
rx
_offload_sosi.sync to restart the count, therefore
-- use in_sosi.sync to reset the count for the next
rx
_offload_sosi.sync
-- interval
p_rx_packet_cnt
:
PROCESS
(
dp_clk
)
BEGIN
IF
rising_edge
(
dp_clk
)
THEN
IF
in_sosi
.
sync
=
'1'
THEN
rx_packet_cnt
<=
0
;
ELSIF
test
_offload_sosi
.
eop
=
'1'
THEN
ELSIF
rx
_offload_sosi
.
eop
=
'1'
THEN
rx_packet_cnt
<=
rx_packet_cnt
+
1
;
END
IF
;
END
IF
;
...
...
@@ -470,10 +470,10 @@ BEGIN
p_verify_nof_valid_per_packet
:
PROCESS
(
dp_clk
)
BEGIN
IF
rising_edge
(
dp_clk
)
THEN
IF
test
_offload_sosi
.
eop
=
'1'
THEN
IF
rx
_offload_sosi
.
eop
=
'1'
THEN
rx_valid_cnt
<=
0
;
ASSERT
rx_valid_cnt
=
c_packet_size
-
1
REPORT
"Wrong number of valid per packet"
SEVERITY
ERROR
;
ELSIF
test
_offload_sosi
.
valid
=
'1'
THEN
ELSIF
rx
_offload_sosi
.
valid
=
'1'
THEN
rx_valid_cnt
<=
rx_valid_cnt
+
1
;
END
IF
;
END
IF
;
...
...
@@ -493,8 +493,8 @@ BEGIN
BEGIN
IF
rising_edge
(
dp_clk
)
THEN
rx_val
<=
'0'
;
v_rx_data
:
=
TO_UINT
(
test
_offload_sosi
.
data
);
IF
test
_offload_sosi
.
valid
=
'1'
THEN
v_rx_data
:
=
TO_UINT
(
rx
_offload_sosi
.
data
);
IF
rx
_offload_sosi
.
valid
=
'1'
THEN
IF
g_statistics_type
=
"SST"
THEN
-- Indices:
-- W: 0 1 2 3 4 5 ... 1022 1023
...
...
@@ -659,10 +659,10 @@ BEGIN
reg_hdr_dat_mosi
=>
offload_rx_hdr_dat_mosi
,
reg_hdr_dat_miso
=>
offload_rx_hdr_dat_miso
,
snk_in_arr
(
0
)
=>
offload_sosi
,
snk_out_arr
(
0
)
=>
offload_siso
,
snk_in_arr
(
0
)
=>
sdp_
offload_sosi
,
snk_out_arr
(
0
)
=>
sdp_
offload_siso
,
src_out_arr
(
0
)
=>
test
_offload_sosi
,
src_out_arr
(
0
)
=>
rx
_offload_sosi
,
hdr_fields_out_arr
(
0
)
=>
rx_hdr_fields_out
,
hdr_fields_raw_arr
(
0
)
=>
rx_hdr_fields_raw
...
...
@@ -697,8 +697,8 @@ BEGIN
-- ST
in_sosi
=>
in_sosi
,
out_sosi
=>
offload_sosi
,
out_siso
=>
offload_siso
,
out_sosi
=>
sdp_
offload_sosi
,
out_siso
=>
sdp_
offload_siso
,
-- Inputs from other blocks
eth_src_mac
=>
c_eth_src_mac
,
...
...
@@ -717,7 +717,7 @@ BEGIN
ASSERT
c_crosslets_info_rec
=
func_sdp_map_crosslets_info
(
c_crosslets_info_slv
)
REPORT
"Error in func_sdp_map_crosslets_info()"
SEVERITY
FAILURE
;
-- To view the 32 bit 1GbE offload data more easily in the Wave window
offload_data
<=
offload_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
test
_offload_data
<=
test
_offload_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
offload_data
<=
sdp_
offload_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
rx
_offload_data
<=
rx
_offload_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
END
tb
;
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