Question: Exam Problem: Given a C - like code, Inputs: go ( 1 - bit ) Outputs: done ( 1 - bit ) , average (
Exam Problem: Given a Clike code,
Inputs: go bit
Outputs: done bit average bit maxbit
Local Storage: This part is your responsibility and part of this exam. You are also to decide
number of bits that should be used for sum such that an overflow will not occur and average
the average of all elements in the array can be correctly calculated.
while
whilego;
done ;
max ;
sum ;
fori ; i ; i
sum sum Ai;
temp Ai;
if temp max
max temp;
if temp
Ai temp ;
average sum;
done ;
Draw its HLSM
Write Verilog codes and testbench to perform both behavioral and post
synthesis functional simulations of your designed digital system. Use a
clock period of ns in the testbench.
Note: If you decide to use a structural way of Verilog code, you must show
and submit work by hand of the designed Datapath and Controller.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
