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
f20ab25c
Commit
f20ab25c
authored
5 years ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Updated text.
parent
9c951f76
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/dsp/st/doc/st_histogram.txt
+21
-15
21 additions, 15 deletions
libraries/dsp/st/doc/st_histogram.txt
with
21 additions
and
15 deletions
libraries/dsp/st/doc/st_histogram.txt
+
21
−
15
View file @
f20ab25c
Title: Develop histogram component in VHDL
Title: Develop histogram component in VHDL
Author: E. Kooistra
Author: E. Kooistra, ASTRON, dec 2019
Contents:
Contents:
1) Purpose
1) Purpose
2) Requirements
2) Requirements
3) Design
3) Design
4) Development
4) Development
5) References
:
5) References
1) Purpose
1) Purpose
The purpose of the component is to measure the histogram of ADC samples. The Python script
The purpose of the component is to measure the histogram of ADC samples. The Python script
try_histogram.py shows examples of histograms for typical ADC input signals
:
try_histogram.py
[1]
shows examples of histograms for typical ADC input signals
.
2) Requirements
2) Requirements
a) Data format
a) Data format
The ADC samples arrive in a stream with the following fields:
The ADC samples arrive in a stream with the following fields
[2]
:
- data : the samples
- data : the samples
- valid : new sample at this clock cycle
- valid : new sample at this clock cycle
...
@@ -67,12 +69,12 @@ measurement sync interval.
...
@@ -67,12 +69,12 @@ measurement sync interval.
The histogram function is a statistics function and therefor it can be placed in the st/ HDL
The histogram function is a statistics function and therefor it can be placed in the st/ HDL
library ($GIT/libraries/dsp/st/) and called st_histogram.vhd.
library ($GIT/libraries/dsp/st/) and called st_histogram.vhd.
The histogram component will need a double buffer. One buffer contains the bin counts that
are
The histogram component will need a double buffer
[3]
. One buffer contains the bin counts that
being updated during the current sync interval and the other buffer contains the bin counts
are
being updated during the current sync interval and the other buffer contains the bin counts
that were preserved from the previous sync interval. The buffer is a block RAM. The highest
that were preserved from the previous sync interval. The buffer is a block RAM. The highest
W
W
bits of the input data are used as address to read the bin counter from the buffer, then
bits of the input data are used as address to read the bin counter from the buffer, then
increment the bin counter, and then write the bin counter back into the buffer. This scheme
increment the bin counter, and then write the bin counter back into the buffer. This scheme
resembles the approach that is used in the st_sst.vhd power statistics function in the ST
resembles the approach that is used in the st_sst.vhd power statistics function
[4]
in the ST
library.
library.
The st_sst can integrate input samples continously without skipping samples. For the
The st_sst can integrate input samples continously without skipping samples. For the
...
@@ -88,6 +90,10 @@ occur during the first g_nof_bin samples of a sync interval and some addresses m
...
@@ -88,6 +90,10 @@ occur during the first g_nof_bin samples of a sync interval and some addresses m
during a entire sync interval (because these data values do not occur), but still the bin
during a entire sync interval (because these data values do not occur), but still the bin
count at all addresses has to be cleared at the start of the sync interval.
count at all addresses has to be cleared at the start of the sync interval.
One M20k block RAM in Arria10 has 20kbit and can have maximum 40 bit wide data, so then it has
20k / 40 = 512 addresses. With 32 bit data there are still 512 addreses. The st_histogram
fits in one M20k block RAM if it uses g_nof_bins <= 256 (= 512 / 2, because of the dual page
bin counts buffer).
4) Development
4) Development
...
@@ -97,7 +103,7 @@ All coding should be done on a branch in $GIT/hdl.
...
@@ -97,7 +103,7 @@ All coding should be done on a branch in $GIT/hdl.
a) In simulation
a) In simulation
- implement the st_histogram.vhd and a corresponding testbench tb_st_histogram.vhd
- implement the st_histogram.vhd and a corresponding testbench tb_st_histogram.vhd
- can use counter signal as test input or waveform generator (WG) to generate a sinus input.
- can use counter signal as test input or waveform generator (WG) to generate a sinus input.
The diag HDL library contains a WG.
The diag HDL library contains a WG
[5]
.
b) On hardware
b) On hardware
- create a design based on the UniBoard board support package (BSP = unb_minimal) with a diag
- create a design based on the UniBoard board support package (BSP = unb_minimal) with a diag
...
@@ -109,8 +115,8 @@ b) On hardware
...
@@ -109,8 +115,8 @@ b) On hardware
5) References
5) References
a)
$GIT/hdl/libraries/dsp/st/python/try_histogram.py
[1]
$GIT/hdl/libraries/dsp/st/python/try_histogram.py
b)
$GIT/libraries/
dsp/st
/doc/ASTRON_RP_
1397_Subband_Statistics_module.pdf -- st_sst
[2]
$GIT/libraries/
base/dp
/doc/ASTRON_RP_
380_module_interface_records.pdf -- streaming data (SOSI)
c)
$GIT/libraries/base/common/src/vhdl/common_paged_ram_r_w.vhd -- dual page buffer
[3]
$GIT/libraries/base/common/src/vhdl/common_paged_ram_r_w.vhd -- dual page buffer
d)
$GIT/libraries/
base/diag/src/vhdl/mms_diag_wg_wideband.vhd -- WG
[4]
$GIT/libraries/
dsp/st/doc/ASTRON_RP_1397_Subband_Statistics_module.pdf -- st_sst
e)
$GIT/libraries/base/d
p/doc/ASTRON_RP_380_module_interface_records.pdf -- streaming data (SOSI)
[5]
$GIT/libraries/base/d
iag/src/vhdl/mms_diag_wg_wideband.vhd -- WG
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