Digital Circut Design - Project
Digital Circut Design - Project
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
BY
P. BHAVANA 228W1A04B3
P. TEJA 228W1A0491
P. SHANMUKH 228W1A0492
1
DECLARATION
We hereby declare that the work is being presented in this 20EC3352, Analog
Electronics Lab course-based project entitled as “16-BIT ALU”, submitted towards the
partial fulfillment of requirements for the award of the degree of Bachelor of Technology
in Electronics and Communication Engineering Department in Velagapudi Ramakrishna
Siddhartha Engineering College, Vijayawada is an authentic record of our work
The matter embodied in this report has not been submitted by us for the award
of any other degree. Furthermore, the technical details furnished in various chapters of
this report are purely relevant to the above project and there is no deviation from the
theoretical point of view for development and implementation.
P. BHAVANA-228W1A04B3
P. TEJA-228W1A04B4
P. SHANMUKH-228W1A04B5
2
TABLE OF CONTENTS page no
o Abstract 4
o Theory 5
o Circuit Diagram 7
o Procedure 8
o Program 9
o Output 9
Conclusion 10
3
ABSTRACT
4
AIM: Design and implementation of 16-bit ALU using Verilog HDL
REQUIREMENTS:
1) PC
THEORY:
5
on floating point numbers. It is a fundamental building block of many
types of computing circuits, including the central processing unit (CPU)
The inputs to an ALU are the data to be operated on, called operands, and
a code indicating the operation to be performed; the ALU's output is the
result of the performed operation. In many designs, the ALU also has
status inputs or outputs, or both, which convey information about a
previous operation or the current operation, respectively, between the
ALU and external status registers.
PROCEDURE:
Step 4: Now open the command window and check LAN connection
here, it should be wired on. Then only it runs.
6
Step 6: Now type source /home/install/cshrc and click on enter.
Step 9: Type nclaunch -new and click enter in the open terminal window.
Step 10: It enters into cadence, then click Multiple steps create cds.lib
7
save.
Step 11: Keep the Verilog option (3rd option) and click on ok and again
ok.
Step 12: Select both files i.e., program and test bench and click on
“Launch vloc”.
Step 13: Then select each one in the work.lib and click on elaborate.
Step 17: Click on run and zoom out for clear output.
PROGRAM:
module alu (
input [7:0] A, B, // ALU 8-bit Inputs
input [3:0] ALU_Sel, // ALU Selection
output [7:0] ALU_Out, // ALU 8-bit Out);
reg [7:0] ALU Result;
always @ (*)
begin
case (ALU_Sel)
4'b0000: // Addition
ALU_Result = A + B;
4'b0001: // Subtraction
ALU_Result = A - B;
4'b0010: // Multiplication
ALU_Result = A * B;
4'b0011: // Division
8
ALU_Result = A/B;
4'b0100: // Logical shift left
ALU_Result = A<<1;
4'b0101: // Logical shift right
ALU_Result = A>>1;
4'b0110: // Rotate left
ALU_Result = {A [6:0], A [7]};
4'b0111: // Rotate right
ALU_Result = {A [0], A [7:1]};
4'b1000: // Logical and
ALU_Result = A & B;
4'b1001: // Logical or
ALU_Result = A | B;
4'b1010: // Logical xor
ALU_Result = A ^ B;
4'b1011: // Logical nor
ALU_Result = ~ (A | B);
4'b1100: // Logical nand
ALU_Result = ~ (A & B);
4'b1101: // Logical xnor
ALU_Result = ~ (A ^ B);
4'b1110: // Greater comparison
ALU_Result = (A>B)?8'd1:8'd0;
4'b1111: // Equal comparison
ALU_Result = (A==B)?8'd1:8'd0;
default: ALU_Result = A + B;
endcase
end
endmodule
9
OUTPUT:
----------------------------------------------------
------------------
|
10
----------------------------------------------------
------------------
| 1000 | ALU_Out = A and B;
----------------------------------------------------
------------------
| 1001 | ALU_Out = A or B;
----------------------------------------------------
------------------
| 1010 | ALU_Out = A xor B;
----------------------------------------------------
------------------
| 1011 | ALU_Out = A nor B;
----------------------------------------------------
------------------
| 1100 | ALU_Out = A nand B;
----------------------------------------------------
------------------
| 1101 | ALU_Out = A xnor B;
----------------------------------------------------
------------------
| 1110 | ALU_Out = 1 if A>B else 0;
----------------------------------------------------
------------------
| 1111 | ALU_Out = 1 if A=B else 0;
----------------------------------------------------
------------------*/
11
MICROPROCESSOR APPLICATIONS
A microprocessor makes daily life easier because of its low cost, low
power, small weight, and vast application in every field. There are several
applications of microprocessors. Some of the important applications are:
Transportation Industry
o Automobiles, trains and planes also use microprocessor technology.
o Consumer vehicles-buses, cars, trucks -integrate microprocessors to
communicate important information throughout the vehicle. E.g.,
navigation systems provide information using microprocessors and
global positioning system (GPS) technology.
In Medicals
o Many medical devices, like an insulin pump, are typically controlled
by a microprocessor. The microprocessors perform various
12
functions, such as processing data from bio-sensors, storing
measurements, and analyzing results.
Instrumentation
o Microprocessor is also very useful in the field of instrumentation.
Function generators, frequency counters, frequency synthesizers,
spectrum analyses and many other instruments are available, when
microprocessors are used as controller.
Entertainment
o The use of microprocessor in entertainment equipment, toys and
home entertaining applications is making them more useful and
fullerof features.
Communication
o In communication the telephone industry is most important. In this
industry, microprocessors are used in digital telephone sets,
telephone exchanges and modem etc.
13
o The use of microprocessor in satellite communication, television,
has made teleconferencing possible.
o Railway reservation and airline reservation system also uses
microprocessor technology. WAN (Wide Area Network) and LAN
(Local Area Network) for communication of vertical information
through computer network.
RESULT:
14