FIR filter coefficient (with COE file)

Y

Yttrium

Guest
hey,

I'm using the Xilinx CoreGenerator for the first time because i need a FIR
filter and saw the DA FIR in the IPCore library and found it really usefull
in this design. The only problem is dat i don't find how to generate a COE
file?
So i don't know how to turn a floating point coefficients (which i found
through firdes or matlab) into a COE file?

thanx in advance,

kind regards,

Yttrium
 
http://www.mathworks.com/access/helpdesk/help/toolbox/filterdesign/coewrite.shtml

If you can't use coewrite from Matlab, then use this format...

;
; XILINX CORE Generator(tm) Distributed Arithmetic FIR filter
; coefficient (.COE) File
; Generated by MATLAB(tm) and the Filter Design Toolbox.
;
; Generated on: 15-Mar-2002 13:47:15
;
Radix = 10;
Coefficient_Width = 16;
CoefData = -41,
-851,
-366,
308,
651,
22,
-873,
-658,
749,
1504,
21,
-2367,
-2012,
3014,
9900,
.....

"Yttrium" <Yttrium@pandora.be> wrote in message news:<DTPVb.4731$16.313447@phobos.telenet-ops.be>...
hey,

I'm using the Xilinx CoreGenerator for the first time because i need a FIR
filter and saw the DA FIR in the IPCore library and found it really usefull
in this design. The only problem is dat i don't find how to generate a COE
file?
So i don't know how to turn a floating point coefficients (which i found
through firdes or matlab) into a COE file?

thanx in advance,

kind regards,

Yttrium
 
Yttrium wrote:

hey,

I'm using the Xilinx CoreGenerator for the first time because i need a FIR
filter and saw the DA FIR in the IPCore library and found it really usefull
in this design. The only problem is dat i don't find how to generate a COE
file?
So i don't know how to turn a floating point coefficients (which i found
through firdes or matlab) into a COE file?

thanx in advance,

kind regards,

Yttrium
The Active-HDL simulator has the similar built-in FIR core generator
which accepts the floating point coefficients.

Regards,
A.Ser.
 
scale your numbers to integer, the coef width depends on the resolution(decimal points)you wish.
 
wo when i have 0.002100205514 as a coefficient i enter it in the COE file as 2100205514 with the radix=10 and the width as i want it to be (with changing the coefficient to the size that it can fit the width!)?

greetings,

Yttrium


<ccon> wrote in message news:ee82680.2@WebX.sUN8CHnE...
scale your numbers to integer, the coef width depends on the resolution(decimal points)you wish.
 
"Yttrium" <Yttrium@pandora.be> wrote in message news:<sSNXb.2451$hs5.60476@phobos.telenet-ops.be>...
wo when i have 0.002100205514 as a coefficient i enter it in the COE
file as 2100205514 with the radix=10 and the width as i want it to be
(with changing the coefficient to the size that it can fit the width!)?

greetings,

Yttrium


ccon> wrote in message news:ee82680.2@WebX.sUN8CHnE...
scale your numbers to integer, the coef width depends on the
resolution(decimal points)you wish.
--
yup, it's something like that, and it also depends on max/min range of
your coefficients. For the number in your example you will need 32 bit
coe, and if your coef is signed you will need 1 more bit. In
practical you may reduce your resolution to fit in smaller device.
Generally speaking, you may ask yourself what kind of device you can
afford? what is your data width? howmany taps? and what kind of
FIR?...
 
thanx, have made a script (thanx to a post by R Andraka where he mentioned
some interesting matlab functions) in matlab and i found my coefficient and
the FIR is up and running ;-)

thanx

yttrium

"Marlboro" <ccon67@netscape.net> wrote in message
news:e3fd5378.0402161950.5bdb7eea@posting.google.com...
"Yttrium" <Yttrium@pandora.be> wrote in message
news:<sSNXb.2451$hs5.60476@phobos.telenet-ops.be>...
wo when i have 0.002100205514 as a coefficient i enter it in the COE
file as 2100205514 with the radix=10 and the width as i want it to be
(with changing the coefficient to the size that it can fit the width!)?

greetings,

Yttrium


ccon> wrote in message news:ee82680.2@WebX.sUN8CHnE...
scale your numbers to integer, the coef width depends on the
resolution(decimal points)you wish.
--

yup, it's something like that, and it also depends on max/min range of
your coefficients. For the number in your example you will need 32 bit
coe, and if your coef is signed you will need 1 more bit. In
practical you may reduce your resolution to fit in smaller device.
Generally speaking, you may ask yourself what kind of device you can
afford? what is your data width? howmany taps? and what kind of
FIR?...
 

Welcome to EDABoard.com

Sponsor

Back
Top