Question: (3) Q1. Consider the code of the FIR filter given below. What is the limitation in fully unrolling the Shift_Accum_Loop and how can we overcome

 (3) Q1. Consider the code of the FIR filter given below.

(3) Q1. Consider the code of the FIR filter given below. What is the limitation in fully unrolling the Shift_Accum_Loop and how can we overcome this limitation? void fir( data_t *y, coef_t c[4], data_t x) { static data_t shift_reg[4]; acc_t acc; data_t data; int i; acc=0; Shift_Accum_Loop: for (i=3;i>=0;i--) { if (i==0) { shift_reg[0]=x; data = x; } else { shift_reg[i]=shift_reg[i-1]; data = shift_reg[i]; } acc+=data* c[i]; } *y=acc; } (3) Q1. Consider the code of the FIR filter given below. What is the limitation in fully unrolling the Shift_Accum_Loop and how can we overcome this limitation? void fir( data_t *y, coef_t c[4], data_t x) { static data_t shift_reg[4]; acc_t acc; data_t data; int i; acc=0; Shift_Accum_Loop: for (i=3;i>=0;i--) { if (i==0) { shift_reg[0]=x; data = x; } else { shift_reg[i]=shift_reg[i-1]; data = shift_reg[i]; } acc+=data* c[i]; } *y=acc; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!