introduction to microprocessors manijeh keshtgary fall 2006 shiraz university of technology
TRANSCRIPT
What is CPU?
Control Unit & Instruction Decoder
Arithmetic/Logic Unit
Registers
The Central Processing Unit (or P)
Speed of CPU based on
• It’s Clock
• Format of an instruction
• Parallel nature of instruction execution
• Access time to its memory & I/O
Memory
• Two different types of information stored in memory– Instruction– Data
Example: Adding 2 numbers, addition operation is an instruction and the actual numbers are data
I/O
• Input Device : transfers outside information into computer
Ex: keyboard, mouse, scanner, camera….
• Output device: allows computers to inform their internal states & data to the outside world.
Ex: Monitor, speakers, printers……
Buses
• Think of them as roads that connect different parts of a computer
• 3 types of Buses– Address Bus– Data Bus– Control Bus
Address Bus
• Carry the CPU generated address out to memory & I/O devices
• It is unidirectional and only travel outward from CPU
• No. of address lines that a microprocessor has determines the size of the memory space that it can access
Memory size
No of Add. lines Size of memory space
8 28 = 256
16 216 = 65 536 = 64 K
20 220 = 1 048 576 = 1 M
24 224 = 16 777 216 = 16 M
32 232 = 4 294 967 296 = 4 G
Data Bus
• These are the data signals that travel out of and into the P (bi-directional).
• The number of wires in the data bus depends on the word size that the P operates with.
• An 8-bit P will have a data bus consisting of 8 wires and a 32-bit P will have a data bus with 32 wires.
Control Bus
• The control bus consists of wires, some of which carry signals from the CPU to external devices, while others carry signals from external devices to the CPU.
• The number of wires present in the control bus varies from one P to another.
• Examples of control bus signals are READ, WAIT.
Cache• Faster but smaller memory type.• Small so reduce the memory access latency• Ex: A library with a person behind the desk (LE) (he is
responsible to give you the book you want). • you will read the book it the library and return it.• Customer A ask for book A. LE gets the book from store
room, returns to counter and give it to him.customer A will return the book in few minutes. So LE goes to storeroom,….
• Customer B comes and ask for book A• LE goes to storeroom…….• Is there a way to improve the performance????
Cache
• Yes, we can give LE a backpack to store the last 10 books that customers return
• The backpack is a cache for this system!
• If the data is not is cache (cache miss), are we wasting time???
• We can have 2 level cache.
• Main memory is much larger than cache
Microprocessor, Microcomputer and microcontroller
P : CPU unit packaged in a single chip. Ex: Intel Pentium family
• Microcomputer : A computer that uses P as its CPU. Ex: PC
C created by packaging CPU, Memory and I/O parts and buses in a single VLSI chip.
Two classes of Computers• General Purpose Computer System (GPCS):
Example: Desktop and Laptop
In this type of computer many different software can be installed and run to do many different jobs. Example, MSWord software does the word-processing job
• Application Specific Computer (ASC) Also called Embedded System)
Example: Computer used in mobile telephone, video camera and many other intelligent electronic devices
In this type of computer a specific software runs all the time and does a single specific job. An ASC is very small in size (typically, just a small PCB and few ICs). C is the main IC in embedded system