INTRODUCTION TO MICROPROCESSORS

The course involves Case studies of Microprocessors and support components, microcontrollers and design of microprocessor based systems. Microprocessor evolution is to be attributed to the advances in electronics that happened over the years right from the vacuum tubes to VLSI, thus making the powerful computer put on a single silicon chip. This course requires background of Computer Organization and analog and digital electronics concepts and design.

Computer Organization deals with the advances in computer architecture right from the Von Neumann machines to the current day super scalar architectures. 

Von Neumann Architecture

The earliest electronic machines capable of performing computations were laboriously programmed by changing the contents of a control store, in a manner analogous to changing the loom control cards in the Babbage design.  The program was entirely separate from the data. A significant advance came with the removal of this separation, so that the program was kept in the same store as the data, and one program could be used to manipulate another. This stored-program concept is attributed to the designers of ENIAC, a vacuum tube based machine built for the US Army between 1943 and 1946.  The concept was first expounded by von Neumann (1945), and incorporated into the IAS computer (at the Princeton Institute for Advanced Studies) which was completed in 1952.  All general-purpose computers are now based on the key concepts of the von Neumann architecture (figure 1):

  1. A single read-write memory contains all data and instructions.
  2. The memory is addressable by location in a way which does not depend on the contents of the location.
  3. Execution proceeds using instructions from consecutive locations unless an instruction modified this sequentiality explicitly.

Figure 1 : The Von-Neumann architecture

Though the von Neumann model is universal in general-purpose computing, it suffers from one obvious problem. All information (instructions and data) must flow back and forth between the processor and memory through a single channel, and this channel will have finite bandwidth.  When this bandwidth is fully used the processor can go no faster. This performance limiting factor is called the von Neumann bottleneck.

 

Hardvard Architecture

A Harvard Architecture (figure 2) has one memory for instructions and a second for data.  The name comes from the Harvard Mark 1, an electromechanical computer which pre-dates the stored-program concept of von Neumann, as does the architecture in this form.  It is still used for applications which run fixed programs, in areas such as digital signal processing, but not for general-purpose computing. The advantage is the increased bandwidth available due to having separate communication channels for instructions and data; the disadvantage is that the storage is allocated to code and data in a fixed ratio.

Figure 2: The Hardvard architecture

Architectures with separate ports for instructions and data are often referred to by the term `Harvard architecture', even though the ports connect to a common memory.  For instance each port may be supplied from its own local cache memory (figure 3).  The cache memories reduce the external bandwidth requirements sufficiently to allow them both to be connected to the same main memory,  giving the bandwidth advantage of a Harvard architecture along with most of the flexibility of the simple von Neumann architecture. (The flexibility may be somewhat reduced because of cache consistency problems with self-modifying code).  Note that this type of Harvard architecture is still a von Neumann machine.

Figure 3: A modified Harvard architecture

Although the Harvard architecture (modified or not) offers double the bandwidth of the simple von Neumann architecture, this will only allow double performance when the instruction and data traffic are equal.  The VAX-11/780 has been used for a lot of measurements of memory traffic, and these measurements tend to suggest a reasonable match.  RISC processors have two characteristics which make the match less good than the VAX.  Firstly, they usually have less dense code, which increases the instruction traffic.  Secondly, they are register to register rather than memory to memory architectures.  This causes compiler writers to be much more careful about register usage, which can in turn result in much less data traffic.  The use of register windows also eliminates considerable data traffic associated with procedure calls. A RISC CPU can typically require an instruction bandwidth six to ten times the data bandwidth (Patterson and Sequin, 1981), so that a Harvard architecture may allow only a ten percent speed-up (rather than the one hundred percent that would be suggested by the VAX statistics).  Even so, the dual ported Harvard architecture has become a popular choice with RISC designers. 

A Microprocessor essentially is a component wherein a central processing unit (CPU) of a computer is brought on to a single chip. So this course essentially is case studies of processors that were developed since 1970s and how to build a microcomputer using these processors and support components.

Microprocessor is nothing but entire CPU is provided on a single chip. To configure a microprocessor based computer, we have the support components in terms of memory, memory controllers, parallel/serial interfaces, DMA controllers, etc.

To clearly understand the difference between the terms Computer Organisation and Computer Architecture, one can say that the answer one gets for the question - What is provided in the machine?- corresponds to architecture. And the answer one gets to the question - How they are provided in the machine? - corresponds to organisation.

Five Generations of Electronic Computers purely based on the Hardware:

Eg : Counter and shift registers, PLA, PGA

Large Scale Integration (LSI) version - 5 to 10 microns technology Eg. - 8085

Very Large Scale Integration (VLSI) version - Less than 2 micron technology

Eg - Pentium II

Ultra Large Scale Integration (ULSI) version - less than 1 micron technology

Eg - Merced, Pentium IV

For Example, in IIT Bombay the second generation digital computer, MINSK-2 (Russian) was installed in 1968-69 and the third generation computer, EC 1030 machines was installed 1974-75.

EC 1030 is fully code compatible with IBM 360.

Generation Technology & Architecture Software & Applications Systems
First (1945-54) Vacuum tubes, Relay memories, CPU driven by PC and accumulator; fixed point Arithmetic Machine & Assembly language, Single user Basic I/O using programmed and Internet mode. ENIAC TIFRAC
IBM 701 Princeton IAS
Second (1955-64) Discrete Transistors, Core Memories, Floating point, Arithmetic I/O, processors, Multiplexed memory access HLL used with compilers, batch processing, Monitoring, Libraries IBM7099

CDC 1604

Third (1965-74) Integrated circuits, Microprogramming, Pipelining, Caching, Lookahead Processing Multiprogramming, Time sharing OS, Multi-user applications IBM 360/700
CDC 6000
TA-ASC PDP-8
Fourth (1975-84) LSI/VLSI and Semiconductor memory, Microprocessors technology, Multiprocessors, vector super-computing, multi computer Multiprocessor OS, languages, Compilers VAX 9800, Cray X-MP, IBM 3600, Pentium Processor based systems (PCs), UltraSPARC etc.
Fifth (1991-present) VLSI/VHSIC processors, scalable architecture Massively parallel processing, Grand challenge Applications Cray/MPP, TMC/CM-5, Intel paragon, Fujitsu VP500










 

MICROPROCESSOR CLASSIFICATIONS

We have two classes of Microprocessors.

As of now, we have only fixed instruction sets. 

Difference between Bit Slice Processors and Fixed Instruction Set Processors

                 BIT SLICE PROCESSORS						FIXED INSTRUCTION SET
Not ready made Processor & Support components Ready made fixed Instruction set Processor with support Components
Easily cascadable units CPU (4 bit, 8 bit, 12 bit, 16 bit, 32 bit, 64 bit)

Examples from Intel

  • 4 bit - 4004
  • 8 bit - 8085
  • 16 bit - 8086
  • 8/16 bit - 8088
  • 32 bit - Pentium
  • 16/32 bit - M68000
  • 64 bit - Merced, Itanium

CPUs are not cascadable in the sense of increasing the word length but you can have multiprocessor configurations.

Microprogrammable systems Both Hardware and Microprogrammed
Can be design optimised to meet the specific design requirements on-hand Choose suitable processor for a given application
Can be designed only by the engineers from EE & CSE disciplines That much of depth in electronics and computer science is not required to design microprocessor based systems.
Design complexity heavy (CPU is to be designed and computer system is to be designed). All the components mentioned in the other column also required here and in addition CPU need to be designed. Design a computer system using the fixed instruction set CPU and support components. Need to know only interfacing techniques.

Need support components:

  1. Memory
    • ROM
    • PROM
    • EPROM, EEROM, FLASH ROM, NVRAM
    • RAM
  2. Peripheral Controller
    • General Purpose (Device Independent)
      • 8251-Programmable Peripheral Serial Interface
      • 8255-Programmable Peripheral Parallel Interface
    • Specific purpose (Device dependent)
      • 8207 DRAM controller
      • 8272 Floppy disk controller
      • 8275 CRT Controller
      • 8237 DMA controller
  3. Peripherals
  4. Software
    • Assemblers
    • Compilers
    • Operating system
    • Utilities
Example : AMD 2901, RALU (4 bit slice) Manufacturer: Intel, Motorola, Rockwell, Fairchild, Zilog, etc...

SUN, HP, IBM... (Proprietary)

Microprocessors can be either Hardware or Microprogrammed or both. Strictly speaking RISC processor is a hardwired one and a CISC processor is mostly a microprogrammed one but current day so called RISC processor is both hardwired and microprogrammed. The main advantage that microprogramme has over hardwired is that it offers flexibility. You can introduce new instructions with or without minor changes in hardware. The main disadvantage microprogramme has over hardware is that they are slower than hardwired version. Microprogramme use the ROM/RAM and hence additional access time makes them slower than hardwired versions. Because of the flexibility it offers, microprogramming is also used today in superscalar processors apart from hardware control.

Another class of silicon based system is a single chip microcontroller/single chip microcomputer/ embedded controller. This is a full-fledged computer system on a chip with CPU ROM/RAM, peripheral interfaces, A/D, D/A converters, timers, etc. The resources provided on a single chip would be very much limited. For example, the programmed memory (ROM/EPROM/ Flash ROM) could be of 4K bytes typically and the RAM would be of 256 Bytes. Provision is also made in this single chip microcontrollers to operate in the expanded mode wherein external memory could be connected. Even though this expanded mode is provided it is preferable to use this chip in a single chip mode to get the advantage of high reliability of this single chip microcomputer system. Example of Single chip microcontrollers is - 8048. The following table briefly summarizes the characteristics of the available microcontrollers in Intel and Motorola family. The major difference between the Intel and Motorola Microcontrollers is that Motorola microcontrollers are code compatible with their microprocessors counterparts whereas this is not the case with the Intel microcontroller family.

Table : Capabilities of Representative 8-bit Microcontroller from Two Families

Chip RAM ROM/EPROM

EAROM/EEPROM

Clock

microsecond

I/O Ports A/D Timers
MC 6801/6803 128 2048 (ROM) 1 MHz 3x8+5 -- 1
MC 68701 128 2048 (EPROM) 4MHz 3x8+5 -- 1
MC 6804 30 808 (ROM)* 11 MHz 1x8+4 -- 1
MC 6805 156 4164 (ROM)** 4 MHz 2x8+4 -- 1
MC 68704 24 352 (ROM) 11 MHz 2x8+4 -- 1
MC 68705 156 4164 (EPROM) 4 MHz 4x8 1x6 -- --
MC68HC11A0 256 -- 0.476 4x8 1x6 4/8 9
M68HC11A1 256 512 EEPROM 0.476 4x8 1x6 4/8 9
M68HC11A2 256 2048 EEPROM 0.476 4x8 1x6 4/8 9
M68HC11A8 256 8K ROM, 512 EEPROM 0.476 4x8 1x6 4/8 9
M68HC11E0 512 -- 0.476 4x8 1x6 8 9
M68HC11E1 512 512 EEPROM 0.476 4x8 1x6 8 9
M68HC11E2 256 2048 (EE) 0.476 4x8 1x6 4/8 9
M68HC11E9 512 12K (ROM),512 (EE) 0.476 4x8 1x6 8 9
M68HC11D3 192 4096 (ROM) 0.476 4x8 1x6 8 9
M68HC11F1 1024 512 (EEPROM) 0.476 4x8 1x6 8 9
Intel 8021 64 1024 (ROM) 2.5 2x8 1x4 - 2
Intel 8022 64 2048 (ROM) 2.5 3x8 - 2
Intel 8035 64 -- 2.5 3x8 - 2
Intel 8039 128 -- 1.4 3x8 - 2
Intel 8041 64 1024 (ROM) 2.5 3x8 - 2
Intel 8048 64 1024 (ROM) 2.5 3x8 - 2
Intel 8049 64 2048 (ROM) 1.4 3x8 - 2
Intel 8748 64 1024 (ROM) 2.5 3x8 - 2
Intel 8031 128 -- 1 4x8 - 2
Intel 8051 128 4096 (ROM) 1 4x8 - 2
Intel 8751 128 4096 (EPROM) 1 4x8 - 2

 

Types of Memory Devices

RAM - Random Access Memory: The name is given by the manufacturer but actually it should be Read/Write Memory (RWM). It is volatile. The types of RAM that are available are-bipolar RAM, static MOS RAM, Dynamic MOS RAM, Pseudo Static MOS RAMs, EDO RAMs, Synchronous DRAMs, and Rhombus DRAMS, QDRAMs, etc. In future, FRAMs (Ferro Electrical RAMs) may be made available.

In present day PCs, Synchronous DRAMs (SDRAMs) are used. Earlier the SDRAM stood for pseudo DRAM which implied that DRAM refresh circuitry was on chip itself. Rhombus DRAMs or RDRAMs were designed by a party where one of the members happened to the student of IIT Bombay and it was informed that the technology was transferred to Intel.

ROM - Read only Memory -also called One Time Programmable (OTP). Once programmed, it is permanent and not reversible. The components that are used in ROMs are presence or absence of Diodes/Transistors. The ROMs are developed by the manufacturers and are not programmed by the user. For heavy volume production, ROMs turn out to be very cheap compared to the other non-volatile memories such as EPROMs, EEROMs, Flash ROMs.

PROM : This is similar to ROM with a difference that this can be one time programmable by the user and not by the manufacturer so it will be very useful for prototyping purposes.Examples are 27PC32 (4k x 8), 27PC64 (8k x 8), 27PC128 (16k x 8), 27PC256 (32k x 8), 27PC512 (64k x 8), 27PC010 (128k x 8), etc.

EPROM : Once it is programmed, you have to take precautions not to expose it even to sunlight and the contents will stay for approx. 10 years and in this sense it can be classified as non-volatile memory. Whenever you want to rewrite, EPROM has to be taken out of the circuit board, expose it to ultraviolet light for a period of approx. 5 to 10 mins. and this process erases the entire information on the chip and you have to programme the entire information on a separate programmer. After this is done the EPROM can be plugged on the circuit board. Examples of EPROM are 2708 (1k x 8), 2716 (2k x 8), 2732 (4k x 8), 2764 (8k x 8), 27128 (16k x 8), etc.

EEPROM: This is different from the EPROM in the sense that EEPROM can be programmed in-circuit. In EEPROM you can erase a bit and write that bit and this can be done on the board itself. Each location can be written only 10,000 times. In this sense, it is not perfectly non-volatile like EPROM. Programming of EEPROM takes more time than reading so it can not substitute RWM (RAM). Examples are 2816A (2k x 8), 2817A (2k x 8), 28C84 (8k x 8).

Flash ROM : In Flash ROM is similar to EEPROM but fixed block sizes typically 128-512 k bits (16 MB) can be erased at a time. This is widely used non-volatile memory nowadays. instead of each bit, we can erase a block and re-write. Examples are 28F256 (32k x 8), 28F512 (64k x 8), 28F400 (256k x 16 or 512k x 8), 28F008 (1 M x 8), 28F016 (1M x 16) or (2M x 8), 28F032 (2M x 16 or 4M x 8).

Memory Uses

Contents Stand-alone Systems Computer/Development Systems
Variable, Stack RAM RAM
Program, Constants Masked ROM
PROM
EPROM/OTP
EEPROM
Flash EEPROM
RAM
NVRAM
Nonvolatile Parameters NVRAM
EEPROM
Flash EEPROM
RAM
NVRAM
Computer BIOS, Debug Monitor   Masked ROM
PROM
EPROM/OTP
EEPROM
Flash EEPROM

ROM Types and Characteristics :

Type Description Programming Method Erase Method
ROM Mask ROM Manufacturer, one time None
PROM Programmable ROM Device Programmer, on time Device Programmer None
EPROM Erasable PROM Device Programmer UV light source
OTP One Time Programmable Device Programmer, one time None
EEPROM Electrically Erasable EPROM Device Programmer, in circuit Byte-wide erase
Flash EEPROM Electrically Erasable EPROM Device Programmer, in circuit Device or block erase

Next