1 / 15

CMSC311

CMSC311. Computer Organization and Assembly Language Read: Chapter 1,2 Fall 2006 Dr. Ju Wang. Class Objectives. Learn how high-level language (C/Java) is translated into the language of hardware How does the hardware execute the resulting program • Computer arithmetic

nani
Download Presentation

CMSC311

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. CMSC311 • Computer Organization and Assembly Language • Read: Chapter 1,2 • Fall 2006 • Dr. Ju Wang

  2. Class Objectives • Learn how high-level language (C/Java) is translated into the language of hardware • How does the hardware execute the resulting program • Computer arithmetic • Machine language / assembly language • System organization/implementation • Prepare for future software/architecture/design classes

  3. How to success in this course • check course page http://www.people.vcu.edu/~jwang3/cmsc311/index.htm • Read textbook: Computer Organization 5th edition (Hamacher and Vranesic) • Do assignments: problem exercise, assembly language programming, basic computer simulator • Independent work • Class participation and be active: • Questions, office hours

  4. About programming projects • You will learn AVR assembly language • You will write AVR code to solve some problems • You will learn AVR studio software to debug/execute your AVR code • Lab/tutorial might be scheduled based on demand

  5. 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

  6. 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?

  7. Types of Computer and Organization • Desktop • Server • Laptop • Supercomputer • Embedded computer computer processor MEMORY I/O Dev 1 Datapath I/O Dev 2 I/O Dev 3 control I/ODev 4

  8. PC Motherboard and CPU Pentium 4 processor 1.7GHz, $90 ASUS P4 motherboard, $120

  9. What is ISA • Instruction Set Architecture (the “vocabulary” of a machine) • All processor has its type of ISA • interface between hardware and low-level software • Determine the compatibility/portability of software

  10. ISA examples • Digital Alpha (v1, v3) 1992-97 • HP PA-RISC (v1.1, v2.0) 1986-96 • Sun Sparc (v8, v9) 1987-95 • SGI MIPS (MIPS I, II, III, IV, V) 1986-96 • Intel (8086,80286,80386, 1978-96 80486,Pentium, MMX, ...)

  11. Big Picture Sys prog App prog Compiler Assembler Operating System Instruction Set Architecture CPU MEM I/O Dev Logical design, Layout, … electrical signal

  12. Inside the CPU • A modern processor has: • Registers: r0, r1, r2, • Hold 8/16/32/64 bits of information • Like variables in C • Functional units: •given input data, produce results as data • Control unit: • Controls follow of the instructions

  13. From Java to machine code • C Statement: • int foo; foo = 15; foo = foo + 7; • • MIPS Assembly Language: • ori $1,$0,15 # set foo to 15 • addiu $1,$1,7 # add 7 to foo • (register 1 holds the value of foo) • • MIPS Machine Instructions: • 00110100000000010000000000001111 • 00100100001000010000000000000111

  14. How program is executed • • Basic idea: • 1. Fetch machine instruction • 2. Decode it, examine fields • 3. Execute the specified operation

  15. Stored-Program Computer • Instructions are numbers too! • • Memory is a linear array of "registers" • • Store instructions in memory (von Neumann architecture) • • New register PC, the program counter • 1. Fetch machine instruction at PC • 2. Decode it, examine fields • 3. Update PC • 4. Execute the specified operation

More Related