COA Assignment Part-2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

IIMS College

Putalisadak, Kathmandu, Nepal

Name of Course Instructor: Purnima Mulmi

Course Code: CC118N Course Name: Computer Organization and Architecture

Program Name: BIT Semester: 1st Batch: Jan 2020

Assignment I / II / III: Please Tick (√ ) Assignment Type (Individual/Group): Group

Assignment Title: Design a simple CPU

Max. Marks: ______ Date of Allotment: ___________ Date of Submission: 2020/02/29

(Write the individual/group members details below):

Name of the Student ID number Contact Number Email Id


Signature

Sajan Gc 9803060983 [email protected]

Ankit Subedi 9821547781 [email protected]

Prashant Bhatta 9800638455 [email protected]

Evaluation: ________________________ obtained out of _____________________________________

Evaluator’s Comment:

-------------------------------------------

Evaluator’s Signature & Date


Table of Contents

• Introduction
• Main execution core
• ALUs Adder, Subtractor, Multipliers, Dividers
• Main Memory Units
• Decoder
• Multiplexer
• Buses
• Registers, etc.
1. Conclusion
2. Reference

Introduction of CPU:

The central processing unit (CPU) is an electronic circuit within a computer that carries out
the instructions of a computer program by performing the basic logic, arithmetic, controlling, and input
and output operations specified by the instructions. Traditionally, the term "CPU" refers to a processor,
more specifically to its processing unit and control unit (CU), distinguishing these core elements of a
computer from external components such as main memory and circuitry.

The two typical components of a CPU include the following:


1. The arithmetic logic unit (ALU), which performs arithmetic and logic operations.
2. The control unit (CU), which extracts instructions from memory and decodes and executes them,
calling on the ALU when necessary.

The processor plays a significant role in the following important aspects of your computer system;
Performance:
The processor is probably the most important single determinant of system performance in the
Pc. The other devices only allow the processor to reach its full potential. While other components also
play key role in determining performance, the processor's capabilities dictate the maximum performance
of a system.
1. Software Support:
Newer, faster processors enable the use of the latest software. In addition, new processors such
as the Pentium with MMX Technology, enable the use of specialized software not usable on earlier
machines.
2. Reliability and Stability:
The quality of the processor is one factor that determines how reliably your system will run.
While most processors are very dependable, some are not. This also depends to some extent on the age
of the processor and how much energy it consumes.
3. Energy Consumption and Cooling:
Originally processors consumed relatively little power compared to other system devices. Newer
processors can consume a great deal of power. Power consumption has an impact on everything from
cooling method selection to overall system reliability.
4. Motherboard Support:
The processor that decides to use in your system will be a major determining factor in what sort
of chipset we must use, and hence what motherboard you buy. The motherboard in turn dictates many
facets of. The system's capabilities and performance.

COMPONENTS OF CPU

1. Main Execution Core:


It has one or more execution units, a control unit, and various other parts. On modern
CPUs, each core typically consists of more than one execution unit. Execution units perform the
actual operations such as branching, mathematical operations, memory operations, and so on.
A quad-core CPU has four cores. If it's hyper-threaded, then the execution units in
each core can be shared by two threads simultaneously. Execution units perform the actual
operations such as branching, mathematical operations, memory operations, and so on. Each core
has a control unit which distributions instructions to the various execution units in the core.

For example, a quad-core processor is a chip with four independent units called
cores that read and execute central processing unit instructions such as add, move data, and branch.
Within the chip, each core operates in conjunction with other circuits such as cache, memory
management, and input/output ports.

2. Integer ALUs:
The Integer Unit (sometimes called the "Arithmetic and Logic Unit" (ALU)) is the central
part of the processor: it is basically a combinational logic element can do both arithmetic and
logical operations on integer numbers: for example, two words can be added, subtracted, AND
together. The operation to be executed is controlled by the values on the control inputs to the
Integer Unit supplied by the Dispatch Unit.
The output of the Integer Unit is either written back to memory, or else it is written back
to the register where the data came from. The Integer Unit deals with either bytes or words (a
word is usually 2 or 4 bytes): in general it takes two eight bit numbers, and gives one eight bit
answer, or two words and gives another word as an answer.

3. Floating Points ALUs:


A floating-point unit (FPU) is a math coprocessor, which is a part of a computer system
specially designed to carry out operations on floating point numbers. Typical operations that are
handled by FPU are addition, subtraction, multiplication and division. The functions performed
are handling of Floating Point data, converting data to IEEE754 format, perform any one of the
following arithmetic operations like addition, subtraction, multiplication, division. All the above
algorithms have been evaluated under environment. All the functions are built by possible efficient
algorithms with several changes incorporated at our end as far as the scope permitted.
Consequently all of the unit functions are unique in certain aspects and given the right environment
these functions will tend to show comparable efficiency and speed and if pipelined then higher
throughput.

4. Integers Multipliers/Dividers:
Many digital systems including computers, require implementation of integer and/or
floating point multiplication and division. Further, many of these applications require that
multiplication and division for operands of significant size be executed at very high speeds.
Historically, the recursive algorithms for these two operations if implemented in a straightforward
manner as sequential circuits with maximum hardware reuse have very limited performance. Our
goals here are to present these recursive algorithms for integer multiplication and division,
introduce two fundamental techniques to improved performance, and to provide an
implementation of each algorithm that executes at high speed.

5. Main Memory Units:


Memory unit is the amount of data that can be stored in the storage unit. This storage
capacity is expressed in terms of Bytes.
The main memory in a computer is called Random Access Memory. It is also
known as RAM. This is the part of the computer that stores operating system software, software
applications and other information for the central processing unit (CPU) to have fast and direct
access when needed to perform tasks.

6. Input /Output Units:


An input-output processor (IOP) is a processor with direct memory access capability. In
this, the computer system is divided into a memory unit and number of processors. Each IOP
controls and manage the input-output tasks. The IOP is similar to CPU except that it handles only
the details of I/O processing.
The Input Output Processor (IOP) is just like a CPU that handles the details of I/O
operations. It is more equipped with facilities than those are available in typical DMA controller.
The IOP can fetch and execute its own instructions that are specifically designed to characterize
I/O transfers. In addition to the I/O – related tasks, it can perform other processing tasks like
arithmetic, logic, code translation. The main memory unit takes the pivotal role. It communicates
with processor by the means of DMA.

7. Buses:
When referring to a computer, the bus also known as the address bus, data bus, or
local bus, is a data connection between two or more devices connected to the computer. For
example, a bus enables a computer processor to communicate with the memory or a video card to
with the memory.

8. Registers:
Registers are a type of computer memory used to quickly accept, store, and transfer data
and instructions that are being used immediately by the CPU. ... A processor register may hold
an instruction, a storage address, or any data (such as bit sequence or individual characters).

General purpose Register:


- General purpose registers hold either data or an address. They are identified with the letter r
prefixed to the register number.

Instruction Register:
- The instruction register (IR) or current instruction register (CIR) is the part of a CPU's control
unit that holds the instruction currently being executed or decoded.

Memory Registers:
- The Memory Address Register (MAR) holds the address of a memory block in which read or
write. The Memory Data Register (MDR) holds data waiting to be written in or data read from
the location pointed by the MAR.

9. Accumulator:
In a computer's central processing unit (CPU), the accumulator is a register in which
intermediate arithmetic and logic results are stored.
10. Program Counter:
A program counter is a register in a computer processor that contains the address (location)
of the instruction being executed at the current time.

DESIGN OF THE CPU

Input

R1

R2

R3 PROGRAM
R4 COUNTER
R5

R6

MUX MUX

DECODER

RAM

ARITHMETIC LOGIC UNIT (ALU)

IR

DECODER

ACCUMULATOR
OUTPUT

Well, the idea of creating a CPU starts with by placing the 2 important parts of computer, The
Arithmetic Logic Unit and the Control Unit.

A control unit (CU) handles all processor control signals. It directs all input and output flow,
fetches the code for instructions and controlling how data moves around the system. And, the arithmetic
logic unit is that part of the CPU that handles all the calculations the CPU may need, e.g. Addition,
Subtraction, Comparisons. It performs Logical Operations, Bit Shifting Operations, and Arithmetic
Operation.

Then we have the Main Memory Units or so called Registers.

They are kept in order with following functions:

1. Accumulator: Stores the results of calculations made by ALU.

2. Program Counter (PC): Keeps track of the memory location of the next instructions to be dealt
with. The PC then passes this next address to Memory Address Register (MAR).

3. Memory Address Register (MAR): It stores the memory locations of instructions that need to
be fetched from memory or stored into memory. Memory Data Register (MDR): It stores
instructions fetched from memory or any data that is to be transferred to, and stored in,
memory.

1. Current Instruction Register (CIR): It stores the most recently fetched instructions while it is
waiting to be coded and executed.

2. Instruction Buffer Register (IBR): The instruction that is not to be executed immediately is placed
in the instruction buffer register IBR.

Now the required buses are connected in between the data registers, address registers and control
unit as:

1. Data Bus: It carries data among the memory unit, the I/O devices, and the processor.
2. Address Bus: It carries the address of data (not the actual data) between memory and processor.
3. Control Bus: It carries control commands from the CPU (and status signals from other devices) in
order to control and coordinate all the activities within the computer.

And finally there are the input and output devices which takes in and out the calculations and data
of the CPU.
References:

a. https://study.com/academy/lesson/arithmetic-logic-unit-alu-definition-design-function.html
b. https://www-users.cs.york.ac.uk/~mjf/simple_cpu_v2/index.html
c. Computer Architecture and Organization (Third Edition) by M .Moris Mano
d. http://vlabs.iitkgp.ernet.in/coa/exp8/index.html

You might also like