Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

define a filter kernel (with floating-point numbers) in vhdl

Status
Not open for further replies.

MOOMOO_KAMP81

Junior Member level 3
Joined
Feb 16, 2010
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Iran
Activity points
1,463
Hi


can any one say about this problem in my thesis

How i should define a fir filter kernel with floating point number like "- 0.0144" in vhdl wich could be synthesized(synthesizable)?

Mahmoodreza_62(at)yahoo.com
 

You'll most likely want to use fractional numbers rather than floating point for the FIR coefficients and fixed point arithmetic for the filter.
 
Re: define a filter kernel (with floating-point numbers) in

coul you explain more,how i should use them?
 

Re: define a filter kernel (with floating-point numbers) in

First you have to select a number range and bitwidth for the coefficients. Assuming it would be -1...+1 and 16 bit, you convert the parameter constant to signed integer by multplying it with 2**15. E.g. for -0.0144 you get -472. All filter multiplications are performed as integer multiply then. The coefficient LSB actually represents 1/(2**15).
 
hi
i have another problem,plz help!

in this code :
sum <= sum+image()*filter()

which all of them are integer image is a matrix of integer range 255 downto 0,filter is integer array range 2**16-1 downto -(2**16),sum is integer range 2**24-1 downto -(2**24)

but i have problem in range of sum because overflow is happen

i don know how i should define the range of sum?!!!
 

Where does the overflow happen?

the integer type can store any value from -2**31 up to 2**31-1

for your own sanilty, you may want to stop using integers and use the new fixed point libraries from IEEE. Then you dont need to keep track of any numerator/fraction in any number, its all taken care of. You could do something like this:

signal filter : sfixed(2 downto -8 ); --covers the range -8 to +(8- 2^-8 ) in steps of 2^-8 (0.00390625)
 

HOW SHOULD I use this librarary?

from where i can dl it? after dl where is the destination folder in modelsim?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top