### Don't have a Xilinx account yet?

• Choose to receive important news and product information
• Personalize your web experience on Xilinx.com

Create Account

XClose Panel

## Digital Signal Processing - IP and Algorithms

Visitor
Posts: 10
Registered: ‎12-23-2011

# Output type of FIR Compiler V4.0

In the xilinx fir compiler V4.0 ,The din is unsigned,coeff is two's complement,and then the dout is signed or unsigned ?

Super Contributor
Posts: 195
Registered: ‎12-08-2010

# Re: Output type of FIR Compiler V4.0

Signed

Best Regards,
Vitaly.
Visitor
Posts: 10
Registered: ‎12-23-2011

# Re: Output type of FIR Compiler V4.0

Hi,

It meanse that output of FIR filter is depend on the type of coefficients not on the input type whether ti is signed or unsigned.

I want to ask one more que. when we are selecting signed input type in IP  what should we give the input to FIR Complier i.e. straight binary or 2s complement?

And if I want to give the input (i.e. -1 to +1) to FIR IP how can I give?

Super Contributor
Posts: 195
Registered: ‎12-08-2010

# Re: Output type of FIR Compiler V4.0

If it's signed, then it means two's complement.

In your case input's bitwidth is 8 bits.

So input values should be in range from -2^(8-1) = -128 = 10000000b (or it maps to -1.0 value) to 2^(8-1)-1 = 127 = 01111111b (that maps to 1.0 value).

Best Regards,
Vitaly.
Xilinx Employee
Posts: 2,873
Registered: ‎11-28-2007

# Re: Output type of FIR Compiler V4.0

I would suggest you google fixed point number representation. Vitaly showed an example of 8-bit fixed point numbers. In case it matters, 01111111b is not exactly 1.0 assuming 8.7 format. It's  0.992187500000000.

falconbombay wrote:

Hi,

It meanse that output of FIR filter is depend on the type of coefficients not on the input type whether ti is signed or unsigned.

I want to ask one more que. when we are selecting signed input type in IP  what should we give the input to FIR Complier i.e. straight binary or 2s complement?

And if I want to give the input (i.e. -1 to +1) to FIR IP how can I give?

Cheers,
Jim
Super Contributor
Posts: 195
Registered: ‎12-08-2010

# Re: Output type of FIR Compiler V4.0

Hi, Jim!

In case it matters, 01111111b is not exactly 1.0 assuming 8.7 format. It's  0.992187500000000.

Thank you for correction. Yes, if we have signed number with N bits and (N-1) fractional bits, then whole number range is from -2^(N-1) to [2^(N-1)]-1. And that's mapped to normalized half-closed interval [-1.0; 1.0), i.e. including -1.0 and excluding 1.0. It can be recalculated as closed interval [ -1.0; 1.0-2^(1-N) ].

Best Regards,
Vitaly.
Visitor
Posts: 10
Registered: ‎12-23-2011

# Re: Output type of FIR Compiler V4.0

Hi Vitaly and Jim,