Question: ( a ) Write a Verilog code for a simple Arithmetic and Logic Unit ( ALU ) that implements 8 functions as described in Table
a Write a Verilog code for a simple Arithmetic and Logic Unit ALU that implements
functions as described in Table Table shows the encoding of the control input. Read
the design restrictions carefully
b Test your design all for operations by providing proper inputs and observing outputs on the
waveform window. You need to come up with inputs and expected outputs.
The bit ALU has the following inputs and outputs:
Inputs
A: bit input a positive number; no sign bit
B: bit input a positive number; no sign bit
Cin: bit input
Control: bit control input
Outputs
Output: bit output
Cout: bit output
Table : ALU Instructions
The following things should be taken care of:
Use a case statement that checks the "Control" and acts on A B and Cin as described in
Table case statement should be in 'always' block
All the ALU operations are completely combinational.
Verilog coding should follow the given design guidelines described in Table
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
