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
9ea81327
Commit
9ea81327
authored
4 years ago
by
Reinier van der Walle
Browse files
Options
Downloads
Patches
Plain Diff
Added support for a fractional amount of blocks per sync period.
parent
156ea359
No related branches found
No related tags found
1 merge request
!36
Added support for a fractional amount of blocks per sync period.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/dp/src/vhdl/dp_block_gen_valid_arr.vhd
+9
-4
9 additions, 4 deletions
libraries/base/dp/src/vhdl/dp_block_gen_valid_arr.vhd
with
9 additions
and
4 deletions
libraries/base/dp/src/vhdl/dp_block_gen_valid_arr.vhd
+
9
−
4
View file @
9ea81327
...
@@ -30,10 +30,10 @@
...
@@ -30,10 +30,10 @@
-- When enabled (enable='1') then a block of g_nof_data_per_block words is
-- When enabled (enable='1') then a block of g_nof_data_per_block words is
-- output via src_out_arr under flow control by the input valid.
-- output via src_out_arr under flow control by the input valid.
--
--
-- The input
sync,
sop and eop are ignored. For the output the sync, sop and
-- The input sop and eop are ignored. For the output the sync, sop and
-- eop are generated by counting the input valid and using
-- eop are generated by counting the input valid and using
-- g_nof_data_per_block for the output sop and eop, and using
-- g_nof_data_per_block for the output sop and eop, and using
-- g_nof_blk_per_sync for the output sync.
-- g_nof_blk_per_sync
and the input sync
for the output sync.
--
--
-- The first active input valid starts the dp_block_gen_valid_arr. The first
-- The first active input valid starts the dp_block_gen_valid_arr. The first
-- output block will have an output sync and every g_nof_blk_per_sync there
-- output block will have an output sync and every g_nof_blk_per_sync there
...
@@ -136,6 +136,9 @@
...
@@ -136,6 +136,9 @@
-- . Using g_check_input_sync=True is similar to using a dp_sync_checker in
-- . Using g_check_input_sync=True is similar to using a dp_sync_checker in
-- front of this dp_block_gen_valid_arr. However the advantage of
-- front of this dp_block_gen_valid_arr. However the advantage of
-- dp_sync_checker is that it provides monitoring and control via MM.
-- dp_sync_checker is that it provides monitoring and control via MM.
-- . If snk_in.sync is always '0', sync out is generated at g_nof_blk_per_sync.
-- Otherwise, the output sync is also derived from snk_in.sync to allow for
-- a fractional amount of blocks per sync period.
LIBRARY
IEEE
,
common_lib
;
LIBRARY
IEEE
,
common_lib
;
USE
IEEE
.
STD_LOGIC_1164
.
ALL
;
USE
IEEE
.
STD_LOGIC_1164
.
ALL
;
...
@@ -147,7 +150,7 @@ ENTITY dp_block_gen_valid_arr IS
...
@@ -147,7 +150,7 @@ ENTITY dp_block_gen_valid_arr IS
GENERIC
(
GENERIC
(
g_nof_streams
:
POSITIVE
:
=
1
;
g_nof_streams
:
POSITIVE
:
=
1
;
g_nof_data_per_block
:
POSITIVE
:
=
1
;
g_nof_data_per_block
:
POSITIVE
:
=
1
;
g_nof_blk_per_sync
:
POSITIVE
:
=
8
;
g_nof_blk_per_sync
:
POSITIVE
:
=
8
;
-- Maximum nof blocks per sync period, e.g 7.3 becomes 8.
g_check_input_sync
:
BOOLEAN
:
=
FALSE
;
g_check_input_sync
:
BOOLEAN
:
=
FALSE
;
g_nof_pages_bsn
:
NATURAL
:
=
0
;
g_nof_pages_bsn
:
NATURAL
:
=
0
;
g_restore_global_bsn
:
BOOLEAN
:
=
FALSE
g_restore_global_bsn
:
BOOLEAN
:
=
FALSE
...
@@ -271,12 +274,14 @@ BEGIN
...
@@ -271,12 +274,14 @@ BEGIN
-- maintain blk_cnt for output sync interval, the blk_cnt is the local bsn that wraps at every sync
-- maintain blk_cnt for output sync interval, the blk_cnt is the local bsn that wraps at every sync
IF
r
.
blk_cnt
>=
g_nof_blk_per_sync
-1
THEN
IF
r
.
blk_cnt
>=
g_nof_blk_per_sync
-1
THEN
nxt_r
.
blk_cnt
<=
0
;
nxt_r
.
blk_cnt
<=
0
;
ELSIF
snk_in
.
sync
=
'1'
THEN
nxt_r
.
blk_cnt
<=
1
;
ELSE
ELSE
nxt_r
.
blk_cnt
<=
r
.
blk_cnt
+
1
;
nxt_r
.
blk_cnt
<=
r
.
blk_cnt
+
1
;
END
IF
;
END
IF
;
-- create local sync and pass on input bsn at local sync
-- create local sync and pass on input bsn at local sync
IF
r
.
blk_cnt
=
0
THEN
-- output sync starts at first input valid
IF
r
.
blk_cnt
=
0
OR
snk_in
.
sync
=
'1'
THEN
-- output sync starts at first input valid
nxt_r
.
reg_sosi
.
sync
<=
'1'
;
-- output sync for this block
nxt_r
.
reg_sosi
.
sync
<=
'1'
;
-- output sync for this block
nxt_r
.
reg_sosi
.
bsn
<=
in_sosi
.
bsn
;
-- output input bsn at sync
nxt_r
.
reg_sosi
.
bsn
<=
in_sosi
.
bsn
;
-- output input bsn at sync
ELSE
ELSE
...
...
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