EVERAGE

B

BarNash

Guest
Hi

I need to compute an evarage of an analog input
sampled by a ADC
The evarage is defined for several peaks sum devided in the number of peaks
so it changes all the time.

I need this for an audio effect design.
The main problem is how to exactly "catch" the
peak sample that is closest to the real peak
in the input volatage sampled .


How do I do that with VHDL ?

Thanks
EC
 
On Sun, 2 Aug 2009 17:38:26 +0200, "BarNash" wrote:

I need to compute an evarage of an analog input
Just for reference, the usual spelling is "average".

sampled by a ADC
The evarage is defined for several peaks sum devided in the number of peaks
so it changes all the time.

I need this for an audio effect design.
The main problem is how to exactly "catch" the
peak sample that is closest to the real peak
in the input volatage sampled .

How do I do that with VHDL ?
Before you begin to think about the VHDL code,
you need to define the processing algorithm more
clearly. What do you mean by "peak"? I'm guessing
you are interested in the peak signal amplitude,
but on what timescale? For example, suppose I see
the following sampled values:

-3, +5, +7, +6, +9, +5, +8, +3, -1, ...

How many "peaks" did you see in that signal stream?
One (+9 is the highest value between zero-crossings)?
Or three (there are three local maxima: +7, +9, +8)?
An audio signal covers a huge frequency range -
the highest frequency of interest is at least 500x
higher than the lowest, in good-quality audio.
That makes it much harder to come up with a simple
definition of "peak".

Tell us what you need to do!
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
I do not ask for the code just the alorythm
in simple words.

Thanks
EC



"BarNash" <therightinfo@gmail.com> ëúá
áäĺăňä:h542uj$6bc$1@localhost.localdomain...
Hi

I need to compute an evarage of an analog input
sampled by a ADC
The evarage is defined for several peaks sum devided in the number of
peaks so it changes all the time.

I need this for an audio effect design.
The main problem is how to exactly "catch" the
peak sample that is closest to the real peak
in the input volatage sampled .


How do I do that with VHDL ?

Thanks
EC
 
BarNash wrote:

I do not ask for the code just the alorythm
in simple words.
I guess that's part of the assignment. By letting us guys doing your work
you will not learn much. Just start playing with this problem and come up
with some ideas, and then mentally (and/or on paper) test those ideas.

As an initial thought I would define some window over which you detect the
maximum value thus far. After the window has expired, you copy the value to
the output, reset the maximum value and start a new window.

Oops, I have already said too much.

But also: if the requirements are not clear, you should ask for
clarification from whoever gave you the assignment. Without proper
requirements you cannot verify whether you have implemented them correctly.

Remember: requirements are like water. They'd better be frozen before you
start building on them. ;-)

You are welcome.

By the way: see also Jonathan Bromley's reply two days ago. That was also
meant as a starter.

--
Paul Uiterlinden
www.aimvalley.nl
e-mail addres: remove the not.
 

Welcome to EDABoard.com

Sponsor

Back
Top