Question: Convert the C-like code at the right, which calculates the maximum difference between any two numbers within an array A consisting of 256 8-bit
Convert the C-like code at the right, which calculates the maximum difference between any two numbers within an array A consisting of 256 8-bit values, into a HLSM. Create a datapath for your HLSM and thencomplete the RTL design preocess to achieve a controller (FSM) connected with your datapath. Inputs: byte a [256], bit go Outputs: byte max_diff, bit done MAX DIFF: while (1) { while (!go); done = 0; i = 0; max = 0; min = 255; // largest 8-bit value while( i < 256 ) { if(a[i] max ) { max=a[i]; } } i = i + 1; max_diff = max- min; done = 1; Activate Wind Go to Settings to a
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
