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.

FIR Filterfloating point co-efficients not synthesizable

Status
Not open for further replies.

Sithija Hewavitharana

Newbie level 1
Newbie level 1
Joined
May 15, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
Hi all, i have designed a low pass FIR filter in verilog in which co-efficients are in 0.0XXX range.. i tried $realtobits (is it synthesizable?) and i get the following warning..

"System function call realtobits not supported"

how do i implement synthesizable floating point values in my verilog code..please explain with an example..

below is my sample code...




parameter b0 = 8'd7;

b0 is a co-efficient of the FIR filter, and i want b0 to be a value like 0.0015990642151178748

please help...
 

multiply coefficients by 2^N, round them to nearest integer, then divide the FIR output by N.
 

if that coefficient is an input of the filter module, i think you just need to convert that to single precision(32 bit) or double precision(64 bit) and then apply it to the input of the coefficient. you can convert the floating point value to the single precision floating point using this site:
https://www.h-schmidt.net/FloatConverter/IEEE754.html
 

if that coefficient is an input of the filter module, i think you just need to convert that to single precision(32 bit) or double precision(64 bit) and then apply it to the input of the coefficient. you can convert the floating point value to the single precision floating point using this site:
https://www.h-schmidt.net/FloatConverter/IEEE754.html
I'm not sure you understand what you are suggesting...IEEE754 is a floating point number format, which isn't going to help the OP unless they have IEEE754 compliant multipliers and adders, which will require a lot more resources than a fixed point (or integer) design will require.
 

I'm not sure you understand what you are suggesting...IEEE754 is a floating point number format, which isn't going to help the OP unless they have IEEE754 compliant multipliers and adders, which will require a lot more resources than a fixed point (or integer) design will require.

the above question is about floating point and so think the module must be compatible with ieee745 floating point number format.
 

Reread the OP's first post, the OP doesn't understand trying to build a FIR filter with floating point isn't the best way to approach this in hardware. The OP is obviously coming from a software centric view of design and is just starting to learn about hardware design.

I'm confident the OP doesn't want to build floating point hardware as they were trying to convert the coefficients that are <1 to bits using $realtobits (which isn't synthesizable).

Scaling the values as axcdd suggestd is the correct way to do this.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top