|
Hardware components of the PC
The CPU
What happens inside a Microprocessor?
The block diagram above shows a simplified
version of the Pentium processor and the
blocks shown represent:
- Core - This is the heart of the Pentium, the
execution unit that carries out the
processing. The Pentium has two Arithmetic Logic Units
(ALU) that are fed by individual pipelines, allowing it to interpret
and carry out two instructions per clock cycle.
- Instruction and Pre-Fetch Unit - The
Instruction decoder is a set of logic
gates which take a binary number, which represents an instruction,
and sets up the the various areas of the processor to carry
out the instruction. The Pre-Fetch Unit is used to fetch the next list
of instructions to be carried out from the Code Cache. As the instructions
are stored on the processor chip they are executed very quickly.
If this were not so each instruction would have to be loaded individually
from memory and carried out before the next could be loaded,
a process carried out by some of the earlier processors.
- Integer ALU - This is the section that carries
out the required calculations on whole
numbers (integers).
- Registers -
These are small areas of memory that hold interim and final
results of the calculations.
- Floating Point
Unit - The ALU only works on integers, any non-integer
calculations take place here.
- Branch
Predictor - In a list of instructions there are usually conditional
branches. A branch is where the program will continue
with different instruction depending on the resultant value
of the instruction previous to the branch instruction. As the Pentium
brings in several instructions and holds them in Pre-fetch Unit
this may well include the branch and the instructions that follow
it. As it is not known at this time which set of instructions is going
to be executed, the Branch Predictor predicts which and loads
a set of instructions accordingly. If it has got it wrong then the
incorrect set of instructions are discarded and the correct set loaded.
It is hoped that the predictor will get it right more times than
it gets it wrong.
- Primary Cache1 -
this is called the level 1 cache, a lot of instructions
are loaded at a time, which are stored here The instructions
and data are separated into two individual caches.
- Bus Interface
- This brings the instructions and data into the processor and separates them for it to use.
It also recombines them and sends them out after processing has
been carried out.
The processor clock keeps all the different
parts of the processor in step. Each tick of the clock causes something to happen
within the blocks of the processor. If the clock is running at 200MHz
it means that there are 200,000,000 ticks. The speed of a processor
is generally given in millions of instructions per second (mips).
The Pentium
processor has 3.3 million transistors and runs at 100,000,000
mips. The processor keeps track of where it is by
using a Program Counter (PC), one of the registers. The program counter holds
the internal memory location of the next instruction to be executed. When an
instructions time comes for it to be executed it is loaded into the Instruction
Register (IR). At the same time as the instruction is being executed the program
counter is incremented to the next memory location. If the instruction is a
branch then the program counter is loaded with the value of the memory
location given as a result of the calculations of the branch e.g. if the branch
instruction said " jump location 3254" - 3254 would be placed in
the program counter and the next instruction pulled from there. The Arithmetic
Logic Unit (ALU) works in conjunction with the general registers as
temporary storage, sometimes one or two of these are commonly called
Accumulators. There is also a Status Register (SR), which uses each individual bit
to give the status of something, e.g a zero result, an overflow, a carry
etc. The control unit uses these to execute a
conditional instruction such as "If the result of the calculation is
zero then jump to memory location 6534".
[1] For more on Cache, click
here
|