UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor phoe_137
Visitor
362 Views
Registered: ‎10-13-2019

Fixed point format FIR compiler

Jump to solution

Hi all,

I am using FIR compiler v7.2 for my system. I input the data to FIR with format 16Q15 (or Q.15) and the output of FIR is 32Q15 (or Q17.15). I want to convert this format to Q.15 like input. So, is there anyway to do this ?

Thank you,

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
154 Views
Registered: ‎08-16-2018

Re: Fixed point format FIR compiler

Jump to solution

I am using FIR compiler v7.2 for my system. I input the data to FIR with format 16Q15 (or Q.15) and the output of FIR is 32Q15 (or Q17.15). I want to convert this format to Q.15 like input. So, is there anyway to do this ?

 

As mentioned by @drjohnsmith, we can use the truncate option here. But it will not work here due to below reason, 

Reason: The output Q17.15 i.e. 17 interger bits are required for full scaled output. If we use Q.15 format, then we have 1 bit for integer output. Hence the lower 16 bit will be discarded by the compiler. In the other words, the output will be attenuated by a factor of 2^16. 

 

 Another thing to notice is, your input is 16Q15, but output is 32Q15 i.e. we have large value of coefficients (as the output is multiplication and add operation of coefficent and input data). May be you can play with coefficient values to reduce the output size and then use the truncate option. 


/ 7\7     Meher Krishna Patel, PhD
\ \        Senior Product Application Engineer, Xilinx
/ /        
\_\/\7   It is not so much that you are within the cosmos as that the cosmos is within you...

View solution in original post

4 Replies
Scholar drjohnsmith
Scholar
331 Views
Registered: ‎07-09-2009

Re: Fixed point format FIR compiler

Jump to solution

Thinking of base 10 numbers,

    if you multiply 99 by 99, you get 9801,

           to put that back into the sam eformat , yo move the decimal point twoto the left, to give 98.01 , as an integer 98

 

'All' the Q format is doing it saying where the binary point is,

    

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Scholar drjohnsmith
Scholar
328 Views
Registered: ‎07-09-2009

Re: Fixed point format FIR compiler

Jump to solution
0 Kudos
Scholar drjohnsmith
Scholar
326 Views
Registered: ‎07-09-2009

Re: Fixed point format FIR compiler

Jump to solution

I have just quickly checked,

you can also set the output size in the FIR compiler, and the method of truncation

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Highlighted
Moderator
Moderator
155 Views
Registered: ‎08-16-2018

Re: Fixed point format FIR compiler

Jump to solution

I am using FIR compiler v7.2 for my system. I input the data to FIR with format 16Q15 (or Q.15) and the output of FIR is 32Q15 (or Q17.15). I want to convert this format to Q.15 like input. So, is there anyway to do this ?

 

As mentioned by @drjohnsmith, we can use the truncate option here. But it will not work here due to below reason, 

Reason: The output Q17.15 i.e. 17 interger bits are required for full scaled output. If we use Q.15 format, then we have 1 bit for integer output. Hence the lower 16 bit will be discarded by the compiler. In the other words, the output will be attenuated by a factor of 2^16. 

 

 Another thing to notice is, your input is 16Q15, but output is 32Q15 i.e. we have large value of coefficients (as the output is multiplication and add operation of coefficent and input data). May be you can play with coefficient values to reduce the output size and then use the truncate option. 


/ 7\7     Meher Krishna Patel, PhD
\ \        Senior Product Application Engineer, Xilinx
/ /        
\_\/\7   It is not so much that you are within the cosmos as that the cosmos is within you...

View solution in original post