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
c501b581
Commit
c501b581
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Add dp_pipline_ready.
parent
a2e8d3a4
No related branches found
Branches containing commit
No related tags found
1 merge request
!293
Rename eth_stream into eth_stream_udp. Create new eth_stream.vhd that contains...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+36
-15
36 additions, 15 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
with
36 additions
and
15 deletions
libraries/io/eth/src/vhdl/eth_tester_tx.vhd
+
36
−
15
View file @
c501b581
...
@@ -82,6 +82,7 @@ ARCHITECTURE str OF eth_tester_tx IS
...
@@ -82,6 +82,7 @@ ARCHITECTURE str OF eth_tester_tx IS
CONSTANT
c_packet_sz_max
:
NATURAL
:
=
ceil_div
(
c_eth_tester_bg_block_len_max
,
c_word_sz
);
CONSTANT
c_packet_sz_max
:
NATURAL
:
=
ceil_div
(
c_eth_tester_bg_block_len_max
,
c_word_sz
);
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_packet_sz_max
*
11
/
10
;
CONSTANT
c_fifo_fill
:
NATURAL
:
=
c_packet_sz_max
*
11
/
10
;
CONSTANT
c_fifo_size
:
NATURAL
:
=
true_log_pow2
(
c_fifo_fill
+
c_packet_sz_max
);
-- = 8192
CONSTANT
c_fifo_size
:
NATURAL
:
=
true_log_pow2
(
c_fifo_fill
+
c_packet_sz_max
);
-- = 8192
CONSTANT
c_fifo_size_w
:
NATURAL
:
=
ceil_log2
(
c_fifo_size
);
CONSTANT
c_nof_total_counts
:
NATURAL
:
=
1
;
-- one to count Tx packets
CONSTANT
c_nof_total_counts
:
NATURAL
:
=
1
;
-- one to count Tx packets
...
@@ -101,8 +102,10 @@ ARCHITECTURE str OF eth_tester_tx IS
...
@@ -101,8 +102,10 @@ ARCHITECTURE str OF eth_tester_tx IS
SIGNAL
tx_fifo_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
SIGNAL
tx_fifo_data
:
STD_LOGIC_VECTOR
(
c_word_w
-1
DOWNTO
0
);
SIGNAL
tx_fifo_siso
:
t_dp_siso
;
SIGNAL
tx_fifo_siso
:
t_dp_siso
;
SIGNAL
tx_fifo_wr_ful
:
STD_LOGIC
;
SIGNAL
tx_fifo_wr_ful
:
STD_LOGIC
;
SIGNAL
tx_fifo_wr_usedw
:
STD_LOGIC_VECTOR
(
ceil_log2
(
c_fifo_size
)
-1
DOWNTO
0
);
SIGNAL
tx_fifo_wr_usedw
:
STD_LOGIC_VECTOR
(
c_fifo_size
_w
-1
DOWNTO
0
);
SIGNAL
i_tx_fifo_rd_emp
:
STD_LOGIC
;
SIGNAL
i_tx_fifo_rd_emp
:
STD_LOGIC
;
SIGNAL
tx_offload_siso
:
t_dp_siso
;
SIGNAL
tx_offload_sosi
:
t_dp_sosi
;
SIGNAL
i_ref_sync
:
STD_LOGIC
:
=
'0'
;
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
);
...
@@ -159,9 +162,11 @@ BEGIN
...
@@ -159,9 +162,11 @@ BEGIN
-- BG block level flow control, needed in case BG settings result in eth bit
-- BG block level flow control, needed in case BG settings result in eth bit
-- rate > 1 Gbps, to avoid u_tx_fifo overflow.
-- rate > 1 Gbps, to avoid u_tx_fifo overflow.
p_bg_siso_xon
:
PROCESS
(
st_clk
)
p_bg_siso_xon
:
PROCESS
(
st_rst
,
st_clk
)
BEGIN
BEGIN
IF
rising_edge
(
st_clk
)
THEN
IF
st_rst
=
'1'
THEN
bg_siso
.
xon
<=
'1'
;
ELSIF
rising_edge
(
st_clk
)
THEN
bg_siso
.
xon
<=
'1'
;
bg_siso
.
xon
<=
'1'
;
IF
TO_UINT
(
tx_fifo_wr_usedw
)
>
c_fifo_fill
THEN
IF
TO_UINT
(
tx_fifo_wr_usedw
)
>
c_fifo_fill
THEN
bg_siso
.
xon
<=
'0'
;
bg_siso
.
xon
<=
'0'
;
...
@@ -198,19 +203,19 @@ BEGIN
...
@@ -198,19 +203,19 @@ BEGIN
g_fifo_size
=>
c_fifo_size
g_fifo_size
=>
c_fifo_size
)
)
PORT
MAP
(
PORT
MAP
(
wr_rst
=>
st_rst
,
wr_rst
=>
st_rst
,
wr_clk
=>
st_clk
,
wr_clk
=>
st_clk
,
rd_rst
=>
st_rst
,
rd_rst
=>
st_rst
,
rd_clk
=>
st_clk
,
rd_clk
=>
st_clk
,
-- Monitor FIFO filling
-- Monitor FIFO filling
wr_ful
=>
tx_fifo_wr_ful
,
wr_ful
=>
tx_fifo_wr_ful
,
wr_usedw
=>
tx_fifo_wr_usedw
,
wr_usedw
=>
tx_fifo_wr_usedw
,
rd_emp
=>
i_tx_fifo_rd_emp
,
rd_emp
=>
i_tx_fifo_rd_emp
,
-- ST sink
-- ST sink
snk_in
=>
tx_packed_sosi
,
snk_in
=>
tx_packed_sosi
,
-- ST source
-- ST source
src_in
=>
tx_fifo_siso
,
src_in
=>
tx_fifo_siso
,
src_out
=>
tx_fifo_sosi
src_out
=>
tx_fifo_sosi
);
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
...
@@ -295,8 +300,8 @@ BEGIN
...
@@ -295,8 +300,8 @@ BEGIN
snk_in_arr
(
0
)
=>
tx_fifo_sosi
,
snk_in_arr
(
0
)
=>
tx_fifo_sosi
,
snk_out_arr
(
0
)
=>
tx_fifo_siso
,
snk_out_arr
(
0
)
=>
tx_fifo_siso
,
src_out_arr
(
0
)
=>
i_
tx_
udp
_sosi
,
src_out_arr
(
0
)
=>
tx_
offload
_sosi
,
src_in_arr
(
0
)
=>
tx_
udp
_siso
,
src_in_arr
(
0
)
=>
tx_
offload
_siso
,
hdr_fields_in_arr
(
0
)
=>
hdr_fields_slv_in
,
-- hdr_fields_slv_in_arr(i) is considered valid @ snk_in_arr(i).sop
hdr_fields_in_arr
(
0
)
=>
hdr_fields_slv_in
,
-- hdr_fields_slv_in_arr(i) is considered valid @ snk_in_arr(i).sop
hdr_fields_out_arr
(
0
)
=>
hdr_fields_slv_tx
hdr_fields_out_arr
(
0
)
=>
hdr_fields_slv_tx
...
@@ -306,6 +311,22 @@ BEGIN
...
@@ -306,6 +311,22 @@ BEGIN
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
);
-------------------------------------------------------------------------------
-- dp_pipeline_ready to ease timing closure
-------------------------------------------------------------------------------
u_dp_pipeline_ready
:
ENTITY
dp_lib
.
dp_pipeline_ready
PORT
MAP
(
rst
=>
st_rst
,
clk
=>
st_clk
,
snk_out
=>
tx_offload_siso
,
snk_in
=>
tx_offload_sosi
,
src_in
=>
tx_udp_siso
,
src_out
=>
i_tx_udp_sosi
);
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-- Tx packet monitors
-- Tx packet monitors
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
...
...
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