2 Replies Latest reply on Mar 19, 2018 2:31 AM by GeonaM_26

# How to convert filter coefficients to DFB code

Hello members

I set the coefficients of the filter component (channel: A, Filter class: FIR, taps: 5) as follows.

-0.151365399360657

-0.25751805305481

0.700000047683716

-0.25751805305481

-0.151365399360657

On the other hand, the DFB code inside the filter component was described as follows.

area data_b

ChA_FIRST:dw 15507471

dw 14616998

dw 5872026

dw 14616998

ChA_LAST: dw 15507471

[Question]

How is the coefficient set in the filter component converted to the numerical value described in the DFB code?

For example, why "-0.151365399360657" is converted to "15507471"?

Best Regards

• ###### 2. Re: How to convert filter coefficients to DFB code

Hello Shimizu-san,

DFB uses Q23 format i.e. 23 bits for decimal points and one for sign.

First coefficient is a negative number. Hence the hexadecimal representation is two's complement of the number in Q23.

coefficient1 => (2^24) –  (2^23 * 0.151365399360657)=15507471= 0xECA00E

Third one is a positive decimal number.  Just multiply the number by 2^23 to convert to Q23.

coefficient2 => (2^23 * 0.700000047683716)=5872026= 0x59999A

Best Regards,

Geona Mary