Altera_Forum
Honored Contributor
18 years agoFIR coefficient reloading problem
I have a simple single rate FIR filter (StratixII, fully parallel, coef storage in M512, signed binary, 12 bit input data, 12 bit coefficient).
I calculated a low pass with an external software, scaled the values to 12 bit (-2048 ... +2047) and imported the coefficient set with FIR-Compiler (I selected "no scaling"). That works fine :) Now I took the same coefficient set, made a coefficient reordering with coef_seq.exe coef_in.txt coef_reload.txt PAR M512 MSYM 12 1 SGL 1 12 and loaded these parameters via the coef_in port. Then I see a strange signal (sinus input, viewing the output with an oscilloscope). It seems the amplitude is much to high an I have an overflow inside the FIR. I then scaled the values only to -256...+255 before reordering and it looks better. I can see the low pass characteristic but the amplitude is still to high and the signal little corrupted. As the low pass filter with the FIR-COMPILER imported values after reset work fine the calculated and scaled values should be OK. By the way when switching scaling from AUTO to MANUAL I see the factor 1.0. So I can imagine only two problems. 1) coefficient reordering does fail 2) reloading timing does fail (coef_we is active 1 clk before the first coefficient (0) and valid until the last coefficient (no delay)). I have attached screenshots from FIR-Compiler and the scaled and reordered coefficients. Has anyone an idea?