Скачать презентацию Computer Organization and Machine Language Programming CPTG 245 Скачать презентацию Computer Organization and Machine Language Programming CPTG 245

fdebf122b7a9a4fadfa18b038fd13ed4.ppt

  • Количество слайдов: 18

Computer Organization and Machine Language Programming CPTG 245 Computer Organization and Machine Language Programming CPTG 245

Understanding Computer Systems l Three basic questions associated with understanding computing systems: w What Understanding Computer Systems l Three basic questions associated with understanding computing systems: w What are computing systems used for? w How are computing systems implemented? w What are computing systems able to do and how well can they do it? 1 -2

Computing Machines l Ubiquitous ( = everywhere) w General purpose: servers, desktops, laptops, PDAs, Computing Machines l Ubiquitous ( = everywhere) w General purpose: servers, desktops, laptops, PDAs, etc. w Special purpose: cash registers, ATMs, games, telephone switches, etc. w Embedded: cars, hotel doors, printers, VCRs, industrial machinery, medical equipment, etc. l Distinguishing Characteristics w Speed w Cost w Ease of use, software support & interface w Scalability 1 -3

This course is about: • What computers consist of • How computers work • This course is about: • What computers consist of • How computers work • How they are organized internally • What are the design tradeoffs • How design affects programming and applications 1 -4 • How to fix computers • How to build myself one real cheap • Which one to buy • Knowing more about how a Pentium. III or Power. PC works internally

What is Computer Organization? Electronic Devices Desired Behavior … a very wide gap between What is Computer Organization? Electronic Devices Desired Behavior … a very wide gap between the intended behavior and the raw (unorganized) electronic devices. The forerunners to modern computers attempted to assemble the raw devices (mechanical, electrical, or electronic) into a separate purpose-built machine for each desired behavior. 1 -5

Role of General Purpose Computers computer organization / hardware Electronic Devices software General Purpose Role of General Purpose Computers computer organization / hardware Electronic Devices software General Purpose Computer Desired Behavior We will break the gap into multiple levels and build an island in the middle. A general purpose computer is an island that bridges the gap between the desired behavior (application) and the raw material (electronic devices). 1 -6

Two Important Ideas l Universal Computational Devices w Given enough time and memory, all Two Important Ideas l Universal Computational Devices w Given enough time and memory, all computers are capable of computing exactly the same things (irrespective of speed, size or cost). § Turing’s Thesis: every computation can be performed by some “Turing Machine” - a theoretical universal computational device (not mathematically proven, but taken to be true). l Problem Transformation w The ultimate objective is to transform a problem expressed in natural language into electrons running around a circuit! § That’s what Computer Science and Computer Engineering are all about! 1 -7

Problem Transformation - finer breakdown Desired Behavior: application Natural Language Algorithm Program Machine Architecture Problem Transformation - finer breakdown Desired Behavior: application Natural Language Algorithm Program Machine Architecture Micro-architecture Raw Material: electronic devices Logic Circuits Devices 1 -8

The Program Level w Most computers run a special management program called the operating The Program Level w Most computers run a special management program called the operating system (OS). Application Program Operating System w Application programs interface to the machine architecture via the OS. Program (Software) An example: This lecture Power. Point Application Program Windows NT 1 -9 Data Operating System

The Machine Level l Machine Architecture w This is the formal specification of all The Machine Level l Machine Architecture w This is the formal specification of all the functions a particular machine can carry out, known as the Instruction Set Architecture (ISA) (8. 2. 1) l Microarchitecture w The implementation of the ISA in a microprocessor - i. e. the way in which the specifications of the ISA are actually carried out. (8. 2. 2 – 8. 2. 7) l Logic Circuit w Each element of the microarchitecture is composed of simple logic circuits (chapters 2 to 6) l Devices w Finally, each logic circuit is actually built of electronic devices such as CMOS or NMOS or Ga. As (etc. ) transistors 1 - 10

Course Outline - What is Next? l How to represent numbers l The building Course Outline - What is Next? l How to represent numbers l The building blocks of computers: logic gates l The basic algorithm: the von Neumann model l An example: the LC-3 structure and language l Programming the machine: assembly language 1 - 11

The Von Neumann Model Basic components l Instruction processing l The Von Neumann Model Basic components l Instruction processing l

The von Neumann Model - 1 Memory MAR MDR Processing Unit Input *keyboard ALU The von Neumann Model - 1 Memory MAR MDR Processing Unit Input *keyboard ALU Control Unit PC IR Memory: holds the instructions and data u Processing Unit: processes the information u Control Unit: manages computer activity u Input: external information into the memory u Output: produces results for the user u 4 - 13 TEMP Output *monitor

The von Neumann Model - 3 l Central Processing Unit (CPU) w ALU (Arithmetic The von Neumann Model - 3 l Central Processing Unit (CPU) w ALU (Arithmetic and Logic Unit) § Generally operates on entire words of data § Some also work on subsets of words (eg. bits and bytes) w Registers: § Small, fast “on-board” storage for words § Close to the ALU (much faster access than RAM) w Control Unit § Program Counter (PC) or Instruction Pointer • Holds the address of the next instruction to be executed § Instruction Register (IR) • Holds the instruction being executed § The control unit coordinates all actions needed to execute the instruction 4 - 14

The von Neumann Model - 2 l Memory (RAM) w Each location has an The von Neumann Model - 2 l Memory (RAM) w Each location has an address and contents w Address: set of bits that uniquely identify a memory location § (eg. 20 bits gives an address space of 220 locations) w Addressability (Byte vs. Word): Note: a Word is the basic unit of data used by the processing unit (usually multiple bytes) § The size of the memory location referenced by a given address l Input & Output w LC 3 deals only with keyboard and monitor w More details later 4 - 15

The LC-3 Data and Control Paths 4 - 16 The LC-3 Data and Control Paths 4 - 16

Stopping the Computer l Operating System w controls the computer w when a program Stopping the Computer l Operating System w controls the computer w when a program completes: § it exits § it returns control to the operating system w OS is ready for next command or program l External Control w kill or halt a program w reset a computer 4 - 17

The Clock l The Drum Beat of the Computer w every operation happens in The Clock l The Drum Beat of the Computer w every operation happens in multiples of a clock cycles 2. 9 volts time 0 volts one clock cycle u if the run latch is set (output Q = 1) then the clock output is the same as the clock generator u if the latch is reset (off) then the clock output is disabled 4 - 18 Clock generator (crystal) clock S Q R Run Latch