FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6343 Discussions

FIR II Compiler V10.1 Coefficient Scaling

Altera_Forum
Honored Contributor II
1,040 Views

Hye all, 

 

I'm implementing a 127-taps FIR for baseband shaping. 

I'm using the FIRII compiler for it. 

 

I noticed that in the 'old' FIR compiler you had the option to scale the coefficients automatically with a power of 2. 

 

In FIRII there is only one scaling:  

Y = ((2^bits-1)/max(|coefvalue|))X 

 

I like to use the FIRII because of the coefficient reload interface it generates, but I also like either no scaling or scaling by power of two, so at the output I can easily compensate for gain. 

 

Any idea if this is possible with FIRII and how? 

 

Thanks! 

 

Grtz, 

 

Olaf
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
274 Views

It is really important: 

1) scaling, when coefficients reload ; 

2)I make Hilbert transformer for envelope detection: real part - as shift register, image part - as bandpass filter (FIR II 10.1). Both parts must have equal scale, but FIR II don't asks me!:cry:
0 Kudos
Altera_Forum
Honored Contributor II
274 Views

old thread, but i have filed an enhancement request on this issue

0 Kudos
Altera_Forum
Honored Contributor II
274 Views

To get dc unity gain, you scale your coeffs as follows: 

coeff = round(2^n/sum(coeffs)); 

 

in your case, you easily work around by rescaling your normalised coeffs so that your max coeff = sum of coeffs.  

what remains is the difference of 2^n & 2^n - 1 which is trivial.
0 Kudos
Reply