1 / 18

Introduction to Computer Organization

Introduction to Computer Organization. Computer Organization: Goals. Instruction cycle (fetch, execute, store) Memory organization Big endian / little endian Bytes, words, long Primary components of a computer CPU (control unit, ALU, registers), memory, I/O, datapath

chakaluka
Télécharger la présentation

Introduction to Computer Organization

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. Introduction to Computer Organization CEG 320/520: Computer Organization and Assembly Language Programming

  2. Computer Organization: Goals • Instruction cycle (fetch, execute, store) • Memory organization • Big endian / little endian • Bytes, words, long • Primary components of a computer • CPU (control unit, ALU, registers), memory, I/O, datapath • Von Neumann Architecture • Stored program computer • Know about ISAs. What are they? How do they fit in? • Assigned Reading • General Computer Organization: HVZ Chapter 1, 7.1, 7.2 • Memory: HVZ Chapter 2.2 CEG 320/520: Computer Organization and Assembly Language Programming

  3. What is computation? There are many sorts of computing devices, they fall into two categories: Analog: machines that produce an answer that measures some continuous physical property such as distance, light intensity, or voltage. Examples? Digital: machines that perform computations by manipulating a fixed finite set of elements. Examples? The difficulty with analog devices is that it is very hard to increase their accuracy. Before modern digital computers, the most common digital machines were adding machines. Adding machines perform exactly one sort of operation. Computers also perform one operation… but their operation is to accept a set of instructions that tell it how to do any sort of computation. What is a computer? CEG 320/520: Computer Organization and Assembly Language Programming

  4. Universal computing devices • Turing’s Thesis: Computer scientists believe that ANYTHING that can be computed, can be computed by a computer (provided that it has enough time and enough memory). • What does this imply? • All computers (from the least expensive to the most expensive) are capable of computing EXACTLY the same things IF they are given enough time and enough memory. • Some computers can do things faster, but none can do more than any other computer. • All computers can do exactly the same things! • Thus, any given problem is either computable or it is not computable • Problems may be computable, but still not feasible (NPC) CEG 320/520: Computer Organization and Assembly Language Programming

  5. We describe our problems in English or some other natural language. Computer problems are solved by electrons flowing around inside the computer. It is necessary to transform our problem from a natural language to the voltages that influence the flow of electrons. This transformation is really a sequence of systematic transformations, developed and improved over the last 50 years, which combine to give the computer the ability to carry out what may appear to be very complicated tasks. In reality, these tasks must be simple and straight-forward. How do we get the electrons to do the work? CEG 320/520: Computer Organization and Assembly Language Programming

  6. The Problem Algorithm & Language ISA & Microarchitecture Circuits & Devices Overview: Digital Computation • Design Process Computer Science Software level Computer Engineering Hardware level Computer/Electrical Engineering Logic level CEG 320/520: Computer Organization and Assembly Language Programming

  7. The Problem Algorithm & Language ISA & Microarchitecture Circuits & Devices Overview: The Problem Statement • We describe problems that we wish to solve with a computer in a “natural language.” • Natural languages are fraught with a lot of things unacceptable for providing instructions to a computer. • The most important of these unacceptable attributes is ambiguity. To infer the meaning of a sentence, a listener is often helped by context that the computer does not have. • Example: “Time flies like an arrow.” • How fast time passes • Track meet • Gossip • A computer is an electronic idiot and can not deal with any ambiguity, thus… CEG 320/520: Computer Organization and Assembly Language Programming

  8. The Problem Algorithm & Language ISA & Microarchitecture Circuits & Devices Overview: Algorithm • The first step in the sequence of transformations is to transform the natural language description of the problem to an algorithm. • An algorithm is a step-by-step procedure: • That transforms an input (possibly NULL) into some output (or output action) • That is guaranteed to terminate • Definiteness: Each step is precisely stated. • Effective computability: Each step must be something the computer can perform • Finiteness: The procedure must terminate • For any computable problem, there are an infinite number of algorithms to solve it. • Which solution is best? CEG 320/520: Computer Organization and Assembly Language Programming

  9. The Problem Algorithm & Language ISA & Microarchitecture Circuits & Devices Overview: Programming Language • The next step is to transform the algorithm into a computer program • Programming languages are unambiguous “mechanical” languages • There are two kinds of programming languages: • High-level languages are machine independent. They are “far above” the (underlying) computer • Low-level languages are machine dependent. They are tied to the computer on which the program will execute. There is generally only one such language per machine (referred to as its ASSEMBLY language). CEG 320/520: Computer Organization and Assembly Language Programming

  10. The Problem Algorithm &Language ISA & Microarchitecture Circuits & Devices Overview: The instruction set architecture (ISA) • The next step is to translate the program into the instruction set of the particular computer that will be used to carry out the work of the program. • The Instruction Set Architecture (ISA) is the complete specification of the interface between programs that have been written and the underlying hardware that must carry out the work of those programs. • Examples: IA-32 (Intel, AMD, and others), PowerPC (Motorola) • Programs are translated from high languages in to the ISA of the computer on which they will be run by a program called a compiler (specific to the ISA). • Programs are translated from assembly to the ISA by an assembler • Analogy: A car • The car’s ISA describes what the driver sees/uses. CEG 320/520: Computer Organization and Assembly Language Programming

  11. The Problem Algorithm &Language ISA & Microarchitecture Circuits & Devices Overview: Microarchitecture • The next step is to transform the ISA into an implementation. The detailed organization of an implementation is called its microarchitecture. • The IA-32 has been implemented by several different processors over the past twenty years 8086 (Intel, 1979), 8286, 8386, 8486, Pentium, PentiumII, Athlon, PentiumIII. • Each implementation is an opportunity for computer designers to make different trade-offs between cost and performance. [Computer design is always an exercise in trade-offs.] • Analogy: A car • The implementation of a car’s ISA is what goes on under the hood. Here all automobiles makes and models are different. Some with fuel injection, some have eight cylinders, some are turbocharged… in each case the “microarchitecture” of a specific automobile is the result of the automobile designers’ decisions regarding cost and performance. CEG 320/520: Computer Organization and Assembly Language Programming

  12. The Problem Algorithm &Language ISA & Microarchitecture Circuits & Devices Overview: Logic Circuits • The next step is to implement each element of the microprocessor out of simple logic circuits. • Here there are also choices, as the logic designer decides how to best make the trade-offs between cost and performance. • Even in the case of addition, there are several choices of logic circuits to perform this operation and differing speeds and corresponding costs. CEG 320/520: Computer Organization and Assembly Language Programming

  13. Vcc Rc The Problem Vout Rb Vin GND Algorithm &Language ISA & Microarchitecture Circuits & Devices Overview: Digital Devices • Finally, each basic logic circuit is implemented in accordance with the requirements of the particular device technology used. • So, CMOS circuits are different from NMOS circuits, which are different, in turn, from gallium arsenide circuits. CEG 320/520: Computer Organization and Assembly Language Programming

  14. Logic Circuits: Types • Logic circuits divide into two major types: • Combinational Logic • Current output depends on current input only • Examples: gates, decoders, multiplexors (MUXs), ALUs • Sequential Logic • Current output depends on past inputs as well as current input • Thus has a memory (usually called the state) • Examples: latches, flip-flops, state machines, counters, shift registers Design: avg (w,x,y,z) a^2+2ab+b^2 m + n * p p * (m + n) CEG 320/520: Computer Organization and Assembly Language Programming

  15. Logic Circuits: Sequential • STATE- A collection of state variables whose values at any one time contain all the information about the past values necessary to account for future behavior. • Example: A TV tuner could have a current channel stored internally, so the next channel can be predicted as a function of the inputs, i.e. the UP button increases the channel by one, the DOWN button decreases the channel by one. What is the state of this TV tuner? • Digital sequential logic • State variables are binary values • Circuit with n binary state variables has 2npossible states • Also known as a finite state machine (FSM). • Changes usually synchronized with a system clock CEG 320/520: Computer Organization and Assembly Language Programming

  16. The instruction set • High-Level Language - C • A = B + C; • Memory-Transfer Equivalent • Mem[A]  Mem[B] + Mem[C] • Mem[EA00]  Mem[EA08] + Mem[EA10] • Machine-Level Equivalent • Assembly (human readable) ex: Machine (for a simple architecture) • Load R2, B E2EA08 • Load R3, C E3EA10 • R2  R2 + R3 0223 • Store A, R2 F2EA00 • The bits of a machine instruction are divided into fields • eg: E2EA08 • E: Operation “Load”; 2: Destination Address R2; EA08: Address Field • The operation field (opcode) defines the format for the instruction CEG 320/520: Computer Organization and Assembly Language Programming

  17. How do we specify the program? • Contemporary languages • C, C++, Perl, Java, and hundreds more. • Languages of Yore • Fortran, COBOL, and scores more. • Specialty languages • VHDL, simulation languages, and thousands more. • There are over 1,000 “standardized” programming languages today. • The only goal of these languages is to help humans implement their algorithms in the instructions available for a particular ISA CEG 320/520: Computer Organization and Assembly Language Programming

  18. Computer Organization: You should know… • Instruction cycle (fetch, execute, store) • Memory organization • Big endian / little endian • Bytes, words, long • Primary components of a computer • CPU (control unit, ALU, registers), memory, I/O, datapath • Von Neumann Architecture • Stored program computer • Know about ISAs. What are they? How do they fit in? • Next Topic • Introduction to Assembly Language • Reading: HVZ Chapter 2.4, 2.5, 2.6, 3.8, 3.9, 3.10, 3.11 • Reference: HVZ Appendix C CEG 320/520: Computer Organization and Assembly Language Programming

More Related