Presentation is loading. Please wait.

Presentation is loading. Please wait.

BYU CS/ECEn 124Chapter 01 - Abstraction1 CS/ECEn 124 – Computer Systems Winter 2010 Section 001, MWF 1:00 – 1:50 pm Section 002, MWF 2:00 – 2:50 pm Help.

Similar presentations


Presentation on theme: "BYU CS/ECEn 124Chapter 01 - Abstraction1 CS/ECEn 124 – Computer Systems Winter 2010 Section 001, MWF 1:00 – 1:50 pm Section 002, MWF 2:00 – 2:50 pm Help."— Presentation transcript:

1 BYU CS/ECEn 124Chapter 01 - Abstraction1 CS/ECEn 124 – Computer Systems Winter 2010 Section 001, MWF 1:00 – 1:50 pm Section 002, MWF 2:00 – 2:50 pm Help Sessions, MWF 4:00 – 4:45 pm Instructor: Paul Roper Office: TMCB 3370, 422-8149 Email: proper@cs.byu.edu Office Hours: MWF 10:00 – 11:40 am

2 Let’s Get Started… What’s inside this thing...

3 BYU CS/ECEn 124Chapter 01 - Abstraction3 Concepts to Learn… Computers Power of Abstraction Hardware vs. Software Turing Machine Universal Computing Devices The “Gap” Solving Problems w/Computer Levels of Transformation

4 BYU CS/ECEn 124Chapter 01 - Abstraction4 Computers… There is no magic to computing. Computers do not have minds of their own. You have to tell them exactly what to do. Computers follow instructions exactly. Computers are made of very simple parts… albeit, fast parts and a whole lot of them! We will study the MPS430 micro-controller, which has all of the important characteristics of today’s commercial computers. Computers

5 BYU CS/ECEn 124Chapter 01 - Abstraction5 A Computer A computer figures out what to do next – control. does the computations on the data – data path. A computer uses a “program” for control and the data path. A computer is called a a central processing unit, or a CPU, MPU, MSP, or simply, a processor. Computers

6 BYU CS/ECEn 124Chapter 01 - Abstraction6 Digital vs. Analog Wristwatches (numbers vs. hands) LP’s vs. CD’s Rotary phone vs. Cell phone NTSC vs. HDTV Slide rule vs. calculator 737’s vs. 787’s Computers

7 BYU CS/ECEn 124Chapter 01 - Abstraction7 All Computers Are Created Equal… In theory, any computer can compute anything that’s possible to compute given enough memory and given enough time. In practice, solving a problem is constrained by time weather forecast, next frame of animation,... cost cell phone, automotive engine controller,... power cell phone, handheld video game,... Computers

8 BYU CS/ECEn 124Chapter 01 - Abstraction8 Computing Machines Ubiquitous (meaning everywhere!) General purpose: servers, desktops, laptops, PDAs, … Special purpose: cash registers, ATMs, games, telephone switches, … Embedded: cars, hotel doors, printers, VCRs, industrial machinery, medical equipment, … Distinguishing Characteristics Speed Cost Ease of use, software support & interface Scalability Reliability Computers

9 BYU CS/ECEn 124Chapter 01 - Abstraction9 Computing Machines Use Abstraction Hardware verses Software to manage complexity. to enhance productivity. to hide unnecessary details when everything works. to focus on what is important. are just different parts of a computing system. understanding together best solve computing problems. mastery makes you more capable. Computers

10 BYU CS/ECEn 124Chapter 01 - Abstraction10 The Concept of Abstraction We abstract naturally– focus on the essential aspects of an entity. hide the underlying complexity. Avoid getting bogged down in unnecessary details (when everything is working fine). More efficient to think about something at the highest possible level of abstraction. Without abstraction, one would be overwhelmed by the complexity of a computer. But, when something doesn’t work, then abstraction fails and you have to look at the details. Abstraction

11 BYU CS/ECEn 124Chapter 01 - Abstraction11 Hardware versus Software Some people think that its OK for– Software engineers to be clueless about hardware, or Hardware engineers to be clueless about software. Don’t believe it! Hardware and software are both essential parts of a computing system. Computer systems work best when designed by someone who understands both parts. Hardware designers that understand programming design the best computers. Software designers that understand the capabilities and limitations of hardware design more efficient programs. Hardware/Software

12 BYU CS/ECEn 124Chapter 01 - Abstraction12 Computing Devices Alan Turing In 1936 he proposed a way to define the term “computable” The Turing Machine Basic abstract symbol-manipulating devices which can be adapted to simulate the logic of any computer algorithm. Anything that can be computed, can be computed by a TM… The TM is not a real machine, but an abstract machine Turning Machine

13 BYU CS/ECEn 124Chapter 01 - Abstraction13 Turing Machine Mathematical model of a device that can perform any computation – Alan Turing (1936) ability to read/write symbols on an infinite “tape” “state” transitions, based on current state and symbol Every computation can be performed by some Turing machine. (Turing’s thesis) T add a,ba+b Turing machine that adds T mul a,bab Turing machine that multiplies Turning Machine

14 BYU CS/ECEn 124Chapter 01 - Abstraction14 Turing Machine Details Turning Machine

15 BYU CS/ECEn 124Chapter 01 - Abstraction15 Turing Machine Example OldReadWriteNew StateSym SymMoveState S1 1  0 RS2 S2 1  1 RS2 S2 0  0 RS3 S3 0  1 LS4 S3 1  1 RS3 S4 1  1 LS4 S4 0  0 LS5 S5 1  1 LS5 S5 0  1 RS1 StepStateTape 1 S111 “Action Table” Start State (State Register) Tape Read Head 2 S201 3 S2010 4 S30100 5 S40101 6 S50101 7 S50101 8 S11101 9 S21001 10 S31001 11 S310010 12 S410011 13 S410011 14 S510011 15 S111011 --HALT-- Turning Machine

16 BYU CS/ECEn 124Chapter 01 - Abstraction16 Universal Turing Machine A Universal Turing Machine is a theoretical device that can simulate any other Turing machine. that accepts both input data and instructions as to how to operate on the data. that is also a Turing Machine! U a,b,c c(a+b) Universal Turing Machine T add, T mul A computer is a universal computing device. Universal Turning Machine

17 BYU CS/ECEn 124Chapter 01 - Abstraction17 The “Gap” Wordprocessing… Games… Surfing the web… 10101101011011… Computational Problem Implementation The “Gap”

18 BYU CS/ECEn 124Chapter 01 - Abstraction18 Overcoming the Gap Problems Algorithms Language (Program) Machine (ISA) Architecture Micro-architecture Circuits Devices Programmable Computer Specific Manufacturer Specific As we move down, many choices must be made. This is how we make our living! The “Gap”

19 BYU CS/ECEn 124Chapter 01 - Abstraction19 Problem Solving w/Computers Problem Program Programming: use language to express design Algorithm Software Design: choose algorithms and data structures Instruction Set Architecture Instruction Set Architecture Compiling/Interpreting: convert language to machine instructions Solving Problems

20 BYU CS/ECEn 124Chapter 01 - Abstraction20 Deeper and Deeper… Instruction Set Architecture Instruction Set Architecture Devices Process Engineering & Fabrication: develop and manufacture lowest-level components Circuits Logic/Circuit Design: gates and low-level circuits to implement components Micro- Architecture Micro- Architecture Processor Design: choose structures to implement ISA Instruction Set Design: Design ISA that enables efficient problem solving Solving Problems

21 BYU CS/ECEn 124Chapter 01 - Abstraction21 Levels of Transformation Problems Algorithms Language (Program) Machine (ISA) Architecture Micro-architecture Circuits Devices Problems Algorithms Language (Program) Programmable Fixed Which Levels are Programmable? Solving Problems

22 BYU CS/ECEn 124Chapter 01 - Abstraction22 Problems Why not use natural languages to program computers? Incomplete Missing words and/or word structures for computer procedures. Imprecise Words that mean the same thing are difficult to translate into computer instructions. Ambiguous – the most unacceptable attribute! To infer the meaning of a sentence, a listener is often helped by the tone of the speaker, or at the very least, the context of the sentence. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

23 BYU CS/ECEn 124Chapter 01 - Abstraction23 For example… Consider the English sentence, “Time flies like an arrow.” One is noticing how fast time passes, One is at a track meet for insects, One is writing a letter to the Dear Abby of Insectville. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

24 BYU CS/ECEn 124Chapter 01 - Abstraction24 Algorithms An algorithm is a step-by-step procedure that: guarantees to terminate (finiteness) each step is precisely stated (definiteness) each step can be carried out (effective computability) Examples Starting a car Computing the average of n integers For any given problem, there are usually multiple algorithms that will work. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

25 BYU CS/ECEn 124Chapter 01 - Abstraction25 Programs The next step is to transform the algorithm into a computer program using a computer language. computer languages communicate with the computer computer languages are defined by a grammar computer languages are mechanical rather than natural computer languages are not ambiguous More than 1,000 programming languages different languages for different purposes financial processing/report generation manipulating lists of symbolic data natural language processing often, just a personal preference Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

26 BYU CS/ECEn 124Chapter 01 - Abstraction26 The Program Level Most computers run a management program called the operating system (OS). Application programs interface to the machine architecture via the OS. An example: Application Program Operating System Program (Software) This lecture PowerPoint Windows XP Data Application Program Operating System Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

27 BYU CS/ECEn 124Chapter 01 - Abstraction27 High-Level Languages (HLL’s) Machine independent not dependent on a particular machine’s organization can be compiled to run anywhere Easier to write than low-level languages Usually result in higher programmer productivity Incorporate higher levels of abstraction data structures (stacks, arrays) control structures (loops, switch statements, …) Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

28 BYU CS/ECEn 124Chapter 01 - Abstraction28 Low-Level Languages (LLL’s) Machine-specific internal machine organization is exposed to the programmer they can access the nitty gritty details numbers and types of registers specific instructions memory addressing modes condition code flags, special purpose hardware features Assembly programming lower productivity, but higher performing code Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Solving Problems

29 BYU CS/ECEn 124Chapter 01 - Abstraction29 Levels of Transformation Problems Algorithms Language (Program) Machine (ISA) Architecture Micro-architecture Circuits Devices Programmable Computer Specific Manufacturer Specific Levels of Transformation

30 BYU CS/ECEn 124Chapter 01 - Abstraction30 Instruction Set Architecture (ISA) Next is to translate the computer program (language) into the instruction set of a particular computer Specific to a CPU data types What are the different representations of operands operations on data What functions can be done addressable memory Where are operands stored addressing modes How to find operands in memory Machine code, or the 1’s and 0’s that instruct the machine. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Levels of Transformation

31 BYU CS/ECEn 124Chapter 01 - Abstraction31 Micro-Architecture The micro-architecture transforms the ISA into an implementation. 8051 IA-32 386 486 Pentium Pentium-II, III, IV Xeon MSP430 How the operations in the ISA are implemented how do you add two binary numbers? or, how do you access memory? faster and more complex Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Levels of Transformation

32 BYU CS/ECEn 124Chapter 01 - Abstraction32 Circuits The next step is to implement each element of the micro-architecture with simple logic circuits. Gates, adders, multiplexers Flip flops, memory cells Adders, subtracters, multipliers Circuits are used to make the computer do useful things like multiply or store a result. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Levels of Transformation

33 BYU CS/ECEn 124Chapter 01 - Abstraction33 Devices Finally, each basic logic circuit is implemented by a particular device technology. Wires and traces Types of circuits (transistors) CMOS NMOS Gallium arsenide Devices are the building blocks for more complex circuits. Problems Algorithms Programs Machine (ISA) Architecture Micro-architecture Circuits Devices Levels of Transformation

34 BYU CS/ECEn 124Chapter 01 - Abstraction34 High vs Low Level Programming Swap v[i] and v[i+1] Very high- level language objectives or tasks More concrete, machine-dependent; error -prone, harder to write, read, debug, maintain More abstract, machine-independent; easier to write, read, debug, maintain Interpreter temp=v[i]; v[i]=v[i+1]; v[i+1]=temp; High-level language statements One task = Many instructions Compiler MOV.B 0x0001(SP),R14 MOV.W SP,R15 INCD.W R15 ADD.W R15,R14 MOV.B @R14,0x0000(SP) MOV.B 0x0001(SP),R14 INC.W R14 MOV.W SP,R15 INCD.W R15 ADD.W R15,R14 MOV.B 0x0001(SP),R13 MOV.W SP,R15 INCD.W R15 ADD.W R15,R13 MOV.B @R14,0x0000(R13) MOV.B 0x0001(SP),R15 INC.W R15 MOV.W SP,R14 INCD.W R14 ADD.W R15,R14 MOV.B @SP,0x0000(R14) Assembly language instruction, mnemonic One statement = Several instructions Assembler 415E 0001 410F 532F 5F0E 4EE1 0000 415E 0001 531E 410F 532F 5F0E 415D 0001 410F 532F 5F0D 4EED 0000 415F 0001 531F 410E 532E 5F0E 41EE 0000 Machine language instructions binary (hex) Mostly one for one Levels of Transformation

35 BYU CS/ECEn 124Chapter 01 - Abstraction35 Example: Levels of Translation Algorithm C-language program (HLL) c = a + b; by hand Machine language programs 0010110010010001111 assembler Assembly language program (LLL) ADD.W r4,r12 compiler Algorithm Language ISA program execution Levels of Transformation

36 BYU CS/ECEn 124Chapter 01 - Abstraction36 Levels of Transformation Problems Algorithms Language (Program) Machine (ISA) Architecture Micro-architecture Circuits Devices Labs 4-5 Lab 3 Labs 6-8 Labs 9-10 Labs 11-12 Lab 2 Levels of Transformation

37 BYU CS/ECEn 124Chapter 01 - Abstraction37 Review: Descriptions of Each Level Problem Statement stated using "natural language“ ambiguous, imprecise Algorithm step-by-step procedure, guaranteed to finish definiteness, effective computability, finiteness Program express the algorithm using a computer language high-level language, low-level language Levels of Transformation

38 BYU CS/ECEn 124Chapter 01 - Abstraction38 Review of Each Level (continued…) Instruction Set Architecture (ISA) set of instructions the computer can execute data types, addressing mode Micro-architecture detailed organization of a processor implementation different implementations of a single ISA Logic Circuits combine basic operations to realize microarchitecture many different ways to implement a single function Devices properties of materials, manufacturability Levels of Transformation

39 BYU CS/ECEn 124Chapter 01 - Abstraction39

40 Auxilliary Slides…

41 BYU CS/ECEn 124Chapter 01 - Abstraction41 From Components to Applications Subfields or views in computer system engineering.

42 BYU CS/ECEn 124Chapter 01 - Abstraction42 What Is Computer Architecture? Like a building architect, whose place at the engineering/arts and goals/means interfaces is seen in this diagram, a computer architect reconciles many conflicting or competing demands.

43 BYU CS/ECEn 124Chapter 01 - Abstraction43 Parts of a Computer System The space of computer systems, with what we normally mean by the word “computer” highlighted.

44 BYU CS/ECEn 124Chapter 01 - Abstraction44 Price/Performance Pyramid Classifying computers by computational power and price range. Differences in scale, not in substance

45 BYU CS/ECEn 124Chapter 01 - Abstraction45 Automotive Embedded Computers Embedded computers are ubiquitous, yet invisible. They are found in our automobiles, appliances, and many other places.

46 BYU CS/ECEn 124Chapter 01 - Abstraction46 PC’s and Workstations Notebooks, a common class of portable computers, are much smaller than desktops but offer substantially the same capabilities. What are the main reasons for the size difference?

47 BYU CS/ECEn 124Chapter 01 - Abstraction47


Download ppt "BYU CS/ECEn 124Chapter 01 - Abstraction1 CS/ECEn 124 – Computer Systems Winter 2010 Section 001, MWF 1:00 – 1:50 pm Section 002, MWF 2:00 – 2:50 pm Help."

Similar presentations


Ads by Google