Click here to load reader

Introduction to Microprocessor Systems ECE511: Microprocessor & Digital System

  • View

  • Download

Embed Size (px)

Text of Introduction to Microprocessor Systems ECE511: Microprocessor & Digital System

  • Introduction to Microprocessor SystemsECE511: Microprocessor & Digital System

  • What we are going to learn in this session:What is a microprocessor system. History of microprocessors.Components inside the microprocessor system:Component description.Function.Arrangement.The CPU execution cycle.What is it.How the cycle works.

  • IntroductionP is a complex, powerful device:Able to process huge amounts of data.Built using transistors on silicon die.Needs external components to support operation.Used in wide variety of applications.Take advantage of processing power.Microcomputer system support P operations.

  • History of Computers

  • History of ComputersHas undergone significant improvements:4 generations until now.Tied to development of electronics, semiconductors.Whats next?Conventional computing:Advancements in semiconductor technology.Smaller, faster, less power.Unconventional computing:Quantum computer.Chemical computer.Molecular computer.

  • History of ComputersVacuum TubeTransistorICBetter IC technologyG1G2G3G4

  • History of ComputersFirst Generation (1954-56): Vacuum Tubes as switches.Magnetic drums as memory.Very big, unreliable, slow.ENIAC (Electronic Numerical Integrator And Computer ), UNIVAC (UNIVersal Automatic Computer ).

  • First Generation ComputersElectronic Numerical Integrator and Computer (ENIAC)Vacuum Tubes

  • History of ComputersSecond Generation (1956-63):After invention of transistors.Smaller, faster, cheaper.Limited to military and business use.

  • Second Generation ComputersTransistor circuitVacuum tube circuit

  • History of MicroprocessorsThird Generation (1964-71):After invention of Integrated Circuits (IC).Many transistors can be packed into IC.Intel 8008, Intel 4004.Medium Scale Integration (MSI) and Large Scale Integration (LSI).

  • Early Intel Microprocessors

  • Third Generation ComputersLaptopPC

  • History of ComputersFourth Generation (1971-now):Improvements in IC technology, P design.More transistors more processing power.Very Large Scale Integration (VLSI).Intel Montecito Itanium: 1 bln. transistors.Reduced Instruction Set Computers (RISC).64-Bit microprocessors.

  • Fourth Generation Computers

  • ComparisonComputerSpeedMemoryCostUNIVAC (1st Gen.)Pentium III (4th Gen.)DEC PDP-8 (3nd Gen.)1.3 kHz1 MHz500 MHz1MB6 kB128 MB$1.6 million$20,000$700$47,9001.4kBIBM 1401 (2nd Gen.)2.2 kHz

  • Microprocessor Systems

  • Microprocessor SystemsComplete system built around microprocessor.CPU.Memory.I/O: disk drives, keyboard, mouse.System Bus.Supporting circuitry.CPU as the brain controls actions of all components.

  • Microprocessor System - PCROMKeyboardMouseHDDFloppyRAMCD-ROMSupporting CircuitryCPU

  • Microprocessor System - CalculatorKeypadMemoryPower SupplyLCD DisplayCPU

  • Computer Interface

  • Computer InterfaceA P-based system consists of many components:CPU.Memory.I/O: disk drives, keyboard, mouse.System Bus.Supporting circuitry.All components communicate using System Bus.

  • Block DiagramParallel I/OSerial I/OInterrupt CircuitTimingCPUMemorySystem Bus

  • The CPUMaster of all components.Job:Get instructions from memory.Execute instructions.Perform calculations (Co-processor). Control bus operations. CPU

  • The CPUCPU consists of:ALU (Arithmetic/Logic Unit): Performs arithmetic/ logic computations.CU (Control Unit): Responsible to retrieve instructions, analyze, then execute.Registers: Fast internal storageUsed to temporarily store addresses, data, processor status.

  • System BusCommunication highway for all components.Contains:Data lines.Address lines.Control lines: regulate information transfer, interrupts, error signals.

  • MemoryStores instructions and data for CPU.Each memory location given unique address.CPU refers to address to access.Types: Read-Only Memory (ROM).Random-Access Memory (RAM).Non-Volatile Memory (NVM). Memory

  • RAM, ROM and NVMMemoryNVMRAMROMStores start-up instructions and critical system data and variables.Stores general data and applications

  • ROMRead-Only Memory:Data can be read, but cannot be written (read-only).Contents stay without power (non-volatile).Usually contains basic start-up instructions, data.Contents hard-wired during manufacturing.Newer versions can be reprogrammed:PROM: Fuse & anti-fuse.EPROM: UV light.EEPROM: Electrical current.

  • ROM ExamplesQuartz WindowEEPROM ProgrammerEPROM

  • NVMNon-Volatile MemoryContents can be read and written.Contents stay without power (non-volatile).Advantages:Keeps memory even with no power.Data is protected against blackouts.Rewriteable.Disadvantages:Slower than RAM.

  • RAMRandom Access Memory.Contents can be read and written.Loses data without electrical power (volatile).Advantages:Programs can be loaded and reloaded.Larger capacity.Disadvantages:Requires power, refresh cycles.

  • RAM vs. ROMComputer is turned onCPU looks for instructions from memoryRAM is still empty because the computer has just been started.CPU loads instructions from ROM.

  • RAM vs. ROMROM only has basic functions to start the computer.RAM loads more advanced functions, suchas the OS.

  • Timing CircuitSynchronizes all components in the system.All components refer to the clock timing for operations. Generates square waves at constant intervals.Crystal oscillator + timing circuitry. Higher clock speed allow computers to function faster.Timing

  • Crystal OscillatorSymbolEquivalent CircuitSample

  • Clock Signal

  • Clock Signal vs. Processing SpeedInstruction CLR.W D7 takes 4 cycles to complete.timeSlow clock speedFast clock speed

  • I/OInput/Output.Connects P with external devices:Add functionality to P.Interfaces with P using ports.Examples:Keyboard.Mouse.Display monitor.

  • How do ports connect to system bus?Built into boardUsing card slots.

  • Serial I/OSends/receives data sequentially across 2 channels.One for receive, one for transmit.Connects using serial ports.Advantages:Less crosstalk.Disadvantages:Slow.Needs special circuit to convert back to parallel (UART Universal Asynchronous Receiver/Transmitter).

    Serial I/O

  • Serial Port

  • Parallel I/OSends/receives data across multiple lines at one time.Connects using parallel ports.Advantages:Faster than serial.Simpler circuits doesnt need UART.Disadvantages:Crosstalk.Parallel I/O

  • Parallel Port

  • Parallel vs. Serial I/OSerial PortParallel PortReceiveTransmit..Receive/TransmitReceive/TransmitReceive/Transmit

  • UARTUART10011001UART10011001To System BusFrom DeviceFrom System BusTo Device

  • Interrupt CircuitAllows other components to interrupt normal CPU operation:Prioritize CPU tasks.Error detection mechanism.Accept inputs from devices keystroke, mouse press.Depends on task importance:Important tasks given higher interrupts.Less important tasks queued.CPU keeps track of current interrupt level.

    Interrupt Circuit

  • How Interrupts Work

  • Watchdog MonitorWatchdog monitor:Special circuit - monitors the system for errors.Informs the CPU.CPU takes appropriate actions reset system, halt processor.May work in two ways:Constantly monitor the system, and sends signal if error detected.Continuously sending signal to CPU after certain interval:If CPU receives signal, continues processing. If CPU doesnt receive signal, somethings wrong.

  • How Watchdogs WorkCPUWatchdogCPU is performing tasks normally.1. Watchdog monitors bus for errors.2. If error detected, inform CPU.3. CPU saves its current task so that it can return to it when error is resolved. 4. CPU fixes the error. 5. CPU reloads saved task, and resumes normally. 5. If error is too serious, CPU may reset/halt system.

  • CPU Execution Cycle

  • CPU Execution CycleCPU executes instructions in endless fetch, decode, execute cycles.It only knows how to do three things:Fetch instructions from somewhere.Analyze instruction, get more data if necessary.Execute instruction.Keeps track of instruction using Program Counter (PC):Tells CPU location of next instruction.

  • Fetch, Decode, Execute

  • Fetch Step 1Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1000ControlCPUMemoryInstruction RegisterData RegistersCPU gets instruction address from PC

  • Fetch Step 2Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1000ControlCPUMemoryInstruction RegisterData RegistersCPU outputs instruction address through Address Bus$1000Address Bus

  • Fetch Step 3Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1000ControlCPUMemoryInstruction RegisterData RegistersMemory gets the instruction and sends in to CPU using Data Bus.Instruction #1Data Bus

  • Fetch Step 4Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1000ControlCPUMemoryInstruction #1Instruction RegisterData RegistersCPU stores instruction in Instruction Register

  • Fetch Step 5Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Instruction RegisterData RegistersAfter instruction has been loaded, CPU updates Program Counter.

  • Decode Step 1Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Instruction RegisterData RegistersCPU analyzes instructions before executing it.Type of instruction.Does the instruction require any data to perform calculations?Where are the data located?

  • Execute Step 1Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Instruction RegisterData RegistersIf instruction requires data from memory, data address is placed on address bus.$1007Address Bus

  • Execute Step 2Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Instruction RegisterData RegistersMemory gets the instruction and sends in to CPU using Data Bus.Data #1Data Bus

  • Execute Step 3Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Data #1Instruction RegisterData RegistersCPU puts data inside internal data registers and execute instructions.

  • Execute Step 4Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyEmptyEmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Data #1Result #1Instruction RegisterData RegistersIf instruction wants to write data to memory, CPU puts its data and address on the bus.$1005Address BusResult #1Data Bus

  • Execute Step 5Program CounterInstruction #1$1001$1009$1008$1007$1006$1005$1004$1003$1002$1000Instruction #1Instruction #2Instruction #2EmptyResult #1EmptyData #1Data #2Data #3$1002ControlCPUMemoryInstruction #1Data #1Result #1Instruction RegisterData RegistersMemory receives instructions and puts data in the location.

  • Conclusion

  • ConclusionP is a complex, powerful device:Able to process huge amounts of data.P-based systems provide supporting circuitry to support P functions.Long history, advancements along with technology.Executes instructions from memory in endless loop.

  • The EndPlease read:

    Antonakos, pg. 2 10.Gilmore, pg. 1 5.