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
c1a19510
Commit
c1a19510
authored
2 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Clarified c_min_nof_pps_interval.
parent
d02dbbd4
No related branches found
Branches containing commit
No related tags found
1 merge request
!272
L2SDP-801 Verify bsn time offset in dp_bsn_source_v2.vhd
Pipeline
#34725
passed
2 years ago
Stage: simulation
Stage: synthesis
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/dp/tb/vhdl/tb_dp_bsn_source_v2.vhd
+19
-7
19 additions, 7 deletions
libraries/base/dp/tb/vhdl/tb_dp_bsn_source_v2.vhd
with
19 additions
and
7 deletions
libraries/base/dp/tb/vhdl/tb_dp_bsn_source_v2.vhd
+
19
−
7
View file @
c1a19510
...
...
@@ -59,15 +59,27 @@ END tb_dp_bsn_source_v2;
ARCHITECTURE
tb
OF
tb_dp_bsn_source_v2
IS
CONSTANT
c_gcd
:
NATURAL
:
=
gcd
(
g_pps_interval
,
g_block_size
);
CONSTANT
c_min_nof_interval
:
NATURAL
:
=
g_block_size
/
c_gcd
;
-- choose c_nof_pps and c_nof_repeat > c_min_nof_interval, because the
-- fractional sync pattern will repeat every c_min_nof_interval number
-- The nof block per sync interval will be the same after every
-- c_min_nof_pps_interval. The c_gcd is the greatest common divider of
-- g_pps_interval and g_block_size, so g_block_size / c_gcd yields an
-- integer. When g_pps_interval and g_block_size are relative prime,
-- then c_gcd = 1, and then it takes g_block_size nof g_pps_interval
-- for the pattern of c_nof_block_per_sync_lo and c_nof_block_per_sync_hi
-- to repeat. If c_gcd = g_block_size, then c_nof_block_per_sync_lo =
-- c_nof_block_per_sync_hi, so then the nof block per sync interval is
-- the same in every pps interval.
CONSTANT
c_gcd
:
NATURAL
:
=
gcd
(
g_pps_interval
,
g_block_size
);
CONSTANT
c_min_nof_pps_interval
:
NATURAL
:
=
g_block_size
/
c_gcd
;
CONSTANT
c_nof_block_per_sync_lo
:
NATURAL
:
=
g_pps_interval
/
g_block_size
;
CONSTANT
c_nof_block_per_sync_hi
:
NATURAL
:
=
ceil_div
(
g_pps_interval
,
g_block_size
);
-- choose c_nof_pps and c_nof_repeat > c_min_nof_pps_interval, because the
-- fractional sync pattern will repeat every c_min_nof_pps_interval number
-- of g_pps_intervals.
CONSTANT
c_factor
:
NATURAL
:
=
3
;
CONSTANT
c_nof_pps
:
NATURAL
:
=
c_min_nof_interval
*
c_factor
;
CONSTANT
c_nof_repeat
:
NATURAL
:
=
c_min_nof_interval
*
c_factor
;
CONSTANT
c_nof_pps
:
NATURAL
:
=
c_min_nof_
pps_
interval
*
c_factor
;
CONSTANT
c_nof_repeat
:
NATURAL
:
=
c_min_nof_
pps_
interval
*
c_factor
;
CONSTANT
c_clk_period
:
TIME
:
=
10
ns
;
CONSTANT
c_bsn_w
:
NATURAL
:
=
31
;
...
...
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