Answered step by step
Verified Expert Solution
Question
1 Approved Answer
EEE 2 0 5 Laboratory 5 ALU Design In this experiment you need to build an 8 - bit Arithmetic Logic Unit ( ALU )
EEE
Laboratory
ALU Design
In this experiment you need to build an bit Arithmetic Logic Unit ALU in Quartus Prime
design suite. ALU is a critical design element in computer architecture.
Design specifications:
There will be two bit input operands: A and B
There will be a mode select input modsel where:
When modsel there will be arithmetic operations.
When modsel there will be logic operations.
Secondly, there will be operation selection opsel input where:
In arithmetic mode when modsel :
opsel addition
opsel subtraction
opsel multiplication
opsel output is
In arithmetic mode when mod sel :
opsel Out A B bitwise OR operation
opsel Out bitwise OR operation
opsel Out inverse of A input
your general code structure should be similar to:
module ALUbitA B Out, modsel, opsel;
here comes input output pin and bitsize definitions
reg : Out;
always @
begin
if sel
begin
case opsel
: Out dots.
: Out dots
: Out dots : Out dots
default: Out dots
endcase
end
else if modsel
begin
caseopsel
: Out dots
: Out dots
: Out dots
: Out dots
default: Out dots
endcase
end
end
endmodule
Questions:
What is the bit size for the output of multiplication?
What types of optimizations can be made for the ALU here?
What is the advantage of the always keywords in the code? Could we design the ALU
in another way, explain.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started