Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > FIR filter generic

Reply
Thread Tools

FIR filter generic

 
 
Zorjak
Guest
Posts: n/a
 
      10-19-2006
Hi.
I am trying to write generic VHDL code for FIR filter. generic
parametars should be word_length, filter_order. Can anybody help me
how to input filter coeficients. I tought something like, read
coeficitients from file and write it in some LUT table. Could it be
done (or something similar)?

Thanks for help

 
Reply With Quote
 
 
 
 
Jiri Plasil
Guest
Posts: n/a
 
      10-25-2006
Zorjak napsal(a):
> Hi.
> I am trying to write generic VHDL code for FIR filter. generic
> parametars should be word_length, filter_order. Can anybody help me
> how to input filter coeficients. I tought something like, read
> coeficitients from file and write it in some LUT table. Could it be
> done (or something similar)?
>
> Thanks for help
>

You can use e.g. std.textio.all package. The coeffs can be stored in the
regular text file. In case std.textio.all the content of the file is
binary string like

-- file.dat
0010000
0010001
....

--

(there is also possibility to use hex representation but different
package has to be used - from IEEE....)

Then just define ROM (distributed or block RAM) by array statement. E. g.
TYPE ROM IS ARRAY (N_COEFF - 1 DOWNTO 0) OF SIGNED(N_BITS - 1 DOWNTO 0);

Define function "init_function" to be able read data from file by means
of "readline" and "read" statement from textio package.

And finally initiate e. g. constant of coeffs.
CONSTANT coeff : ROM := init_function("file.dat");

It works in XST. I don't have any experience with Quartus. Check in the
Quartus documentation how is possible define initial value of registers
an memories.
 
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
Re: fir decimation filter in VHDL mindenpilot VHDL 1 11-21-2005 04:38 AM
Bitplane approach to FIR filter architecture Wiener, Norbert VHDL 4 11-18-2004 02:31 AM
info regarding digital low pass fir filter design in VHDL... dhaanya nair VHDL 0 02-26-2004 08:36 AM
FIR filter design + COE file Yttrium VHDL 1 02-15-2004 08:09 PM
FIR Filter Hari VHDL 3 01-30-2004 12:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57