Microprocessors

From Initq
Jump to: navigation, search

Contents

CPU

Central Processing Unit is the brain of the computer. In reality the CPU is nothing more than a calculator. The only difference is the speed. Let's see how this box works.

First thing we need to figure out is how to talk to the box. If there is a little man sitting inside the box, how do we let that man know that we need some calculations done? This is where external data bus come into the picture.

Pin Number  	Description
1 	GND - Ground
2-8 	ADDR - Address Bus
9-16 	DATA - Address Data Bus
17 	NMI - Non-Maskable Interrupt
18 	INTR - Interrupt Request
19 	CLK - Clock
20 	GND - Ground
21 	RESET - Reset
22 	READY - Ready
23 	TEST - Test (Active Low)
24 	INTA - Interrupt Acknowledge (Active Low)
25 	ALE - Address Latch Enable
26 	DEN - Data Enable (Active Low)
27 	DT/R - Data Transmit / Receive
28 	IO/M - Status Line
29 	WR - Write (Active Low)
30 	HLDA - Hold A
31 	HOLD - Hold
30 	HLDA - Hold A
32 	RD - Read (Active Low)
33 	MN/MX - Minimum or Maximum Mode
34 	SSO - Status Line (Active Low)
35-38 	ADDRESS/STATUS - Address/Status Information
40 	Vcc - Positive Power Supply

External Data Bus

Inside the CPU There are registers. Registers are tables to hold information that needs to be worked upon. Some registers are AX, BX, CX and DX. The external data bus is where the CPU receives information that the CPU needs to add, subtract, multiply or divide and then send it back on the external data bus. This data bus is blue is the picture on the right.

Clock

Clock is similar to hitting the operation key on your calculator. For example if you want to add 2 + 3, then hitting the + sign will be an indication of a Clock cycle to go to the next instruction. On the CPU, there is one wire that is called the CLK wire which is the clock wire. When this CLK wire is charged it tells the CPU to go to the next instruction. Each time the CLK wire is charged it is called a clock cycle. The maximum number of clock cycles your CPU can handle is called the clock speed.

  • 1 Hertz (1 Hz) = 1 cycle per second
  • 1 MegaHertz (1 MHz) = 1 million cycles per second
  • 1 GigaHertz (1 GHz) = 1 billion cycles per second

The system crystal is the metronome for the CPU. The registers in the CPU are microscopic semi conductor circuits called TTL logic. Now once you have done your computation you will need to store your results. Or the CPU needs to read the instruction from somewhere fast enough to process them quickly. This is where memory comes into please.

Memory

Memory is where all the instructions that the CPU needs to process are located. There are two types of memory. RAM and ROM. Memory is no more than small capacitors that hold a charge.

Address Bus

Address bus is the connection between the CPU and the RAM. The Chip in controls the physical memory is called the Memory Controller Chip (MCC). Let's take an example of 20 wires running from the CPU to the MCC. By turning these 20 wires on and off the CPU can address 220 1,048,576 different ways of telling MCC which piece of information the CPU needs from memory. Since each pattern points to one line of code and since each line of RAM is one byte, if you know the number of wires in the address bus, you know the maximum amount of RAM that a particular CPU can handle. Since the 8088 has 20-wire address bus, the most RAM it can handle is 220 or 1,048,576 bytes. The 8088, therefor has an address space of 1,048,576 bytes.

  • 1 kilobyte = 210 = 1024
  • 1 megabyte = 220 = 1,048,576
  • 1 gigabyte = 230 = 1,073,741,824

Next question is, which pattern goes to which line of RAM. When the CPU turns off all the address bus wires, it wants the first line of RAM; when it turns on all of the wires, it wants the 1,048,576th line of RAM. Some external Data Bus wires and address bus wires overlap, this normal and is called multiplexing.

Memory Access

DataBus lines from MCC to Memory
Processors Address Bus Width (bits) Address Bus Width (bits)
8088, 8086 20 1 MB
80286, 80386SX 24 16 MB
80386DX, 80486DX, 80486SX, 80486DX2, 80486DX4, AMD 5x86, Cyrix 5x86, Pentium, Pentium OverDrive, Pentium with MMX, Pentium with MMX OverDrive, 6x86, K5, K6, 6x86MX 32 4 GB
Pentium Pro, Pentium II 36 68 GB

You can address 68 gig of memory if your MCC allows you. The limitation here will be your Memory Controller Chip and the actual memory slots on your motherboard.

Personal tools