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
337aea23
Commit
337aea23
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Improve comment.
parent
29e5e8b8
No related branches found
No related tags found
1 merge request
!288
Resolve L2SDP-836
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+21
-10
21 additions, 10 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
with
21 additions
and
10 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+
21
−
10
View file @
337aea23
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- AUthor: E. Kooistra
-- AUthor: E. Kooistra
-- Purpose: Test the 1GbE interface by sending and counting received packets.
-- Purpose: Test the 1GbE interface by sending and counting received packets.
-- Description:
P
art of eth_tester, see detailed design in [1]
-- Description:
Tx p
art of eth_tester, see detailed design in [1]
--
--
-- References:
-- References:
-- [1] https://support.astron.nl/confluence/display/L2M/L6+FWLIB+Design+Document%3A+ETH+tester+unit+for+1GbE
-- [1] https://support.astron.nl/confluence/display/L2M/L6+FWLIB+Design+Document%3A+ETH+tester+unit+for+1GbE
...
@@ -76,22 +76,23 @@ ARCHITECTURE str OF eth_tester_tx IS
...
@@ -76,22 +76,23 @@ ARCHITECTURE str OF eth_tester_tx IS
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_network_eth_payload_jumbo_max
/
c_word_sz
;
-- = 9000 / 4 = 2250
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_network_eth_payload_jumbo_max
/
c_word_sz
;
-- = 9000 / 4 = 2250
CONSTANT
c_fifo_size
:
NATURAL
:
=
true_log_pow2
(
c_fifo_fill
);
-- = 4096
CONSTANT
c_fifo_size
:
NATURAL
:
=
true_log_pow2
(
c_fifo_fill
);
-- = 4096
CONSTANT
c_nof_total_counts
:
NATURAL
:
=
1
;
CONSTANT
c_nof_total_counts
:
NATURAL
:
=
1
;
-- one to count Tx packets
SIGNAL
ip_total_length
:
NATURAL
;
SIGNAL
ip_total_length
:
NATURAL
;
SIGNAL
udp_total_length
:
NATURAL
;
SIGNAL
udp_total_length
:
NATURAL
;
SIGNAL
app_total_length
:
NATURAL
;
SIGNAL
app_total_length
:
NATURAL
;
SIGNAL
bg_sosi
:
t_dp_sosi
;
SIGNAL
bg_sosi
:
t_dp_sosi
;
SIGNAL
bg_ctrl_
active
:
t_diag_block_gen
;
SIGNAL
bg_ctrl_
hold
:
t_diag_block_gen
;
SIGNAL
bg_block_len
:
NATURAL
;
SIGNAL
bg_block_len
:
NATURAL
;
SIGNAL
tx_packed_sosi
:
t_dp_sosi
;
SIGNAL
tx_packed_sosi
:
t_dp_sosi
;
SIGNAL
tx_fifo_sosi
:
t_dp_sosi
;
SIGNAL
tx_fifo_sosi
:
t_dp_sosi
;
SIGNAL
tx_fifo_siso
:
t_dp_siso
;
SIGNAL
tx_fifo_siso
:
t_dp_siso
;
SIGNAL
i_ref_sync
:
STD_LOGIC
;
SIGNAL
i_ref_sync
:
STD_LOGIC
:
=
'0'
;
SIGNAL
in_strobe_arr
:
STD_LOGIC_VECTOR
(
c_nof_total_counts
-1
DOWNTO
0
);
SIGNAL
in_strobe_arr
:
STD_LOGIC_VECTOR
(
c_nof_total_counts
-1
DOWNTO
0
);
SIGNAL
hdr_fields_slv_in
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
);
-- Use hdr_fields_slv_in default 0, to have DP driven fields ip_header_checksum = 0 and udp_checksum = 0
SIGNAL
hdr_fields_slv_in
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
)
:
=
(
OTHERS
=>
'0'
);
SIGNAL
hdr_fields_slv_tx
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
);
SIGNAL
hdr_fields_slv_tx
:
STD_LOGIC_VECTOR
(
1023
DOWNTO
0
);
SIGNAL
hdr_fields_rec_in
:
t_eth_tester_header
;
SIGNAL
hdr_fields_rec_in
:
t_eth_tester_header
;
SIGNAL
hdr_fields_rec_tx
:
t_eth_tester_header
;
SIGNAL
hdr_fields_rec_tx
:
t_eth_tester_header
;
...
@@ -100,6 +101,9 @@ BEGIN
...
@@ -100,6 +101,9 @@ BEGIN
ref_sync
<=
i_ref_sync
;
ref_sync
<=
i_ref_sync
;
-------------------------------------------------------------------------------
-- Generate packed data blocks
-------------------------------------------------------------------------------
u_bg
:
ENTITY
diag_lib
.
mms_diag_block_gen
u_bg
:
ENTITY
diag_lib
.
mms_diag_block_gen
GENERIC
MAP
(
GENERIC
MAP
(
g_nof_streams
=>
1
,
g_nof_streams
=>
1
,
...
@@ -116,12 +120,10 @@ BEGIN
...
@@ -116,12 +120,10 @@ BEGIN
reg_bg_ctrl_mosi
=>
reg_bg_ctrl_copi
,
-- BG control register (one for all streams)
reg_bg_ctrl_mosi
=>
reg_bg_ctrl_copi
,
-- BG control register (one for all streams)
reg_bg_ctrl_miso
=>
reg_bg_ctrl_cipo
,
reg_bg_ctrl_miso
=>
reg_bg_ctrl_cipo
,
-- ST interface
-- ST interface
bg_ctrl_
active
_arr
(
0
)
=>
bg_ctrl_
active
,
bg_ctrl_
hold
_arr
(
0
)
=>
bg_ctrl_
hold
,
out_sosi_arr
(
0
)
=>
bg_sosi
out_sosi_arr
(
0
)
=>
bg_sosi
);
);
bg_block_len
<=
TO_UINT
(
bg_ctrl_active
.
samples_per_packet
(
15
DOWNTO
0
));
-- packet lenghts fit in 16b
u_repack
:
ENTITY
dp_lib
.
dp_repack_data
-- pack 8b octets into 32b words
u_repack
:
ENTITY
dp_lib
.
dp_repack_data
-- pack 8b octets into 32b words
GENERIC
MAP
(
GENERIC
MAP
(
g_in_dat_w
=>
c_octet_w
,
-- = 8
g_in_dat_w
=>
c_octet_w
,
-- = 8
...
@@ -196,7 +198,9 @@ BEGIN
...
@@ -196,7 +198,9 @@ BEGIN
-- DP dp_sync
-- DP dp_sync
-- DP dp_bsn
-- DP dp_bsn
-- assume bg_block_len is still valid, no need to pass bg_block_len on via channel field in u_fifo
-- The bg_block_len is still valid because bg_ctrl_hold holds the BG settings until it restarts,
-- so no need to pass bg_block_len on via e.g. the channel field in u_fifo
bg_block_len
<=
TO_UINT
(
bg_ctrl_hold
.
samples_per_packet
(
15
DOWNTO
0
));
-- packet lenghts fit in 16b
app_total_length
<=
c_eth_tester_app_hdr_len
+
bg_block_len
WHEN
rising_edge
(
st_clk
);
app_total_length
<=
c_eth_tester_app_hdr_len
+
bg_block_len
WHEN
rising_edge
(
st_clk
);
udp_total_length
<=
app_total_length
+
c_network_udp_header_len
WHEN
rising_edge
(
st_clk
);
udp_total_length
<=
app_total_length
+
c_network_udp_header_len
WHEN
rising_edge
(
st_clk
);
ip_total_length
<=
udp_total_length
+
c_network_ip_header_len
WHEN
rising_edge
(
st_clk
);
ip_total_length
<=
udp_total_length
+
c_network_ip_header_len
WHEN
rising_edge
(
st_clk
);
...
@@ -209,6 +213,9 @@ BEGIN
...
@@ -209,6 +213,9 @@ BEGIN
hdr_fields_slv_in
(
field_hi
(
c_eth_tester_hdr_field_arr
,
"dp_sync"
)
DOWNTO
field_lo
(
c_eth_tester_hdr_field_arr
,
"dp_sync"
))
<=
slv
(
tx_fifo_sosi
.
sync
);
hdr_fields_slv_in
(
field_hi
(
c_eth_tester_hdr_field_arr
,
"dp_sync"
)
DOWNTO
field_lo
(
c_eth_tester_hdr_field_arr
,
"dp_sync"
))
<=
slv
(
tx_fifo_sosi
.
sync
);
hdr_fields_slv_in
(
field_hi
(
c_eth_tester_hdr_field_arr
,
"dp_bsn"
)
DOWNTO
field_lo
(
c_eth_tester_hdr_field_arr
,
"dp_bsn"
))
<=
tx_fifo_sosi
.
bsn
;
hdr_fields_slv_in
(
field_hi
(
c_eth_tester_hdr_field_arr
,
"dp_bsn"
)
DOWNTO
field_lo
(
c_eth_tester_hdr_field_arr
,
"dp_bsn"
))
<=
tx_fifo_sosi
.
bsn
;
-------------------------------------------------------------------------------
-- Tx ETH/UDP/IP packets with packed BG data
-------------------------------------------------------------------------------
u_dp_offload_tx
:
ENTITY
dp_lib
.
dp_offload_tx_v3
u_dp_offload_tx
:
ENTITY
dp_lib
.
dp_offload_tx_v3
GENERIC
MAP
(
GENERIC
MAP
(
g_nof_streams
=>
1
,
g_nof_streams
=>
1
,
...
@@ -237,9 +244,13 @@ BEGIN
...
@@ -237,9 +244,13 @@ BEGIN
hdr_fields_out_arr
(
0
)
=>
hdr_fields_slv_tx
hdr_fields_out_arr
(
0
)
=>
hdr_fields_slv_tx
);
);
-- View record in Wave Window
hdr_fields_rec_in
<=
func_eth_tester_map_header
(
hdr_fields_slv_in
);
hdr_fields_rec_in
<=
func_eth_tester_map_header
(
hdr_fields_slv_in
);
hdr_fields_rec_tx
<=
func_eth_tester_map_header
(
hdr_fields_slv_tx
);
hdr_fields_rec_tx
<=
func_eth_tester_map_header
(
hdr_fields_slv_tx
);
-------------------------------------------------------------------------------
-- Tx packet monitors
-------------------------------------------------------------------------------
i_ref_sync
<=
tx_fifo_sosi
.
sync
WHEN
rising_edge
(
st_clk
);
i_ref_sync
<=
tx_fifo_sosi
.
sync
WHEN
rising_edge
(
st_clk
);
u_mms_dp_bsn_monitor_v2
:
ENTITY
dp_lib
.
mms_dp_bsn_monitor_v2
u_mms_dp_bsn_monitor_v2
:
ENTITY
dp_lib
.
mms_dp_bsn_monitor_v2
...
@@ -263,7 +274,7 @@ BEGIN
...
@@ -263,7 +274,7 @@ BEGIN
in_sosi_arr
(
0
)
=>
tx_fifo_sosi
in_sosi_arr
(
0
)
=>
tx_fifo_sosi
);
);
in_strobe_arr
(
0
)
<=
tx_fifo_sosi
.
sop
;
in_strobe_arr
(
0
)
<=
tx_fifo_sosi
.
sop
;
-- count total nof Tx packets
u_dp_strobe_total_count
:
ENTITY
dp_lib
.
dp_strobe_total_count
u_dp_strobe_total_count
:
ENTITY
dp_lib
.
dp_strobe_total_count
GENERIC
MAP
(
GENERIC
MAP
(
...
...
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