04-10-2016, 09:18 AM
1457577221-project.docx (Size: 270.59 KB / Downloads: 8)
ABSTRACT
Digital design is an amazing and very broad field. The applications of digital design are present in our daily life, including computers, calculators, video cameras etc. The VHDL (VHSIC Hardware Description Language) has become an essential tool for designers in the world of digital design. This paper presents implementation of a 32-bit Arithmetic Logic Unit (ALU) using VHDL. Here the behavioral VHDL model of ALU is designed to perform 16 operations which includes both logical and arithmetic operations. The VHDL implementation and functionality test of the 32-bit ALU is done by using the Modelsim 5.4a tool.
What Is an ALU?
An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic operations. It represents the fundamental building block of the central processing unit (CPU) of a computer. Modern CPUs contain very powerful and complex ALUs. In addition to ALUs, modern CPUs contain a control unit (CU).
Most of the operations of a CPU are performed by one or more ALUs, which load data from input registers. A register is a small amount of storage available as part of a CPU. The control unit tells the ALU what operation to perform on that data and the ALU stores the result in an output register. The control unit moves the data between these registers, the ALU, and memory.
How an ALU Works
An ALU performs basic arithmetic and logic operations. Examples of arithmetic operations are addition, subtraction, multiplication, and division. Examples of logic operations are comparisons of values such as NOT, AND, and OR.
All information in a computer is stored and manipulated in the form of binary numbers, i.e. 0 and 1.Transistor switches are used to manipulate binary numbers since there are only two possible states of a switch: open or closed. An open transistor, through which there is no current, represents a 0. A closed transistor, through which there is a current, represents a 1.
Operations can be accomplished by connecting multiple transistors. One transistor can be used to control a second one in effect, turning the transistor switch on or off depending on the state of the second transistor. This is referred to as a gate because the arrangement can be used to allow or stop a current.
The simplest type of operation is a NOT gate. This uses only a single transistor. It uses a single input and produces a single output, which is always the opposite of the input. This figure shows the logic of the NOT gate.
What is Verilog?
(Ref. The Verilog FAQ, Author's experience)
Verilog HDL is a hardware description language used to design and document electronic systems. Verilog HDL allows designers to design at various levels of abstraction. It is the most widely used HDL with a user community of more than 50,000 active designers.
In my book "Real Chip Design and Verification Using Verilog and VHDL" I
demonstrate several real examples for synthesis and TBs, issues, including
language comparisons between the 2 HDLs. My conclusions are as follows:
1. Both HDLs will do synthesis and verification.
2. For synthesis, Verilog is easier to learn because it of it's loosely type
definition, and less of a need to call of the packages to handle std_logic,
conversions, and reduce operators.
3. Code is shorter in Verilog.
4. Verilog 2001 has a better module interface, more like VHDL. Also more
features.
5. Verilog can be tricky, and will compile almost everything without warning.
VHDL provides more checks. VErilog timing is different thjan VHDL, and users
need to be aware of that.
6. For synthesis, I prefer VHDL, but I could comfortably live in a Verilog
environment.
For synthesis, it is important to abide by the recommendations for
blocking/nonblocking (see http://www.sunburst-designcliffc/ for papers on
the subject)
7. Verilog simulates faster because the simulator need not provide a lot of
runtime checks. Also, in Verilog, "reg" are treated as vhdl variables, unlike
signals that require about 100 bytes of overhead/bit to handle time scheduling,
attributes, history, and delay types (e.g., inertial).
In verilog, only wires and ports are resolved.
FOr TB, VHDL is definitely richer in data structures, overloaded operators,
etc. That is why you see verification languages, and other languages like
SystemC and System Verilog.
By the way, if you are a true verilog guru, you definitely would not want to
switch to vhdl. I am a contributor to both VHDL and Verilog IEEE synthesis
interoperatbility groups, and it is interesting to hear the remarks about the
"other" hdl!
Conclusion: Since you are confortable with VHDL for synthesis and verification,
I would not switch. However, I would learn Verilog because many IPS, and new
US products come out in Verilog first.
INTRODUCTION
The Arithmetic Logic Unit (ALU) is a fundamental building block of the Central Processing Unit (CPU) of a computer. Even one of the simplest microprocessor contains one ALU for purposes such as maintaining timers. We can say that ALU is a core component of all central processing unit within in a computer and is an integral part of the execution unit. ALU is capable of calculating the results of a wide variety of basic arithmetical and logical computations. The ALU takes as input the data to be operated on (called operands) and a code from the control unit indicating which operation to perform. The output is the result of the computation.
ALU implemented will perform the following operations: • Arithmetic operations (addition, subtraction, increment , decrement , transfer) • Logic operations (AND, NOT, OR, NAND, NOR, EX-OR, EX-NOR)
ARITHEMATIC UNIT
When design ALU we will follow a modular design that consists of smaller,more managable blocks, some of which can be re-used.We will first design one bit ADDER,SUBTRACTER,OR,AND,NOT,XOR,LEFT SHIFT,RIGHT SHIFT UNIT. These bit silcens can then be put together to make 32 bit arithematic,32bit logic and 32 bit shift unit and then finally Arithematic Logic Shift Unit.
An arithematic logic unit does the following tas: Addition, Addition with carry,subtraction, Subtraction with borrow, Decrement, Increment and Transfer function