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
ae4be2ef
Commit
ae4be2ef
authored
3 years ago
by
Daniel van der Schuur
Browse files
Options
Downloads
Patches
Plain Diff
-Updated comments.
parent
00ee7673
No related branches found
No related tags found
1 merge request
!101
Merged sub-branch L2SDP-151 into L2SDP-143 (st_histogram rework)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/dsp/st/src/vhdl/st_histogram.vhd
+11
-8
11 additions, 8 deletions
libraries/dsp/st/src/vhdl/st_histogram.vhd
with
11 additions
and
8 deletions
libraries/dsp/st/src/vhdl/st_histogram.vhd
+
11
−
8
View file @
ae4be2ef
...
...
@@ -24,6 +24,12 @@
-- Purpose:
-- . Count incoming data values and keep the counts in RAM as a histogram
-- Description:
-- . The contents of the inactive RAM is cleared automatically just before the
-- next sync interval. This way, no data is lost and all valid input data
-- contributes to the histogram. The ram_clearing status output is high
-- during this automated clearing.
-- . All valid data of a DC input contributes to the histogram, no data is
-- lost.
-- . The block schematic below shows the data flow from snk_in to ram_mosi:
-- . snk_in.data is interpreted as address (bin) to read from RAM by bin_reader.
-- . a RAM pointer 0 or 1 is kept as MS part of the address.
...
...
@@ -55,6 +61,10 @@
-- time these controls such that the active RAM page does not swap before these
-- operation (ram_mosi readout) has finished.
-- Remarks:
-- . The RAM block we use basically needs 3 ports:
-- 1 - read port in dp_clk domain to read current bin value
-- 2 - write port in dp_clk domain to write back incremented bin value
-- 3 - read port in mm_clk domain to read the inactive page
-- . common_ram_r_w
-- . Why common_ram_r_w was selected: it uses a single clock
-- . We need to read and write back bins in the dp_clk clock domain, so our RAM
...
...
@@ -362,14 +372,7 @@ BEGIN
-------------------------------------------------------------------------------
-- ram_clear control input - let user clear the RAM
-- 1) User waits for PPS
-- 2) User reads data from RAM
-- . Logic here takes care that unused RAM is being read
-- 3) User sets ram_clear register
-- . Logic clears unused (at that exact time) RAM but does not compensate
-- for user being late (the ram pointer is checked only the very moment
-- ram_clear is set)
-- Clear the RAM just before the next sync interval
-------------------------------------------------------------------------------
-- Count input data for automatic RAM clear before next sync interval
nxt_data_cnt
<=
(
OTHERS
=>
'0'
)
WHEN
TO_UINT
(
data_cnt
)
=
g_nof_data_per_sync
-1
ELSE
INCR_UVEC
(
data_cnt
,
1
)
WHEN
snk_in
.
valid
=
'1'
ELSE
data_cnt
;
...
...
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