Question: Draw the control unit and datapath for the following algorithm written in pseudocode that returns an integer value. The function takes two points ( x

Draw the control unit and datapath for the following algorithm written in pseudocode that returns
an integer value. The function takes two points ( x1,y1) and ( x2,y2) and computes the equation for
a line. It then evaluates and returns ynew for the parameter xp using that line. Include an error
output signal that is high if x1- x2 is zero; in order to calculate slope, we must have two points that
have different values for the independent variable, x. Use a 16-bit data bus. Show your work;
clearly label your diagram. Do not implement this in VHDL. Remember, for * and +, just use a block
component; there's no need to design those basic operations.
int PredY(int x1, int y1, int x2, int y2, int xp)\
{
int m, b, ynew;
if (x1- x2)>0
{
b = y1- m ** x1;
ynew = m * xp + b;
return (ynew);
}
else
{
error; // raise an error
}
}
please draw both the control unit and datapath
Draw the control unit and datapath for the

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 Programming Questions!