1 / 37

MICROPROCESSOR PROGRAMMING AND INTERFACING

MICROPROCESSOR PROGRAMMING AND INTERFACING. Today's Lecture. Quick Overview what we already discuss. Intel Microprocessors basic Concepts Instruction Set of Microprocessor Pin Configuration of 8086/8088 up. Introduction:. What is a Microprocessor?.

tejana
Télécharger la présentation

MICROPROCESSOR PROGRAMMING AND INTERFACING

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MICROPROCESSOR PROGRAMMING AND INTERFACING 09/15/2013

  2. Today's Lecture • Quick Overview what we already discuss. • Intel Microprocessors basic Concepts • Instruction Set of Microprocessor • Pin Configuration of 8086/8088 up 09/15/2013

  3. Introduction: What is a Microprocessor? A microprocessor (abbreviated as µP or uP) is an electronic computers central processing unit (CPU) made from miniaturized transistors and other circuit elements on a single semiconductor integrated circuit (IC). It performs arithmetic, logic and control operations. It contains a control unit, an arithmetic & logic unit, registers and links to store data and connect to peripherals. 09/15/2013 What is a Microcontroller? Dedicated to performing one task. Integrates the memory and other features of a microprocessor.

  4. Intel ‘Family’ of Microprocessors • 4004 - 1971 • 8008 - 1972 • 8080 - 1974 • 8086/88 - 1978 • 80286 - 1982 • 80386 - 1985 • 80486 - 1989 • Intel® Pentium® processor Extreme – 2006 • Intel® Core™ Duo Processors - 2006 • Pentium - 1993 • P Pro - 1995 • P II - 1998 • P III - 1999 • P IV - 2000 • P M - 2003 • P 4 HT - 2004. • P D - 2005 09/15/2013

  5. Intel 4004 – 4Bit (1971) The World's First Single Chip Microprocessor (2,300 transistors ) invented by Intel engineers Federico Faggin, Ted Hoff, and Stan Mazor. 09/15/2013

  6. Intel 8008 – 8Bit (1972) 09/15/2013

  7. Intel 8080 – 16Bit (1978) 09/15/2013

  8. Intel Pentium Intel 8086 09/15/2013

  9. Applications: Uses: • Control – Where the processor is used to control/perform actions. • Data Processing – Data Manipulation and Calculations. Application Types: • Low-end – Simple control use. (Traffic Lights.) 09/15/2013 • High-end – • Complicated Controllers .(Robotics, Avionics etc.) • Data Processing. (CPU) Most applications we use are high-end and use microprocessors for both Control and Data Processing.

  10. Complexity Microelectronic Device Complexity: • SSI (Small Scale Integration) - Less than 10 gates • MSI (Medium Scale Integration) - Between 10 gates and 100 gates. • LSI (Large Scale Integration) - Between 100 and a 10000 gates 09/15/2013 • VLSI (Very Large Scale Integration) - Greater then 10000 gates Almost all current applications require VLSI.

  11. Computer Architecture • A modern meaning of the term computer architecturecovers • three aspects of computer design: – instruction set architecture, – computer organization and – computer hardware. • Instruction set architecture - ISA refers to the actual programmer • visible machine interface such as instruction set, registers, • memory organization and exception (i.e. interrupt) handling. 09/15/2013 One can think of a ISA as a hardware functionality of a given computer.

  12. Computer Organization and Hardware • A computer organization and computer hardware are two • components of theimplementation of a machine. • Computer organization includes the high-level aspects of • a design, such as the memory system, the bus structure, and • the design of the internal CPU (where arithmetic, logic, • branching and data transfers are implemented). • Computer hardware refers to the specifics of a machine, • included the detailed logic design and the packaging • technology of the machine. 09/15/2013

  13. Tasks of Computer Architects • Computer architects must design a computer to meet functional • requirements as well as price, power, and performance goals. • Often, they also have to determine what the functional require- • ments are, which can be a major task. • Once a set of functional requirements has been established, • the architect must try to optimize the design. Here are three • major application areas and their main requirements: – Desktop computers: focus on optimizing cost-performance as measured by a single user, with little regard for program size or power consumption, 09/15/2013 – Server computers – focus on availability, scalability, and throughput cost-performance, –Embedded computers – driven by price and often power issues, plus code size is important.

  14. Rapid Rate of Improvements • Today, less than one thousand dollars purchases a personal computer that has more performance, more main memory, and more disk storage than a computer bought in 1980 for one million dollars. • For many applications, the highest-performance microcom- • puters of today outperform thesupercomputers of less than • 10 years ago. 09/15/2013 • This rapid rate of improvement has come from two forces: – technology used to build computers and – innovations in computer design.

  15. Technology Trends • Integrated circuit logic technology– a growth in transistor • count on chip of about 55% per year. • Semiconductor RAM– density increases by 40% to 60% per • year, while cycle time has improved very slowly, decreasing • by about one-third in 10 years. Cost has decreased at rate • about the rate at which density increases. • Magnetic disc technology – disk density has been recently • improving more then 100% per year, while prior to 1990 • about 30% per year. 09/15/2013 • Network technology – Latency and bandwidth are important, • though recently bandwidth has been primary focus. Internet • infrastructure in the U.S. has been doubling in bandwidth • every year.

  16. Developments in Computer Design • During the first 25 years of electronic computers both forces, technology and innovations in computer design made major contributions. • Then, during the 1970’s, computer designers were largely • dependent upon integrated circuit technology, with roughly • 35% growth per year in processor performance. • In the last 20 year, the combination of innovations in computer • design and improvements in technology has led sustained • growth in performance at an annual rate of over 55%. 09/15/2013 In this period, the main source of innovations in computer design has come from RISC-stylepipelined processors.

  17. How CPUs get faster 09/15/2013 Scientific American Nov 04

  18. Growth in Microprocessor Performance 09/15/2013

  19. Approaches to Instruction Set Architecture • For many years the interaction between ISA and implementat- • ions was believed to be small, and implementation issues • were not a major focus in designing instruction set architecture. • In the 1980’s, it becomes clear that both the difficulty of • designing processors and performance inefficiency of • processors could be increased by instruction set architecture • complications. 09/15/2013 • Two main approaches of ISA: – RISC (Reduced Instruction Set Computer) architecture – CISC (Complex Instruction Set Computer) architecture.

  20. RISC Architecture RISC– Reduced Instruction Set Computer After 1985,most computers announced have been of RISC architecture. RISC designers focused on two critical performance techniques in computer design: – the exploitation of instruction-level parallelism, first through pipelining and later through multiple instruction issue, – the use of cache, first in simple forms and later using sophisticated organizations and optimizations. 09/15/2013 RISC architecture goals are ease of implementation (with emphasis on concepts such as advanced pipelining) and compatibility with highly optimized compilers.

  21. RISC ISA Characteristics • All operations on data apply to data in registers and typically • change the entire register; • The only operations that affect memory are load and store • operations that move data from memory to a register or to • memory from a register, respectively; • A small number of memory addressing modes; • The instruction formats are few in number with all instructions • typically being one size; 09/15/2013 • Large number of registers; These simple properties lead to dramatic simplifications in the implementation of advanced pipelining techniques, which is why RISC architecture instruction sets were designed this way.

  22. CISC Architecture CISC – Complex (and Powerful) Instruction Set Computer CISC goals, such as simple compilers and high code density, led to the powerful instructions, powerful addressing modes and efficient instruction encoding. VAX processor was a good example of CISC architecture. For example: accounting for all addressing modes and limiting to byte, word (16 bits) and long (32 bits), there are more than 30,000 versions of integer add in VAX. ( Virtual Address Extension) 09/15/2013 Question: What is today the main example of CISC architecture processor? Answer: Intel IA-32 processors (found in over 90% desktop computers).

  23. IA - 32 • 1978: The Intel 8086 is announced (16 bit architecture) • 1980: The 8087 floating point coprocessor is added • 1982: The 80286 increases address space to 24 bits, +instructions • 1985: The 80386 extends to 32 bits, new addressing modes • 1989-1995: The 80486, Pentium, Pentium Pro add a few instructions (mostly designed for higher performance) • 1997: 57 new “MMX” instructions are added, Pentium II (8-Regs) • 1999: The Pentium III added another 70 instructions (SSE) • 2001: Another 144 instructions (SSE2) • 2003: AMD (Advanced Micro Device (CYRIx)) extends the architecture to increase address space to 64 bits, widens all registers to 64 bits and other changes (AMD64) • 2004: Intel capitulates and embraces AMD64 (calls it EM64T) and adds more media extensions • “This history illustrates the impact of the “golden handcuffs” of compatibility“adding new features as someone might add clothing to a packed bag”“an architecture that is difficult to explain and impossible to love” 09/15/2013

  24. Intel IA-32 Processors • Intel IA-32 processors, from 80386 processor in early 80’s to • Pentium IV today are of CISC architecture. All Intel IA-32 • processors are having as a core the identical instruction set • architecture designed in early 1980’s. • The improvements in technology have allowed the latest • Intel IA-32 processors (of CISC architecture) to adopt many • innovations first pioneered in the RISC design. • Since 1995, Pentium processors consist of a front end • processor and a RISC-style processor. 09/15/2013 • The front end processor fetches and decodes Intel IA-32 • complex instructions and maps them into microinstructions. A microinstruction is a simple instruction used in sequence to implement a more complex instruction. Microinstructions look very much as RISC instructions. • Then, the RISC-style processorexecutesmicroinstructions.

  25. What Is This Course About? In this course we are going to learn basic principles of processor and memory design using functionality of MIPS processor, i.e. we shall design processor-memory system with (a subset of) MIPS instruction set architecture. Somewhere some time ago, I read that MIPS processor is the best-selling RISC processor that powers everything from Nintendo game machines and Cisco networking routers to Silicon Graphics’ high-end servers and supercomputers. 09/15/2013 What doesMIPS stand for? Answer: Microprocessor without Interlocked Pipeline Stages. MIPS processor is one of the first RISC processors.

  26. Instructions: • Language of the Machine • We’ll be working with the MIPS instruction set architecture • similar to other architectures developed since the 1980's • Almost 100 million MIPS processors manufactured in 2002 • used by NEC, Nintendo, Cisco, Silicon Graphics, Sony, … 09/15/2013

  27. Why learn this stuff? • You want to call yourself a “Electronic scientist” • You want to build software people use (need performance) • You need to make a purchasing decision or offer “expert” advice • Both Hardware and Software affect performance: • Algorithm determines number of source-level statements • Language/Compiler/Architecture determine machine instructions (Chapter 2 and 3) • Processor/Memory determine how fast instructions are executed (Chapter 5, 6, and 7) • Assessing and Understanding Performance in Chapter 4 09/15/2013

  28. What is a computer? • Components: • input (mouse, keyboard) • output (display, printer) • memory (disk drives, DRAM, SRAM, CD) • network • Our primary focus: the processor (datapath and control) • implemented using millions of transistors • Impossible to understand by looking at each transistor • We need... 09/15/2013

  29. Abstraction • Delving into the depths reveals more information • An abstraction omits unneeded detail, helps us cope with complexityWhat are some of the details that appear in these familiar abstractions? 09/15/2013

  30. How do computers work? • Need to understand abstractions such as: • Applications software • Systems software • Assembly Language • Machine Language • Architectural Issues: i.e., Caches, Virtual Memory, Pipelining • Sequential logic, finite state machines • Combinational logic, arithmetic circuits • Boolean logic, 1s and 0s • Transistors used to build logic gates (CMOS) • Semiconductors/Silicon used to build transistors • Properties of atoms, electrons, and quantum dynamics • So much to learn! 09/15/2013

  31. Instruction Set Architecture • A very important abstraction • interface between hardware and low-level software • standardizes instructions, machine language bit patterns, etc. • advantage: different implementations of the same architecture • disadvantage: sometimes prevents using new innovationsTrue or False: Binary compatibility is extraordinarily important? • Modern instruction set architectures: • IA-32, PowerPC, MIPS, SPARC, ARM, and others 09/15/2013

  32. Microcomputer System Interface Memory Module Timing Microprocessor (CPU) Bus Control logic Interface Mass Storage Device 09/15/2013 Interface I/O Devices

  33. Components Hardware : • CPU – Microprocessor Unit (MPU) • Logical, Arithmetic computations and control operations • Timer –Produces evenly spaced clock pulses • Needed for synchronization. – Now Integrated • Memory Modules – Multiple • They hold both data and instructions. • I/O Subsystem – External Devices and mass storage. • Bus System – Communication lines • Interface – Allows connection of Bus to devices. Buffering and decoding are two major functions. 09/15/2013

  34. Software: • System Software • Collection of programs needed in the creation, preparation and execution of other programs ( Operating Systems – Windows XP) • User Software • Software which helps solve different problems and provides user level functionality. ( Applications – Microsoft Power Point) Programming: • Machine Language – Is understood and run by computer 09/15/2013 • Assembly Language – Closely linked to Machine language, more readable for humans, Usually 1-1 mapping, translated to machine language using Assembler • High-Level Language – Instructions that are closer to English and the mental model used by programmers to solve problems. Translated to machine language using Compiler or Interpreter.

  35. Operations CPU/Microprocessor should support : • Assignment and Arithmetic expression • Unconditional Branches • Conditional Branches (Relational & Logical Expression) • Looping • Arrays and other Data Structures • Subroutines • I/O Operations 09/15/2013

  36. Typical Microprocessor Architecture Working Registers Control Unit Program Counter (PC ) Address Registers. . Instructions Register Processor Status Word (PSW) Arithmetic Registers. . Stack Pointer (SP) 09/15/2013 I/O Control Logic Arithmetic Logic Unit (ALU)

  37. Reasons for using Microprocessors • Cost • Flexibility • Development Time • Speed • Reliability 09/15/2013

More Related