I want to design a CIC filter which has a decimation ratio of 32, I need 10 bits at the output, and my input is 2 bits, I want 3 stages and differential delay is 1 so according to Hogenauer's paper wordlength is N*log(RM)+Bin -1=3*log(32)+2=16 bits, however I want 10 bits at the output, and again according to Hogenauer's paper the number of bits being discarded at each stage is 0,0,1,3,4,5. Anyway I want to simulate this CIC filter in Matlab Simulink, first I want to simulate the filter without discarding the bits, after I want to simulate the filter with discarding the bits, first I use
and obtain simulink blocks, I use a discrete sine wave source from Signal Processing Blockset and try to simulate and see the output with a scope but the output is not the required output, after I use
hm=mfilt.cicdecim(32,1,3,2,10,[16 15 14 12 11 10]);
and the output gets worse. when I use
in this case the input wordlength is 16, output wordlength is 31 and I can get reasonable results, my question is how can I obtain 10 bits output when I want to design a CIC filter with a decimation ratio of 32 and simulate it with simulink ?