Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
6 views

Computer Architecture

Uploaded by

bezalelolushakin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Computer Architecture

Uploaded by

bezalelolushakin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Computer Architecture

Monday, January 30, 2023


Lesson objectives:
• the Central Processing Unit (CPU)/microprocessor
• von Neumann architecture
• arithmetic and logic unit (ALU), control unit (CU) and registers
• control bus, address bus, data bus
• cores, cache and the internal clock
• Fetch–Decode–Execute cycle
• instruction set for a CPU
• embedded systems
The central processing unit (CPU)
The central processing unit (CPU) (also known as a microprocessor or
processor) is central to all modern computer systems. The CPU is often
installed as an integrated circuit on a single microchip. The CPU
has the responsibility for the execution or processing of all the instructions
and data in a computer application.
The CPU consists of:
» control unit (CU)
» arithmetic and logic unit (ALU)
» registers and buses.
Components of the
CPU
The main components of the CPU are the Control Unit (CU), Arithmetic &
Logic
Unit (ALU), Buses, Registers, and system clock.
Arithmetic and Logic Unit (ALU)
The ALU allows arithmetic (add, subtract etc) and logic (AND, OR, NOT etc)
operations to be carried out.
Control Unit (CU)
The control unit controls the operation of the computer’s ALU, memory
and input/output devices, telling them how to respond to the program
instructions it has just read and interpreted from the memory unit.
The control unit also provides the timing and control signals required by
other computer components.
Buses
Buses are the means by which data is transmitted from one part of a computer to another, connecting all
major internal components to the CPU and memory.
There are three common buses used in the von Neumann architecture known as:
-Address bus - Data bus -Control bus.
Address bus
The address bus carries addresses throughout the computer system between the CPU and memory, the
address bus is unidirectional (i.e. bits can travel in one direction only); this prevents addresses being carried
back to the CPU, which would be an undesirable feature.
The width of a bus is very important. The wider the bus, the more memory locations that can be directly
addressed at any given time.
Data bus
The data bus is bidirectional (allowing data to be sent in both directions along the bus). This means data can
be carried from CPU to memory (and vice versa) and to and from input/output devices. It is important to
point out that data can be an address, an instruction or a numerical value.

Control bus
The control bus is also bidirectional. It carries signals from the control unit (CU) to all the other computer
components. It is usually 8-bits wide. There is no real need for it to be any wider since it only carries control
signals.
Von Neumann Architecture
Early computers were fed data while the machines were actually running; it
wasn’t possible to store programs or data, which meant they couldn’t
operate without considerable human intervention.
In the mid-1940s, John von Neumann developed the concept of the ‘stored
program computer’, which has been the basis of computer architecture ever
since. The von Neumann architecture had the following main features (none
of which were available in computers prior to the mid-1940s):
» the concept of a central processing unit (CPU)
» the CPU was able to access the memory directly
» computer memories could store programs as well as data
» stored programs were made up of instructions which could be executed in
sequential order.
Von Neumann Architecture
Registers
Registers are high speed storage areas in the CPU.

All data must be stored in a register before it can be processed

Holds the address of the memory location of data that needs to


MAR Memory Address Register
be accessed

MDR Memory Data Register Holds data that is being transferred to or from memory

ACC Accumulator Where intermediate arithmetic and logic results are stored

PC Program Counter Contains the address of the next instruction to be executed

CIR Current Instruction Register Contains the current instruction during processing
Fetch Execute Cycle
Step Fetch execute cycle steps
The PC contains the address of the memory location
1
that has the next instruction which has to be fetched
This address is then copied from the PC to the MAR
2 via the address bus
The contents (instruction) at the memory location
3 (address) contained in MAR are then copied into the
MDR
The contents (instruction) in the MDR is then copied
4 and placed into the CIR
The value in the PC is then incremented by 1 so that
5 it now points to the next instruction which has to be
fetched
The instruction is finally decoded and then executed
6 by sending out signals (via control bus) to the
various components of the computer
7 Repeat
Fetch–Decode–Execute cycle
To carry out a set of instructions, the CPU first of all fetches some data and instructions from
memory and stores them in suitable registers. Both the address bus and data bus are used in
this process. Once this is done, each instruction needs to be decoded before finally being
executed. This is all known as the Fetch–Decode–Execute cycle.
Fetch
Both data and instruction can be stored in MDR. In the Fetch–Decode–Execute cycle, the next
instruction is fetched from the memory address currently stored in the MAR and the
instruction is stored in the MDR. The contents of the MDR are then copied to the Current
Instruction Register (CIR). The PC is then incremented (increased by 1) so that the next
instruction can be then be processed.
Decode
The instruction is then decoded so that it can be interpreted in the next part of
the cycle.
Execute
The CPU passes the decoded instruction as a set of control signals to the appropriate
components within the computer system. This allows each instruction to be carried out in its
logical sequence.
Factors that determine the performance of a CPU.
All these factors need to be taken into account when considering computer
performance.
Summarizing these points:
• Increasing bus width (data and address buses) increases the performance
and speed of a computer system
• increasing clock speed will potentially increase the speed of a computer
• A computer’s performance can be changed by altering bus width, clock
speed and use of multi-core CPUs
• Use of cache memories can also speed up a CPU’s performance.
System clock: The clock defines the clock cycle that synchronises all computer
operations. As mentioned earlier, the control bus transmits timing signals ensuring
everything is fully synchronised. By increasing clock speed, the processing speed of
the computer is also increased (a typical current value is 3.5GHz – which means 3.5
billion clock cycles a second).

Overclocking is a factor to consider. The clock speed can be changed by accessing


the BIOS (Basic Input/Output System) and altering the settings.
However, using a clock speed higher than the computer was designed for can lead
to problems, for example:

i Execution of instructions can lead to seriously unsynchronised operations (i.e. an


instruction is unable to complete in time before the next one is due to be executed)
– the computer would frequently crash and become unstable
ii It can lead overheating of the CPU again leading to unreliable performance.
Cache
• The use of cache memories can also improve CPU performance. Unlike
RAM, cache memory is located within the CPU itself, which means it has
much faster data access times than RAM. Cache memory stores
frequently used instructions and data that need to be accessed faster,
which improves CPU performance.
• When a CPU wishes to read memory, it will first check out the
cache and then move on to main memory/RAM if the required data
isn’t there.
• The larger the cache memory size the better the CPU performance.
Cores
The use of a different number of cores can improve computer performance.
One core is made up of an ALU, a control unit and the registers. Many
computers are dual core (the CPU is made up of two cores) or quad core (the
CPU is made up of four cores).
The idea of using more cores alleviates the need to continually increase clock
speeds. However, doubling the number of cores doesn’t necessarily double
the computer’s performance since we have to take into account the need for
the CPU to communicate with each core; this will reduce overall
performance.

For example, with a dual core the CPU communicates with both cores using
one channel to increase its performance and a Quad core will use six
channels to increase its performance.
Class Activities
• Explain how it is possible to increase the performance of a CPU/
microprocessor.
• In your explanation, include some of the risks associated
with your suggestions to improve performance.

You might also like