Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(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. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started