cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
7,053 Views
Registered: ‎10-29-2007

Very strange auto-inferred quantizing in accelDSP

I have a vector that is auto-quantized to fixed wrap [20 6] format. Let us call the vector X. So far so good.
 
But then I take two elements in the vector and subtract. Y = X(1)-X(5);
Auto inferred precision is then fixed wrap [14 6] for Y!!!!!!
 
Can anyone explain how the fixed point generator can greate a 14 bit value for the difference between two signed 20-bit values???
 
Edit: I use AccelDSP 9.2.01 and Matlab R2007a
 


Message Edited by andax on 03-13-2008 09:27 AM
0 Kudos
3 Replies
Highlighted
Xilinx Employee
Xilinx Employee
7,022 Views
Registered: ‎08-07-2007

are the any elements in the X vector constants?
0 Kudos
Highlighted
Contributor
Contributor
7,011 Views
Registered: ‎10-29-2007

No, X is a result vector based on the input stream of samples and thus not constant in any sense.
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
6,991 Views
Registered: ‎08-07-2007

Check if there are any quantize directives on 'Y' forcing  the type.  You can search through the .add file for lines containing "SetDirective -quantize". 

Any quantize directives will override any implied data types.  You can also have an explicit quantization coded into your MATLAB. 

If you don't think either of these is the case please open a WebCase with Xilinx support so we can investigate this further.
0 Kudos