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
4d49388d
Commit
4d49388d
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Small updates.
parent
9def7464
Branches
Branches containing commit
No related tags found
1 merge request
!288
Resolve L2SDP-836
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+24
-9
24 additions, 9 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
with
24 additions
and
9 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+
24
−
9
View file @
4d49388d
...
...
@@ -70,10 +70,9 @@ END eth_tester_tx;
ARCHITECTURE
str
OF
eth_tester_tx
IS
CONSTANT
c_bg_block_len_max
:
NATURAL
:
=
c_network_eth_payload_jumbo_max
;
-- 9000 octets
CONSTANT
c_bg_block_len_w
:
NATURAL
:
=
ceil_log2
(
c_bg_block_len_max
);
CONSTANT
c_empty_w
:
NATURAL
:
=
2
;
-- for 0, 1, 2, 3 empty octets per word
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_
n
et
work_eth_payload_jumbo
_max
/
c_word_sz
;
-- = 9000 / 4 = 2250
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_et
h_tester_bg_block_len
_max
/
c_word_sz
;
-- = 9000 / 4 = 2250
CONSTANT
c_fifo_size
:
NATURAL
:
=
true_log_pow2
(
c_fifo_fill
);
-- = 4096
CONSTANT
c_nof_total_counts
:
NATURAL
:
=
1
;
-- one to count Tx packets
...
...
@@ -83,13 +82,18 @@ ARCHITECTURE str OF eth_tester_tx IS
SIGNAL
app_total_length
:
NATURAL
;
SIGNAL
bg_sosi
:
t_dp_sosi
;
SIGNAL
bg_data
:
STD_LOGIC_VECTOR
(
c_octet_w
-1
DOWNTO
0
);
SIGNAL
bg_ctrl_hold
:
t_diag_block_gen
;
SIGNAL
bg_block_len
:
NATURAL
;
SIGNAL
tx_packed_sosi
:
t_dp_sosi
;
SIGNAL
tx_packed_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
SIGNAL
tx_fifo_sosi
:
t_dp_sosi
;
SIGNAL
tx_fifo_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
SIGNAL
tx_fifo_siso
:
t_dp_siso
;
SIGNAL
i_ref_sync
:
STD_LOGIC
:
=
'0'
;
SIGNAL
in_strobe_arr
:
STD_LOGIC_VECTOR
(
c_nof_total_counts
-1
DOWNTO
0
);
SIGNAL
i_tx_udp_sosi
:
t_dp_sosi
;
SIGNAL
tx_udp_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
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'
);
...
...
@@ -100,6 +104,13 @@ ARCHITECTURE str OF eth_tester_tx IS
BEGIN
ref_sync
<=
i_ref_sync
;
tx_udp_sosi
<=
i_tx_udp_sosi
;
-- View sosi.data in Wave Window
bg_data
<=
bg_sosi
.
data
(
c_octet_w
-1
DOWNTO
0
);
tx_packed_data
<=
tx_packed_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
tx_fifo_data
<=
tx_fifo_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
tx_udp_data
<=
i_tx_udp_sosi
.
data
(
c_word_w
-1
DOWNTO
0
);
-------------------------------------------------------------------------------
-- Generate packed data blocks
...
...
@@ -107,7 +118,8 @@ BEGIN
u_bg
:
ENTITY
diag_lib
.
mms_diag_block_gen
GENERIC
MAP
(
g_nof_streams
=>
1
,
g_use_bg_buffer_ram
=>
FALSE
g_use_bg_buffer_ram
=>
FALSE
,
g_buf_addr_w
=>
c_diag_bg_mem_adrs_w
-- = 24, use full range 2**24 for BG addr --> data values
)
PORT
MAP
(
-- System
...
...
@@ -124,12 +136,14 @@ BEGIN
out_sosi_arr
(
0
)
=>
bg_sosi
);
u_
re
pack
:
ENTITY
dp_lib
.
dp_repack_data
-- pack 8b octets into 32b words
u_pack
:
ENTITY
dp_lib
.
dp_repack_data
-- pack 8b octets into 32b words
GENERIC
MAP
(
g_in_dat_w
=>
c_octet_w
,
-- = 8
g_in_nof_words
=>
c_word_sz
,
-- = 4
g_in_symbol_w
=>
c_octet_w
,
g_out_dat_w
=>
c_word_w
,
-- = 32
g_out_nof_words
=>
1
g_out_nof_words
=>
1
,
g_out_symbol_w
=>
c_octet_w
)
PORT
MAP
(
rst
=>
st_rst
,
...
...
@@ -138,10 +152,11 @@ BEGIN
src_out
=>
tx_packed_sosi
);
u_fifo
:
ENTITY
dp_lib
.
dp_fifo_fill_eop
u_
tx_
fifo
:
ENTITY
dp_lib
.
dp_fifo_fill_eop
GENERIC
MAP
(
g_data_w
=>
c_word_w
,
g_bsn_w
=>
c_diag_bg_bsn_init_w
,
-- = 64 bit
g_empty_w
=>
c_empty_w
,
g_use_bsn
=>
TRUE
,
g_use_empty
=>
TRUE
,
g_use_sync
=>
TRUE
,
...
...
@@ -237,7 +252,7 @@ BEGIN
snk_in_arr
(
0
)
=>
tx_fifo_sosi
,
snk_out_arr
(
0
)
=>
tx_fifo_siso
,
src_out_arr
(
0
)
=>
tx_udp_sosi
,
src_out_arr
(
0
)
=>
i_
tx_udp_sosi
,
src_in_arr
(
0
)
=>
tx_udp_siso
,
hdr_fields_in_arr
(
0
)
=>
hdr_fields_slv_in
,
-- hdr_fields_slv_in_arr(i) is considered valid @ snk_in_arr(i).sop
...
...
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