Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Auditing The Master A Tax Collector Report

Authors: B. Cobbey Crisler

1st Edition

1912297108, 978-1912297108

More Books

Students also viewed these Accounting questions