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
Merge requests
!183
Resolve
L2SDP-557
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve
L2SDP-557
L2SDP-557
into
master
Overview
11
Commits
6
Pipelines
4
Changes
3
Merged
Reinier van der Walle
requested to merge
L2SDP-557
into
master
3 years ago
Overview
11
Commits
6
Pipelines
4
Changes
3
Expand
Closes
L2SDP-557
0
0
Merge request reports
Compare
master
version 3
c153649f
3 years ago
version 2
217e96fd
3 years ago
version 1
ce3052dd
3 years ago
master (base)
and
latest version
latest version
ae612c79
6 commits,
3 years ago
version 3
c153649f
5 commits,
3 years ago
version 2
217e96fd
4 commits,
3 years ago
version 1
ce3052dd
3 commits,
3 years ago
3 files
+
63
−
24
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
libraries/base/dp/src/vhdl/dp_block_validate_bsn_at_sync.vhd
+
45
−
7
Options
@@ -133,7 +133,6 @@ BEGIN
@@ -133,7 +133,6 @@ BEGIN
);
);
-- discarded counter
-- discarded counter
cnt_discarded_en
<=
'1'
WHEN
in_sosi
.
sync
=
'1'
AND
bsn_ok
=
'0'
ELSE
'0'
;
u_discarded_counter
:
ENTITY
common_lib
.
common_counter
u_discarded_counter
:
ENTITY
common_lib
.
common_counter
GENERIC
MAP
(
GENERIC
MAP
(
g_width
=>
c_word_w
,
g_width
=>
c_word_w
,
@@ -187,16 +186,55 @@ BEGIN
@@ -187,16 +186,55 @@ BEGIN
-- MM registers in st_clk domain
-- MM registers in st_clk domain
reg_wr_arr
=>
OPEN
,
reg_wr_arr
=>
OPEN
,
reg_rd_arr
=>
OPEN
,
reg_rd_arr
=>
OPEN
,
in_reg
=>
count_reg
,
-- read only
in_reg
=>
count_reg
,
-- read only
out_reg
=>
OPEN
-- no write
out_reg
=>
OPEN
-- no write
);
);
bsn_at_sync
<=
bs_sosi
.
bsn
WHEN
bs_sosi
.
sync
=
'1'
ELSE
bsn_at_sync_reg
;
-- Process to check the bsn at sync. It captures the bsn at the sync of bs_sosi. Then compares that bsn to
bsn_ok
<=
bsn_ok_reg
WHEN
in_sosi
.
sync
=
'0'
ELSE
'1'
WHEN
in_sosi
.
bsn
=
bsn_at_sync
ELSE
'0'
;
-- the bsn at sync of in_sosi. If they are unequal all packets during that sync period with in_sosi.channel
out_valid
<=
'1'
WHEN
in_sosi
.
sop
=
'1'
AND
TO_UINT
(
in_sosi
.
channel
)
/=
g_check_channel
ELSE
-- equal to g_check_channel are discarded.
bsn_ok
WHEN
in_sosi
.
sop
=
'1'
AND
TO_UINT
(
in_sosi
.
channel
)
=
g_check_channel
ELSE
p_bsn_check
:
PROCESS
(
bs_sosi
,
in_sosi
,
bsn_at_sync_reg
,
bsn_ok_reg
,
out_valid_reg
)
out_valid_reg
;
-- v_bsn_ok used for the first in_sosi packet of a sync period as sync and sop are both '1'.
VARIABLE
v_bsn_ok
:
STD_LOGIC
;
-- Using v_bsn_at_sync to ensure correct behavior when in_sosi has no latency compared to bs_sosi.
VARIABLE
v_bsn_at_sync
:
STD_LOGIC_VECTOR
(
g_bsn_w
-1
DOWNTO
0
);
BEGIN
v_bsn_at_sync
:
=
bsn_at_sync_reg
;
v_bsn_ok
:
=
bsn_ok_reg
;
out_valid
<=
out_valid_reg
;
cnt_discarded_en
<=
'0'
;
IF
bs_sosi
.
sync
=
'1'
THEN
v_bsn_at_sync
:
=
bs_sosi
.
bsn
(
g_bsn_w
-1
DOWNTO
0
);
END
IF
;
IF
TO_UINT
(
in_sosi
.
channel
)
=
g_check_channel
THEN
IF
in_sosi
.
sync
=
'1'
THEN
-- Compare bsn at sync of in_sosi to bsn at sync of bs_sosi.
IF
UNSIGNED
(
in_sosi
.
bsn
(
g_bsn_w
-1
DOWNTO
0
))
=
UNSIGNED
(
v_bsn_at_sync
)
THEN
v_bsn_ok
:
=
'1'
;
ELSE
v_bsn_ok
:
=
'0'
;
END
IF
;
-- set cnt_discarded_en to control u_discarded_counter.
cnt_discarded_en
<=
NOT
v_bsn_ok
;
END
IF
;
-- Setting out_valid to control the discarding at packet level.
IF
in_sosi
.
sop
=
'1'
THEN
out_valid
<=
v_bsn_ok
;
END
IF
;
ELSE
IF
in_sosi
.
sop
=
'1'
THEN
out_valid
<=
'1'
;
-- Packets with channel unequal to g_check_channel are always valid
END
IF
;
END
IF
;
bsn_ok
<=
v_bsn_ok
;
-- bsn_ok is used to indicate if the bsn is correct for the entire sync period of g_check_channel.
bsn_at_sync
<=
v_bsn_at_sync
;
-- register to store the bsn at sync of bs_sosi.
END
PROCESS
;
p_dp_clk
:
PROCESS
(
dp_rst
,
dp_clk
)
p_dp_clk
:
PROCESS
(
dp_rst
,
dp_clk
)
BEGIN
BEGIN
IF
dp_rst
=
'1'
THEN
IF
dp_rst
=
'1'
THEN
Loading