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
ae612c79
Commit
ae612c79
authored
3 years ago
by
Reinier van der Walle
Browse files
Options
Downloads
Patches
Plain Diff
processed review comments
parent
c153649f
No related branches found
Branches containing commit
No related tags found
1 merge request
!183
Resolve L2SDP-557
Pipeline
#22653
passed
3 years ago
Stage: simulation
Stage: synthesis
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/base/dp/src/vhdl/dp_block_validate_bsn_at_sync.vhd
+11
-11
11 additions, 11 deletions
libraries/base/dp/src/vhdl/dp_block_validate_bsn_at_sync.vhd
libraries/base/dp/tb/vhdl/tb_dp_block_validate_bsn_at_sync.vhd
+5
-1
5 additions, 1 deletion
...ries/base/dp/tb/vhdl/tb_dp_block_validate_bsn_at_sync.vhd
with
16 additions
and
12 deletions
libraries/base/dp/src/vhdl/dp_block_validate_bsn_at_sync.vhd
+
11
−
11
View file @
ae612c79
...
@@ -199,37 +199,37 @@ BEGIN
...
@@ -199,37 +199,37 @@ BEGIN
-- Using v_bsn_at_sync to ensure correct behavior when in_sosi has no latency compared to bs_sosi.
-- 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
);
VARIABLE
v_bsn_at_sync
:
STD_LOGIC_VECTOR
(
g_bsn_w
-1
DOWNTO
0
);
BEGIN
BEGIN
v_bsn_at_sync
:
=
bsn_at_sync_reg
;
v_bsn_at_sync
:
=
bsn_at_sync_reg
;
v_bsn_ok
:
=
bsn_ok_reg
;
v_bsn_ok
:
=
bsn_ok_reg
;
out_valid
<=
out_valid_reg
;
out_valid
<=
out_valid_reg
;
cnt_discarded_en
<=
'0'
;
IF
bs_sosi
.
sync
=
'1'
THEN
IF
bs_sosi
.
sync
=
'1'
THEN
v_bsn_at_sync
:
=
bs_sosi
.
bsn
;
v_bsn_at_sync
:
=
bs_sosi
.
bsn
(
g_bsn_w
-1
DOWNTO
0
)
;
END
IF
;
END
IF
;
IF
TO_UINT
(
in_sosi
.
channel
)
=
g_check_channel
THEN
IF
TO_UINT
(
in_sosi
.
channel
)
=
g_check_channel
THEN
-- Compare bsn at sync of in_sosi to bsn at sync of bs_sosi.
IF
in_sosi
.
sync
=
'1'
THEN
IF
in_sosi
.
sync
=
'1'
THEN
IF
in_sosi
.
bsn
=
v_bsn_at_sync
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'
;
v_bsn_ok
:
=
'1'
;
ELSE
ELSE
v_bsn_ok
:
=
'0'
;
v_bsn_ok
:
=
'0'
;
END
IF
;
END
IF
;
-- set cnt_discarded_en to control u_discarded_counter.
cnt_discarded_en
<=
NOT
v_bsn_ok
;
END
IF
;
END
IF
;
-- Setting out_valid to control the discarding at packet level.
-- Setting out_valid to control the discarding at packet level.
IF
in_sosi
.
sop
=
'1'
THEN
IF
in_sosi
.
sop
=
'1'
THEN
out_valid
<=
v_bsn_ok
;
out_valid
<=
v_bsn_ok
;
END
IF
;
END
IF
;
-- set cnt_discarded_en to control u_discarded_counter.
cnt_discarded_en
<=
in_sosi
.
sync
AND
NOT
v_bsn_ok
;
ELSE
ELSE
IF
in_sosi
.
sop
=
'1'
THEN
IF
in_sosi
.
sop
=
'1'
THEN
out_valid
<=
'1'
;
-- Packets with channel unequal to g_check_channel are always valid
out_valid
<=
'1'
;
-- Packets with channel unequal to g_check_channel are always valid
END
IF
;
END
IF
;
cnt_discarded_en
<=
'0'
;
-- Packets with channel unequal to g_check_channel cannot be discarded.
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_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.
bsn_at_sync
<=
v_bsn_at_sync
;
-- register to store the bsn at sync of bs_sosi.
...
...
This diff is collapsed.
Click to expand it.
libraries/base/dp/tb/vhdl/tb_dp_block_validate_bsn_at_sync.vhd
+
5
−
1
View file @
ae612c79
...
@@ -63,7 +63,11 @@ ARCHITECTURE tb OF tb_dp_block_validate_bsn_at_sync IS
...
@@ -63,7 +63,11 @@ ARCHITECTURE tb OF tb_dp_block_validate_bsn_at_sync IS
CONSTANT
c_gap_size
:
NATURAL
:
=
4
;
CONSTANT
c_gap_size
:
NATURAL
:
=
4
;
CONSTANT
c_nof_sync
:
NATURAL
:
=
5
;
CONSTANT
c_nof_sync
:
NATURAL
:
=
5
;
CONSTANT
c_nof_blk
:
NATURAL
:
=
g_nof_blocks_per_sync
*
c_nof_sync
;
CONSTANT
c_nof_blk
:
NATURAL
:
=
g_nof_blocks_per_sync
*
c_nof_sync
;
-- choosing c_check_channel such that it corresponds with a channel from stimuli on a sync because the channel field is generated by a counter.
-- The u_stimuli_in creates counter data in stimuli_sosi.channel. Therefore
-- choose some c_check_channel value (> 0, < c_nof_blk) that will occur in
-- the future. Hence this c_check_channel value will occur once in the tb,
-- because stimuli_sosi.channel keeps incrementing. Choosing c_check_channel
-- such that it corresponds with a channel from stimuli on a sync pulse.
CONSTANT
c_check_channel
:
NATURAL
:
=
g_nof_blocks_per_sync
;
-- can be c_check_channel MOD g_nof_blocks_per_sync = 0 but not larger than c_nof_blk.
CONSTANT
c_check_channel
:
NATURAL
:
=
g_nof_blocks_per_sync
;
-- can be c_check_channel MOD g_nof_blocks_per_sync = 0 but not larger than c_nof_blk.
SIGNAL
dp_clk
:
STD_LOGIC
:
=
'1'
;
SIGNAL
dp_clk
:
STD_LOGIC
:
=
'1'
;
...
...
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