Beruflich Dokumente
Kultur Dokumente
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.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
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.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.
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.
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).
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.
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.
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