Sabu Verilog
Sabu Verilog
Submitted by
K.V.SABAREESH 111722104078
O.MANI CHOWDARY 111722104102
BACHELOR OF ENGINEERING
in
1
A simple Arithmetic Logic Unit
Submitted by
K.V.SABAREESH 111722104078
O.MANI CHOWDARY 111722104102
BACHELOR OF ENGINEERING
in
BONAFIDE CERTIFICATE
Certified that this project report “A simple Arithmetic Logic Unit” is the bonafide work of
K.V.SABAREESH(111722104078), O.MANI CHOWDARY(111722104102) who carried out the
Mini project of Design Verification and Debugging under my supervision.
SIGNATURE SIGNATURE
Submitted for the Mini project one credit lab held on………………….at R.M.K. Engineering
College, Kavaraipettai, Tiruvallur District – 601 206
We would like to express our heartfelt thanks to the Almighty, our beloved parents for
their blessings and wishes for successfully doing this project.
We convey our thanks to Chairman Thiru R.S. Munirathinam and Vice Chairman Thiru
R.M. Kishore who took keen interest and encouraged us throughout the course of study
and for their kind attention and valuable suggestions offered to us.
We express our sincere gratitude to our Principal Dr. K. A. Mohamed Junaid, M.E.,
Ph.D., for fostering an excellent climate to excel.
We are extremely thankful to Dr. T. Suresh, M.E., Ph.D., Professor and Head,
Department of Electronics and Communication Engineering, for having permitted us to
carry out this project effectively.
We extend our gratitude to Dr. A Merline, M.E., Ph.D., Professor and Year
coordinator for his support and lead throughout the course of the project.
We convey our sincere thanks to our mentor, skillful and efficient supervisor,
MS.JEEVITHA, M.E., Assistant Professor for her extremely valuable thoughts,
guidance throughout the course of the project.
We are grateful to our Parents and colleagues for their intense support.
ABSTRACT
ThThe Arithmetic and Logic Unit (ALU) is a fundamental component of digital computing
systems, responsible for executing a range of arithmetic and logical operations that form the
core computational tasks in processors. This paper discusses the design, implementation, and
Language (HDL). The ALU is designed to perform various mathematical and logical
functionality and performance. The objective of this project is to understand the underlying
digital design principles governing ALU operations and to create a modular, efficient, and
1 INTRODUCTION
1.1 General Description 1
2 OBJECTIVE 2
3 THEORY
3.1 Theory 3
3.2 Disadvantages 3
4 LITERATURE REVIEW 6
5 PROPOSED SYSTEM 8
7 FINAL OUTPUT 18
9 CONCLUSION 20
CHAPTER - 1
INTRODUCTION
We The Arithmetic and Logic Unit (ALU) forms the core of a Central Processing Unit
evaluations. The ALU is a combinational circuit that receives control signals dictating the
required operation and processes input operands to generate the corresponding output. The
performance ALU, develop it in Verilog HDL, and verify its operation using FPGA
implementation.
The scope of this project is, discusses the design, implementation, and verification of a multi-
functional ALU developed using Verilog Hardware Description Language (HDL). The ALU
The objective of this project is to understand the underlying digital design principles
governing ALU operations and to create a modular, efficient, and scalable design suitable for
1
CHAPTER-2
2.1 OBJECTIVE
● To comprehend the design and working principles of arithmetic and logical circuits.
● To develop a modular ALU using Verilog HDL, ensuring flexibility and scalability.
● To synthesize and implement the designed ALU on an FPGA board and validate its
functionality.
● To analyze the efficiency and performance of the ALU using simulation and hardware
verification techniques.
2
CHAPTER-3
THEORY
3.1 Theory
Overview
and logical operations. The two diagrams presented depict different symbolic representations
of an ALU.
The first diagram provides an abstract representation of an ALU with the following key
components:
● Inputs: Two operands, labeled A and B, which serve as the primary data inputs.
● Control Signal (Ctrl): A control input that determines the operation performed by the
3
● Output: An 8-bit data output bus that holds the result of the operation.
The second diagram provides a more detailed block-level representation of an ALU, suitable
● Inputs:
o A[N:0] and B[N:0]: Two N-bit input operands that provide data for
computation.
by the ALU.
● Outputs:
This structured ALU diagram illustrates how control signals and additional inputs such as
4
carry-in affect the operation of the unit. The use of an opcode allows the ALU to perform
systems.
● The first diagram presents an abstract overview, focusing on the fundamental inputs,
internal signal flow and additional functionalities such as carry-in and carry-out.
● Both diagrams highlight the role of an ALU in performing core computational tasks in
digital systems.
3.2 DISADVANTAGES
5
CHAPTER-4
LITERATURE REVIEW
The Arithmetic and Logic Unit (ALU) is a fundamental building block of digital computing
systems, responsible for performing arithmetic and logical operations. Over the years,
researchers have focused on optimizing ALU designs for improved performance, power
efficiency, and reduced delay. However, ALUs also present several challenges, including
power consumption, latency issues, and hardware complexity. This literature survey explores
According to Mano and Ciletti (2017), ALUs are typically designed using combinational
logic circuits, with adder-subtractor units being integral components. The study highlights
that conventional ALUs suffer from carry propagation delays in addition operations, leading
to increased execution time. To address this, advanced carry-lookahead adders and carry-save
As transistor density increases, power consumption becomes a critical issue in ALU design.
in digital circuits, suggesting techniques such as clock gating and operand isolation to
minimize unnecessary power usage. However, these techniques add design complexity and
throughput. Hennessy and Patterson (2020) discussed that traditional sequential ALU
6
operations lead to execution bottlenecks, particularly in high-performance computing. Their
research shows that parallel ALU architectures, such as SIMD (Single Instruction, Multiple
Data) and VLIW (Very Long Instruction Word), can significantly improve efficiency, albeit
Floating-point ALUs are widely used in scientific and financial applications; however, they
are prone to precision errors. Goldberg (1991) provided an in-depth analysis of floating-point
arithmetic, highlighting common issues such as round-off errors and overflow conditions.
The study suggests that implementing error detection and correction techniques, such as
IEEE 754 standard compliance, can improve accuracy but may introduce additional
computational overhead.
Conclusion
The reviewed literature indicates that while ALUs play a crucial role in computing, their
methodologies, and parallel processing, have been proposed to mitigate these issues. Future
research should focus on balancing efficiency and complexity to enhance ALU performance
7
CHAPTER - 5
5.1 PROPOSED
SYSTEM GENERAL
CIRCUIT DIAGRAM
To resolve the problems faced in day to day life , we arrive with our solution in which we fix
a buzzer alarm in the inverter to have a check on amount of distilled water present by fixing
LED's in order to assist the people . The RED , YELLOW and GREEN coloured led are
placed in the inverter to detect the distilled water level .Our solution is improvised from the
existing one in which we have to check the water level by looking at the vent cap at a
frequent manner. This is not feasible if we forget to check the water level at vent cap. In
additional we are using software technology to intimate the user by sending a notification by
means of message to their mobile phones and to switch off the buzzer which is placed in the
8
inverter to give a alarm sound.
PROBLEM DEFINITION
The proposed system is an Arithmetic Logic Unit (ALU) with a digital display interface. It
consists of various components that facilitate user input, arithmetic/logic processing, and visual
output on a seven-segment display. The system follows a structured data flow, beginning with user
inputs through switches and culminating in the display of processed results.
1. System Components and Functionality
1. User Input (Switches)
o 8-bit Input Switches: Two sets of 8-bit switches allow the user to input two binary
numbers (A and B).
o 3-bit Control Switches: These select the operation performed by the ALU (e.g.,
addition, subtraction, AND, OR).
2. Registers
o Two D flip-flop registers store the 8-bit inputs, ensuring stability before
computation.
o An Enable (EN) signal controls whether new data is latched into the registers.
3. Arithmetic Logic Unit (ALU)
o Performs arithmetic and logic operations based on the control signals.
o Takes two 8-bit operands (A and B) and produces an 8-bit result.
4. Binary to BCD Converter (Bin2BCD)
o Converts the binary ALU output into Binary-Coded Decimal (BCD) format for
display compatibility.
5. Seven-Segment Controller
o Processes the BCD output and drives a four-digit seven-segment display to
present the result in a human-readable form.
2. System Operation
1. The user sets binary inputs using the 8-bit switches.
2. The control switches determine the ALU operation.
3. A clock signal triggers the registers to store inputs.
4. The ALU processes the inputs based on the control selection.
5. The output is converted from binary to BCD.
6. The seven-segment display presents the computed result.
3. Advantages
● User-Friendly Interface: Simple switch inputs and a visual display make the system easy
to use.
● Versatile Computation: Can handle multiple arithmetic and logic functions.
● Efficient Data Handling: Registers ensure stable input storage before processing.
● Digital Readout: The seven-segment display provides a clear numerical output.
Opcodes
9
10
Explanation of Each Operation
o Produces 1 where bits differ and 0 where bits are the same.
11
o Produces 1 only if both bits are 1.
● Data manipulation in processors (Bitwise operations for masking and setting specific
bits).
12
The notification module handles the task of sending alerts or notifications to the users or
algorithm to trigger notifications based on predefined conditions, such as low water levels.
CHAPTER - 6
FINAL OUTPUT
7.1 Code for ALU in Verilog is as illustrated as follows in the given below diagrams
CHAPTER 8
Applications
7. Future Enhancements
The current ALU design can be further improved in the following ways:
● Floating-Point Arithmetic Support – Extending the ALU to handle floating-point
operations for enhanced computational capability.
● Pipeline Architecture – Implementing a pipelined ALU to improve throughput and
efficiency.
● Low-Power Design Optimization – Reducing power consumption for battery-
operated embedded systems.
● Integration with RISC-V Architecture – Adapting the ALU for use in open-source
RISC-V-based processors.
8. Conclusion
The development of an ALU is an essential step in understanding digital system
design and microprocessor architecture. This project successfully demonstrated the
implementation of an ALU capable of performing multiple arithmetic and logical
operations using Verilog HDL. The FPGA-based validation confirmed the
functionality and efficiency of the design, providing a strong foundation for further
advancements in processor development and optimization.
9. References
1. Patterson, D. A., & Hennessy, J. L. (2021). Computer Organization and Design: The
Hardware/Software Interface. Morgan Kaufmann.
2. Brown, S., & Vranesic, Z. (2013). Fundamentals of Digital Logic with Verilog Design.
McGraw-Hill.
3. Wakerly, J. (2018). Digital Design: Principles and Practices. Pearson.
4. Mano, M. M., & Ciletti, M. D. (2017). Digital Design: With an Introduction to the
Verilog HDL. Pearson.