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
b45e5fb2
Commit
b45e5fb2
authored
3 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Support header - data block boundary at symbol level (for g_symbol_w <= g_data_w) via g_symbol_w.
parent
50d1943f
No related branches found
No related tags found
1 merge request
!190
Resolve L2SDP-210
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/dp/src/vhdl/dp_offload_rx.vhd
+29
-5
29 additions, 5 deletions
libraries/base/dp/src/vhdl/dp_offload_rx.vhd
with
29 additions
and
5 deletions
libraries/base/dp/src/vhdl/dp_offload_rx.vhd
+
29
−
5
View file @
b45e5fb2
...
...
@@ -19,6 +19,27 @@
--
-------------------------------------------------------------------------------
-- Author: D. van der Schuur, E. Kooistra
-- Purpose:
-- . Split a user-defined header from a data block e.g. to from an Eth frame
-- Description:
-- . The dp_offload_tx_v3 --> dp_offload_rx form a pair.
-- . The header and data block can be split at symbol level, to support a header
-- that does not have an integer number of g_data_w. The header length is
-- defined by c_nof_header_symbols.
-- . The header contents can be monitored and is defined by g_hdr_field_arr.
-- . The data block is output via src_out_arr. If the data block contains an
-- integer number of g_data_w words, then src_out_arr.empty = 0.
-- . Default the g_symbol_w = 0 which implies g_symbol_w = g_data_w.
-- - If the header length is not an integer number of g_data_w, then
-- g_symbol_w has to be set such that c_nof_symbols_per_data and
-- c_nof_header_symbols are both integers. The g_symbol_w is then used
-- to control the split.
-- - If the data block length is not an integer number of g_data_w, then
-- g_symbol_w defines the symbol width of the data and is used to
-- control the snk_out_arr empty field.
LIBRARY
IEEE
,
common_lib
,
dp_lib
;
USE
IEEE
.
STD_LOGIC_1164
.
ALL
;
USE
IEEE
.
NUMERIC_STD
.
ALL
;
...
...
@@ -61,6 +82,7 @@ END dp_offload_rx;
ARCHITECTURE
str
OF
dp_offload_rx
IS
CONSTANT
c_symbol_w
:
NATURAL
:
=
sel_a_b
(
g_symbol_w
=
0
,
g_data_w
,
g_symbol_w
);
CONSTANT
c_nof_symbols_per_data
:
NATURAL
:
=
g_data_w
/
g_symbol_w
;
CONSTANT
c_nof_header_symbols
:
NATURAL
:
=
field_slv_len
(
g_hdr_field_arr
)
/
c_symbol_w
;
CONSTANT
c_field_sel
:
STD_LOGIC_VECTOR
(
g_hdr_field_arr
'RANGE
)
:
=
(
OTHERS
=>
'0'
);
-- Not used in sink mode but requires set range
...
...
@@ -122,7 +144,9 @@ BEGIN
g_field_arr
=>
field_arr_set_mode
(
g_hdr_field_arr
,
"RO"
),
g_field_sel
=>
c_field_sel
,
g_snk_data_w
=>
c_dp_field_blk_snk_data_w
,
--g_data_w,
g_src_data_w
=>
c_dp_field_blk_src_data_w
--field_slv_in_len(field_arr_set_mode(g_hdr_field_arr , "RO"))
g_src_data_w
=>
c_dp_field_blk_src_data_w
,
--field_slv_in_len(field_arr_set_mode(g_hdr_field_arr , "RO"))
g_in_symbol_w
=>
c_symbol_w
,
g_out_symbol_w
=>
c_symbol_w
)
PORT
MAP
(
dp_rst
=>
dp_rst
,
...
...
@@ -154,7 +178,7 @@ BEGIN
u_dp_tail_remove
:
ENTITY
work
.
dp_tail_remove
GENERIC
MAP
(
g_data_w
=>
g_data_w
,
g_symbol_w
=>
g_data
_w
,
g_symbol_w
=>
c_symbol
_w
,
g_nof_symbols
=>
sel_a_b
(
g_remove_crc
,
g_crc_nof_words
,
0
)
)
PORT
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