Sie sind auf Seite 1von 16

TOPIC 1

INTRODUCTION TO THE MICROPROCESSOR

INTRODUCTION
Microprocessor is one of the most important invention in our life today. It has major
significant impact to help us being more productive, build more sophisticated machines and
devices and much more in our moden life. The application of microprocessors range from
domestic appliances such as handphones, calculators, digital cameras, automatic washing
machines, microwave ovens to industrial machines such as automatic welding machines to
research and scientific equipment such as automatic testing instruments. All these devices
have one or more microprocessors as its major component to function.

OBJECTIVES
At the end of this topic, you should:
1. know the history of the microprocessor and of the different generations of
computers;
2. be able to define or explain the following terms: microprocessor, Arithmetis Logic Unit
(ALU), Control Unit (CU), Registers;
3. know how microprocessor works and it’s performance;
4. know the CISC and the RISC architecture and its differences; and
5. know the differences between a microprocessor and a microcontroller.

1.1 THE EVOLUTION OF THE MICROPROCESSOR


The microprocessor evolved from the inventions of the transistor in 1947 and the integrated
circuit (IC) in 1958. Before this, the earliest machine, ENIAC, the first generation of
computers, used vacuum tubes that required a large room to house them and consumed huge
amount of power. In 1960’s, computers filled entire rooms and only available to a few
government labs, research universities, and large corporations. With the invention of the
transistor, computer shrank in size and increase in power, which led to the second generation
of computers. This topic will address the history of microprocessor and the driving forces
behind this evolution particularly for the Intel family microprocessors. Table 1.1 summarizes
the timeline microprocessors.

1
1.1.1 The Birth of the Microprocessor
The third generation computers came about with the invention of the integrated circuit (IC).
As shown in Table 1, the first microprocessor was Intel 4004, introduced in 1971. The 4004
was not very powerful as it was meant as a calculator which contained 2,300 transistors. All it
could do was add and subtract 4 bits of data at one time. But it was quite impressive at that
time because everything was on one chip.
In 1972, Intel introduced the first 8-bit microprocessor, the Intel 8008. The 8008 consist of
3,500 transistors and operate at 200kHz, and was capable of 60,000 instructions per second. It
was designed for computer terminals. The introduction of Intel 4004 and 8008 demonstrated
that it was possible to put the entire central processing unit (CPU) in one chip, but it was until
the next generation of microprocessor that it was realized.

2
Figure 1.1: Intel 4004 Chip

1.1.2 The First Microcomputer


The first microprocessor to make it into a personal computer evolved from 8008, which, was
the Intel 8080 in 1974. It contained 6,000 transistors, operate at 2MHz and was rated at 6.4
millions of instruction per second (MIPS). Besides Intel, a few other companies had started
entering the global market shares such as Motorola, which introduced its first microprocessor,
the 6800, which consisted 4,000 transistors.
The 8086 is the first 16-bit microprocessor introduced in 1978. It was designed based on the
8080, but not directly compatible with 8080. The 8086 family consists of two types of the 16-
3
bit microprocessors – the 8086 and the 8088. In 1979, the 8088 microprocessor was
introduced, which then was used in the original IBM personal computer in 1981. It was the
same architecture as the 8086, only uses the 8-bit bus system instead of 16-bit bus system to
reduce the cost. This event marked a new era for personal computer-based business
computing. It consists of 29,000 transistors and with a 16-bit microprocessor with an external
8-bit bus system to simplify the system design. The IBM PC used a 4.77MHz clock 8-bit I/O
expansion bus for communication. Besides the Intel 8086, Zilog Z8000 and the Motorola
68000 are another typical examples of popular 16-bit microprocessors.

1.1.3 Microprocessor in the 1980’s


In 1982, Intel introduced the 80286 microprocessor with 134,000 transistors to incorporate a
memory management unit that enable the operating system to run several programs at once in
the memory (also known as multitasking). To employ the 16-bit bus system and to increase
the speed, the IBM PC AT increase the I/O expansion bus to 16 bits and 8MHz.
In 1985, the Intel 80386 microprocessor was introduced and became the first 32-bit processor
in the Intel architecture family. It was introduced to take advantage of the graphical user
interfaces (GUI’s) of the operating system. With 125,000 transistors, it allowed more
complex programs to multitask without intefering with each other. For the PC architecture to
keep up with the new Intel386 microprocessor, two new 32-bit I/O expansion bus standard
known as EISA and Micro Channel were created to support higher-speed peripherals for
communication and mass storage.
In 1989, the Intel486 was introduced with 1.2 million transistors which combined the
function of the Intel386 microprocessor with a math coprocessor, an enhanced bus interface
unit to read information out of memory faster, and a unified internal data/instruction cache.
To keep up with this microprocessor, PC architecture started to used a 32-bit local bus (in
addition to the I/O expansion bus) for high speed graphics, video, data storage and
communication. This new high-speed bus, known as the PCI (Peripheral Component
Interconnect) local bus, supports data-transfer speeds of up to 132 megabytes per second at
33MHz.

1.1.4 Microprocessor in the 1990’s


Since 1992, we had seen unprecedented design features and high-performance CPUs in the
market. In 1992, DEC produced the first Alpha microprocessor, the 21064 that clocked at
150MHz. IBM, Motorola and Apple formed an alliance to design the PowerPC processor
4
based on IBM’s Power architecture and became a serious threat to the Intel x86. But the
fastest single-chip processor in 1992 was the MIPS R4000 with 64-bit architecture and since
than, several variations R4000 were made making the MIPS architecture to become popular
in the embedded marketplace. The 64-bit architecture was useful particularly in applications
that rely heavily on graphics such as 3D games and multimedia presentation.

Sun, introduced its first 64-bit superscalar CPU, the SuperSPARC but to no success. Only in
1995, when Sun introduced the 167-MHz ULTRASPARC fabricated by T1, that Sun, started
to gain success.
Unlike MIPS and Sun, HP manufactured its own microprocessor for its workstation. They
were the 32-bit processors named PA-RISC 7100 and 7200. The 7200 were produced in
1994. The first 64-bit processor produced by HP was the 180-MHz PA-RISC 8000 in 1996
and surpassed the Alpha 21164 in integer performance for a while. And it seemed that every
new processor introduced, had outperformed its older rivals with the exception of the Alpha
21164 which was on the top for most of the decade. The threat of these traditional RISC
vendors is the gaining popularity of x86 and the intrusion of the Windows NT to the UNIX
market.

5
Over a decade after the introduction of mouse and Windows by Apple, Microsoft introduced
Windows 3.0 for the IBM PC. To avoid trademark with the numerical naming convention
(eg. 8086, 8088, 80386 and 80486), Intel called it Pentium. It was launched in 1993 with a
32-bit CPU architecture and 60-Mhz clock rate. It contained 3.1 million transistors and was
fast gaining its popularity due to its cost compared to the PowerPCbased Macintosh. In 1995,
Microsoft introduced Windows 95 OS and Windows NT for business and enterprise servers.
In 1996, Intel launched Pentium Pro and so far outperformed some of the RISC processor. To
cater the multimedia needs, Intel added 57 new pixel-processing instruction set and it called
the MMX. With the low cost system, Intel remains as the biggest threat and rival to the other
x86 application domain of workstation vendors. From there, Intel moves on to Pentium II in
1997, Pentium III in 1999 and Pentium 4 2000 and Pentium 4 “Prescott” in 2004. All of them
are actually improvements from the basic design of 8088. The Pentium 4 can execute any
piece of code that ran on the original 8088, but it does it about 5,000 times faster! Table 1.2
shows the summary of high-performance desktop processor up to year 2000.

1.1.5 Future Directions


The outstanding performance of microprocessors may slow down in the future due to the IC
technology limitations, computer architecture and market forces. New applications such as
the internet and the multimedia interfaces are expected to drive the microprocessor to new
directions. Java processors have already being publicized by Sun. The fifth generations may
also be a possible outcome as the whole artificial intelligence movement is stretching towards
where someday machines can think on their own. Is it good or bad when machine has its own
mind? Well, lets just think for a moment…

1.2 A MICROPROCESSOR
A microprocessor is an integrated circuit made on a tiny silicon chip that contains thousands
or millions of tiny on/off switches, known as transistors. The transistors are laid out along
microscopic lines made of superfine traces of aluminum that store or manipulate data. These
circuits manipulate data in certain patterns, patterns that can be programmed by software to
make machines do many useful tasks.
Although the internal workings of today’s microprocessors are way more complex than the
earlier microprocessor such as the 8-bit microprocessor, but the underlying architectures have
remained almost unchanged for 25 years. One of the biggest tasks microprocessors perform is
acting as the brains inside a personal computer and is responsible for the processing of the
6
instructions, which make up computer software. It can do arithmetic, compare numbers and
perform input/output (read information and display or store it). A microprocessor executes a
collection of machine instructions that tell the processor what to do. The microprocessor itself
is made up of a number of components such as the arithmetic logic unit (ALU) and the
control unit (CU). These two components, the ALU and CU comprise the central processing
unit (CPU).
The CPU is divided into two general parts: the Arithmetic Logic Unit (ALU) and the Control
Unit (CU). The ALU carries out arithmetic operations (e.g. addition and subtraction) and
logical operations (e.g. AND, or X-OR) while the CU controls the execution of instructions.
The CPU’s internal clock will synchronises each of the CPU and memory operations.
Figure 1.2 shows a simple, typical architecture of a microprocessor or CPU.

The CPU is attached to the rest of the computer via pins attached to the CPU socket in the
motherboard. These pins represent an external data bus, an address bus, and various voltage
and control pins that affect the CPU’s operations.

1.2.1 The Arithmetic Logic Unit (ALU)


The ALU is the heart of the microprocessor and performs arithmetic (addition, subtraction,
multiplication and division) and logical operations (compare, AND, OR). It composed of
7
logic circuits such as adder, subtracter, comparator etc. The data to be processed arrives at the
ALU, is processed, and the result appears at the output of the ALU where it is normally
stored in an accumulator. Modern microprocessors contain complete floating point processors
that can perform extremely sophisticated operations on large floating point numbers, thus
provides more precision.

Basically, the CPU will:


• Manage the fetching and decoding of program instructions one after the other.
• Cause the processing by the ALU of the arithmetic and logic operations required by
the instruction.
• Produce, with the help of program counter, the correct sequence of instructions to be
executed.
• Memorise the internal state of the machine in the form of flags set in the processor
status register.
• Send out command signals to control the operation of the other elements of the
system.

1.2.2 The Contol Unit (CU)


The Contol Unit coordinates and executes the instructions fethed from the external memory
and controls and directs to the other units. It must take instruction one after another; decode
the current instruction and issue commands (microinstructions) to the other units of the
system which involve in its execution. It must then fetch the next instruction and execute it.
For this purpose it has certain number of internal components such as the instruction register
(IR), the sequencer, the program counter (PC), the status registers which will be described in
details at the registers section below.

1.2.3 Address and Data Buses


The internal data bus is a series of parallel wires that transmit data between the various parts
of the CPU. When data must be read from external memory, the control unit calculates its
address and places the address on the address bus. The memory unit (another processor on the
motherboard) reads the address bus, places the requested data on the data bus, and signals to
the CPU that the data is ready. The CPU transfers the data from the external bus into its
internal storage areas.

8
One of the method of classifying a processor is to use the width of the data bus, in which case
an n-bit processor describes one operating with a data bus of n-bits. This means that the CPU
can transfer n-bits to another device in a single operation. Using this classification, the Intel
8088 microprocessor is an 8-bit processor since it uses an 8-bit data bus, although its CPU
registers are in fact 16-bit registers. Similarly the Motorola 68000 is classified as a 16-bit
processor, even though its CPU registers are 32-bit registers.

The data bus width is very important in a computer system, since it determines the amount of
information that can be transferred to or from the CPU, in a single operation. This means, for
example, that the Motorola 68000 would have to transfer two 16-bit items to the CPU to fill a
32-bit register, since the data bus width is 16-bits. As we shall see later, I/O devices and
memory operate at very slow speeds compared to the speed of the CPU. As a result, the CPU
is frequently delayed by these slower devices, waiting for information to be transferred along
the data bus. So, the more information we can transfer in a single operation, between an I/O
devices and the CPU, the less time the CPU waiting for information to process. This in turns
means that we should strive to have the data bus as wide as possible.

1.2.4 Registers
In addition to the ALU and CU, the processor has a small number (usually less than 100) of
storage locations to store information that is currently being processed. These locations are
called registers and depending on the processor, a register may typically store 8, 16, 32 or 64
bits. The register size of a particular processor allows us to classify the processor. Processors
with a register size of n-bits are called n-bit processors, therefore processors with 8-bit
registers are called 8-bit processors, similarly there are 16-bit, 32-bit and 64-bit processors.
An n-bit processor is said to have an n-bit word size so a 32-bit processor has a 32-bit word
size. The greater the number of bits the more powerful the processor is, since it will be able to
process a larger unit of information in a single operation. For example, a 32-bit processor will
be able to add two 32-bit numbers in a single operation whereas an 8-bit processor will only
be able to add two 8-bit numbers in a single operation. An n-bit processor will usually be
capable of transferring n-bits to or from memory in a single operation. This number of bits is
also referred to as the memory word size. So, while a byte refers to an 8-bit quantity, a word
can mean 8, 16, 32, 64 or some other number of bits. On some machines a word is taken to
mean a 16-bit quantity and the term long word is used to refer to a 32-bit quantity.

9
(A) The Instruction Register
The instruction that the control unit is to execute is loaded in advance into a special register.

(B) The Sequencer


To execute the instruction which has just been loaded into the instruction register, the CU
must issue a certain number of microinstructions to the other units of the system. These
microinstructions must clearly not be issued at random, nor to just any component, but must
be issued at precise times according to the instruction being executed. The timing of
microinstructions is determined by the system’s internal clock; a quartz clock which is
current microprocessors runs at between 2 GHz and 4.0 GHz. The clock controls the rate at
which activities are carried out by the CPU. It generate a stream of cycles or ticks and an
action can only be carried out on the occurrence of a clock tick. Intuitively, the faster the
clock, the quicker the central processor (the more cycles per second, the more actions that the
CPU can carry out).
The component which sends out the appropriate microinstructions for the decoded
instructions currently in the IR is the sequencer. As its name suggests, the sequencer sends a
stream of microinstructions towards the components used in the execution of the instruction.

(C) The Status Register


To do its work correctly, the sequencer has to know the state of certain components and have
available details concerning the operations which have already been executed (for example, it
might need to know for the addition being executed whether a previous addition had
generated a carry out). Such information can be obtained from another component called the
status register, which is able to remember certain information such as whether the previous
instruction generated a carry out, whether the result was negative, zero, etc.

(D) The Program Counter (PC)


When the sequencer has finished generating the microinstructions for the current instruction,
it must cause the next instruction to be brought into the instruction register. For this it needs
the program counter to load automatically at the start of the program’s execution, with the
memory address of the first instruction to be executed.
Following that, each time an instruction has been loaded into the instruction register and is
ready to be executed, the PC is incremented so that it acts as a pointer to the location

10
containing the next instruction to be executed. Figure 1.3 shows the functional unit in a CPU
with the internal registers.

1.2.5 Clock
Each of the individual operations that take place within the CPU must be synchronised by an
internal clock. The most basic unit of time for machine instructions is called the machine
cycle or clock cycle, and is measured in millions of cycles per second (MHz). The clock
inside most Pentium processors runs at 200 – 1200 MHz (million times per second).

1.3 MICROPROCESSOR PERFORMANCE


In order to understand the microprocessor performance, lets examine the term million of
instructions per second (MIPS), one of the simpler ways to measure performance. We, human
can add two number together in our head in about one second. Todays’s high speed
microprocessor can do this operation in 15th billionths of second. At this the rate of one
calculation per second, it would take us over two years the same number of operations that a
fast microprocessor can do in a second. The more instructions a microprocessor can execute
in a second, the more work is done. The more the work is done, the higher the performance.

11
A microprocessor’s operating frequency (expressed in million times per second or MHz) has
a significant effect on the microprocessor’s performance. The operating frequency refers to
the speed of a clock signal serving as a reference for all the microprocessor’s operation. The
clock signal is used extensively by the microprocessor and computer peripherals to determine
when data is ready to be transfered and how long to wait until calculations are finished.
Everything else being equal, one microprocessor operating at 1GHz is twice as fast as one
operating as 500MHz.

Another factor which determine the micrprocessor peformance is the ability to transfer data
during each clock cyle. Data capacity has grown from 8 bits to 64 bits, allowing more
information to be transferred during each operation. A 32-bit microprocessor can transfer
four times as much information as an 8-bit microprocessor can in the same amount of time.
The microprocessor’s internal architecture can also be made efficient by requiring fewer
clocks to finish an operation or calculate a result. Some microprocessors run even faster on
the inside than they do on the outside. This technique effectively reduces the number of clock
periods required per instruction because the microprocessor is running two or three times
faster internally to finish the instructions more quickly. The goal is always the same: to
execute more instructions in smaller amounts of time.

1.4 TYPES OF MICROPROCESSORS


Intel’s 32-bit architecture is commonly associated with CISC, or Complex Instruction Set
Computer architecture. Basically there are two types of microprocessors based on their
architecture: the CISC and RISC (Reduced Instruction Set Computer). CISC and RISC stand
for two different approaches in designing modern computer architecture. The difference
between the CISC and RISC can lay on many levels: code density, transistor count, memory
bottleneck, compiler, decode complexity etc.

1.4.1 CISC versus RISC


A CISC processor has most of the following properties:
• large instruction set
• instructions can perform very complex operations
• variable instruction formats: 16, 32 or 64 bits
• large number of addressing modes
• few registers
12
Typically CISC chips have a large amount of different and complex instructions. It believes
that hardware is always faster than software; therefore one should make a powerful
instruction set, which provides programmers with assembly instructions to do a lot with short
programs. In common CISC chips are relatively slow per instruction compared to RISC
chips, but use less instructions than RISC. Examples of CISC architecture are the Motorola
MC68000 family and the Intel family.
Characteristic for a RISC processor are:
• no microcode
• relatively few instructions
• simple addressing modes
• only load/store instructions access memory
• uniform instruction length
• more registers than CISC processors
• pipelined instruction execution
• large number of registers
• fast floating point performance

The essence of RISC architecture is that it allows the execution of more operations in parallel
and at a higher rate than possible with a CISC architecture employing similar implementation
complexity. It can not only improve parallelism by pipelining, but also make superscalar and
out of order execution possible. However, when choose a processor for embedded real-time
13
application, RISC generally don't have advantages over CISC, since most of real-time
systems require very fast interrupt handling and high code density. In an embedded system,
due to the size limitation of chips, it is unlikely to have large memory, so high code density is
important. Also, CISC chips such as Motorola's 68K family provide better software
availability for such system. Examples of RISC architecture are SPARC, MIPS, HP-PA,
Alpha, PowerPC. Back in the middle to late 80's, the battle over RISC and CISC is mainly
non-Intel versus Intel x86, and RISC seemed to have a clearly advantage, until the appearing
of 486, Pentium and now PII, PIII. Now Intel's machines still run the old instruction set, but
they adopt some RISC-like characteristics such as one clock execution, clean memory
models, deep pipelining, superscalar operations, lots of registers and even out-of-order
execution. They run faster and faster with a decent floating point performance. On the other
hand, some RISC machines added more instructions to their architectures for new data types.
So, it seems the RISC-CISC gap is narrowed.
So, the difference between RISC and CISC is no longer one of instruction sets, but of the
whole chip architecture and system. The designations RISC and CISC are no longer
meaningful in the original sense. What counts in a real world is always how fast a chip can
execute the instructions and how well it runs existing software.

1.4.2 Microprocessor vs. Microcontroller


A microprocessor is simply a unit that processes instructions. It is completely useless and
incapable of performing any meaningful task by itself. However, once the microprocessor is
put into a microprocessor system, it becomes a powerful tool. The microprocessor system has
extreme flexibility; you can put in an infinite amount of devices such as a serial port, parallel
port, display and many more. Figure 1.5 shows a microprocessor system with a processor on
the left hand side and all of the devices on the right.
It becomes apparent that a lot of wires (traces -- not physical wires) and delicate components
are needed to connect the various peripherals, and it is obvious that this would pose certain
problems. Expose to the environment could subject the devices to vibrations causing the
wires to flex. This would eventually cause a failure in one or more devices. In addition,
humidity can cause wires to corrode which has the same effect.

14
The solution to this problem is a micro-controller! A micro-controller houses the entire
microprocessor system on one chip. It is actually microprocessor with built-in features such
as RAM, ROM, timers, parallel I/O ports, Analog-to-Digital Converter etc. This protects all
of the devices, and has a great deal of commercial convenience. However, because of their
small instruction sets, microcontrollers can only be used in small systems.

15
SUMMARY
This topic starts with a journey through the evolution of microprocessor which evolves from
the invention of the first transistor. The 70’s marks the evolution of the computer era when
the first microprocessor was introduced by Intel known as the Intel 4004. Four years after the
introduction of the first microprocessor, the first microcomputer makes it’s first debut and
besides Intel, a few others companies had been successfully penetrates the global market such
as Motorola, Zilog and AMD. Then, you are introduce to how a microprocessor works, it’s
internal components and how it’s performance is rated. Besides that, you are introduced to
the most popular microprocessor architectures: the RISC and the CISC and its differences.
The last part in this topic covers the differences between a microprocessor and a
microcontroller.

16

Das könnte Ihnen auch gefallen