FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > FPGA

FPGA comp.arch.fpga newsgroup (usenet)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-09-2004, 06:58 PM
Yttrium
Guest
 
Posts: n/a
Default FIR filter coefficient (with COE file)

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


Reply With Quote
  #2 (permalink)  
Old 02-09-2004, 11:24 PM
Ben Howe
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)

http://www.mathworks.com/access/help...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" <[email protected]> wrote in message news:<DTPVb.4731$[email protected]>...
> 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

Reply With Quote
  #3 (permalink)  
Old 02-10-2004, 09:24 AM
Vladislav Vasilenko
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)



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.

Reply With Quote
  #4 (permalink)  
Old 02-11-2004, 09:24 PM
ccon
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)

scale your numbers to integer, the coef width depends on the resolution(decimal points)you wish.
Reply With Quote
  #5 (permalink)  
Old 02-15-2004, 06:19 PM
Yttrium
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)

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:[email protected]..
scale your numbers to integer, the coef width depends on the resolution(decimal points)you wish.
Reply With Quote
  #6 (permalink)  
Old 02-17-2004, 04:50 AM
Marlboro
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)

"Yttrium" <[email protected]> wrote in message news:<sSNXb.2451$[email protected]>...
> 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:[email protected]..
> 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?...
Reply With Quote
  #7 (permalink)  
Old 02-17-2004, 07:20 PM
Yttrium
Guest
 
Posts: n/a
Default Re: FIR filter coefficient (with COE file)

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" <[email protected]> wrote in message
news:[email protected] om...
> "Yttrium" <[email protected]> wrote in message

news:<sSNXb.2451$[email protected]>...
> > 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:[email protected]..
> > 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?...



Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mean value filter [email protected] Verilog 15 12-22-2005 12:09 PM
FIR Filter Model priya Verilog 4 08-18-2005 11:32 PM
Re: DA FIR filter vs. MAC FIR filter Sasa Bremec FPGA 0 08-27-2003 09:48 AM


All times are GMT +1. The time now is 04:25 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved