Answered step by step
Verified Expert Solution
Link Copied!

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 )

EEE205
Laboratory 5
ALU Design
In this experiment you need to build an 8-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 8-bit input operands: A and B.
There will be a mode select input (mod_sel) where:
When mod_sel =0, there will be arithmetic operations.
When mod_sel =1, there will be logic operations.
Secondly, there will be operation selection op_sel input where:
In arithmetic mode (when mod_sel =0):
op_sel =0, addition
op_sel =1, subtraction
op_sel =2 multiplication
op_sel =3, output is -A
In arithmetic mode (when mod _sel =0):
op_sel =1, Out = A || B (bitwise OR operation)
op_sel =2, Out =A???B(bitwise OR operation)
op_sel =3, Out =A'(inverse of A input)
your general code structure should be similar to:
module ALU_8bit(A, B, Out, mod_sel, op_sel);
//here comes input output pin and bitsize definitions
reg [7:0] Out;
always @(*)
begin
if sel =0)
begin
case (op_sel)
0 : Out =dots.
1: Out =dots
2: Out =dots 3: Out =dots
default: Out =dots
endcase
end
else if (mod_sel==1)
begin
case(op_sel)
0: Out =dots
1: Out =dots
2: Out =dots
3: Out =dots
default: Out =dots
endcase
end
end
endmodule
Questions:
1- What is the bit size for the output of 88 multiplication?
2- What types of optimizations can be made for the ALU here?
3- What is the advantage of the always keywords in the code? Could we design the ALU
in another way, explain.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions