Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Convolution in VHDL

Reply
Thread Tools

Convolution in VHDL

 
 
Hari
Guest
Posts: n/a
 
      01-16-2004
Hi ,
How do I get started with performing convolution on VHDL.The
convolution lengths I intend to perform are of the order 16, 32,
128,etc.

HAri
 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      01-16-2004
"Hari" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...

> How do I get started with performing convolution on VHDL.The
> convolution lengths I intend to perform are of the order 16, 32,
> 128,etc.


It is pointless to worry about the VHDL until you have
established the architecture you want to use; and you cannot
establish the architecture until you have clearly defined
the problem's constraints.

Do you need the filter order to be variable on-the-fly,
or determined at compile time?

How many system clock cycles are available per data item?

Does the filter have any degree of symmetry, or other
features that would allow you to simplify it in
various ways? (For example, if the filter has
many identical coefficients, it can be much simpler
to convolve with the first-differences of the kernel,
and integrate that convolution result.

What precision do you require in coefficients, data,
result? What do you intend to do about rounding
and truncation of results?

================================

There remains the possibility that I have misunderstood
you, and you simply want to use VHDL as a programming
language to write a simulation model of a convolution
operation, much as you might do in Matlab. That's much
easier:

package ConvoPack is
type Real_Vector is array(integer range <>) of real;
end;
use work.ConvoPack.all;
entity Convolver is
generic (
kernel: Real_Vector;
);
port (
reset : in boolean;
data : in real;
result: out real
);
end;
architecture Model of Convolver is
-- Get the kernel to have a descending subscript range,
-- to make shifting operations easier
alias NormKernel: Real_Vector(kernel'LOW to kernel'HIGH) is kernel;
begin
CanonicalConvolution: process (reset, data'TRANSACTION)
variable
DataPipe: Real_Vector(NormKernel'_RANGE) := (others => 0.0);
sum: real;
begin
if reset then
DataPipe := (others => 0.0);
result <= 0.0;
else
sum := 0.0;
DataPipe := data & DataPipe(DataPipe'LOW to DataPipe'HIGH-1);
for i in DataPipe'RANGE loop
sum := sum + DataPipe(i) * NormKernel(i);
end loop;
end if;
result <= sum;
end process;
end;

However, if you intend to build hardware, this won't help you much.
--

Jonathan Bromley, Consultant

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

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, UK
Tel: +44 (0)1425 471223 mail: http://www.velocityreviews.com/forums/(E-Mail Removed)
Fax: +44 (0)1425 471573 Web: http://www.doulos.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.



 
Reply With Quote
 
 
 
 
Hari
Guest
Posts: n/a
 
      01-22-2004
Hi,
I guess my question was pretty vague. I actually intend to do a
16pt chripz transform and I need an FIR filter to perform the
convolution.I have my filter coefficients as well.There is one clk
cycle per data.I am not sure on how am I gonna put everything
together. even a pointer to a reference mite be helpful.

Hari
 
Reply With Quote
 
Guest
Posts: n/a
 
      01-22-2004
"Hari" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...

> 16pt chripz transform and I need an FIR filter to
> perform the convolution.I have my filter coefficients
> as well.There is one clk cycle per data.


Chirp-Z has no simple symmetry, so you need to do all
16 multiply-accumulates in a single cycle. That means
16 multipliers and 16 adders.

The only way I know to reduce the amount of hardware is
to use a system (filter) clock that is faster than the
data clock. If the data stream is slow, you may be able
to do this with a Xilinx DCM or perhaps an external PLL.

> I am not sure on how am I gonna put everything
> together. even a pointer to a reference mite be helpful.


The usual homework issue: Tell us how your thinking
is progressing, and you will find lots of people to
help you take the next few steps. Ask us what to do,
as if you have not even tried, and you'll get lots of
insults.

Are you familiar with the difference between canonical
and systolic implementations of a transversal filter?
The latter is much easier to implement, because each
adder has only two data inputs; the canonical form
requires a 16-input adder tree for 16 coefficients.
--
Jonathan Bromley



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
vhdl code for convolution a matrix by a constant vector or filter help WhatIThink VHDL 0 08-15-2010 06:08 AM
convolution process for image processing (using CNN) in VHDL gupta2000 VHDL 0 08-06-2008 09:56 AM
Re: vhdl coding for convolution Tricky VHDL 0 04-09-2008 07:43 AM
Is there a package with convolution and related methods? Charles Krug Python 3 04-25-2005 11:43 AM
help in soft-decision decoding of convolution code ouadid abdelkarim VHDL 0 07-10-2003 03:56 AM



Advertisments