Elements of Computing Systems, Nisan & Schocken, MIT Press, www.idc.ac.il/tecs, Chapter 5: Computer Architecture slide 1www.idc.ac.il/tecs Computer Architecture.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Chapter 4: Machine Language
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 1: Boolean Logic slide 1www.idc.ac.il/tecs Chapter 1: Boolean.
Slide 4-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 4 Computer Organization.
Chapter 2 Data Manipulation Dr. Farzana Rahman Assistant Professor Department of Computer Science James Madison University 1 Some sldes are adapted from.
Slide 1CPU Emulator Tutorial This program is part of the software suite that accompanies the book The Digital Core, by Noam Nisan and Shimon Schocken 2003,
EEE226 MICROPROCESSORBY DR. ZAINI ABDUL HALIM School of Electrical & Electronic Engineering USM.
Khaled A. Al-Utaibi  Computers are Every Where  What is Computer Engineering?  Design Levels  Computer Engineering Fields  What.
Computer Architecture and Data Manipulation Chapter 3.
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 5: Computer Architecture slide 1www.idc.ac.il/tecs Chapter.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Midterm Wednesday Chapter 1-3: Number /character representation and conversion Number arithmetic Combinational logic elements and design (DeMorgan’s Law)
Stored Program Concept: The Hardware View
Elements of the Computer (How a processor works)
Computer Organization and Assembly language
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 3: Sequential Logic slide 1www.idc.ac.il/tecs Chapter 3:
Some of these slides are based on material from the ACM Computing Curricula 2005.
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Introduction: Hello, World Below slide 1www.idc.ac.il/tecs Introduction:
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 10: Compiler I: Syntax Analysis slide 1www.idc.ac.il/tecs.
Computer Architecture Lecture 01 Fasih ur Rehman.
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 2: Boolean Logic slide 1www.idc.ac.il/tecs Chapter 2: Boolean.
1.1 1 Introduction Foundations of Computer Science  Cengage Learning.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 10: Compiler I: Syntax Analysis slide 1www.idc.ac.il/tecs Compiler.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 4: Machine Language slide 1www.idc.ac.il/tecs Machine Language.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 1www.nand2tetris.org Building a.
Levels of Architecture & Language CHAPTER 1 © copyright Bobby Hoggard / material may not be redistributed without permission.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Digital Design and Computer Architecture Dr. Robert D. Kent LT Ext Lecture 1 Introduction.
Introduction to Computing Systems from bits & gates to C & beyond The Von Neumann Model Basic components Instruction processing.
Building a Modern Computer From First Principles
Elements of Computing Systems, Nisan & Schocken, MIT Press, 2005, Chapter 11: Compiler II: Code Generation slide 1www.idc.ac.il/tecs.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 1: Boolean Logic slide 1www.nand2tetris.org Building a Modern.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 1: Boolean Logic slide 1www.idc.ac.il/tecs Boolean Logic Elements.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 2: Boolean Arithmetic slide 1www.nand2tetris.org Building a Modern.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 11: Compiler II: Code Generation slide 1www.nand2tetris.org Building.
Lecture 1 Introduction to Computing Machinery. Colossus Joseph Marie Jacquard Charles Babbage Augusta Ada Countess of Lovelace.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 3: Sequential Logic slide 1www.idc.ac.il/tecs Sequential Logic.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 3: Sequential Logic slide 1www.nand2tetris.org Building a Modern.
Chapter 1 Introduction.
Chapter 8: The Very Simple Computer
2 nd Year - 1 st Semester Asst. Lect. Mohammed Salim Computer Architecture I 1.
Ch. 2 Data Manipulation 4 The central processing unit. 4 The stored-program concept. 4 Program execution. 4 Other architectures. 4 Arithmetic/logic instructions.
Intro MIPS Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann – Wrote a.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 15, 2004 Lecture Number: 10.
Chapter 2 Data Manipulation. © 2005 Pearson Addison-Wesley. All rights reserved 2-2 Chapter 2: Data Manipulation 2.1 Computer Architecture 2.2 Machine.
Computer Architecture 2 nd year (computer and Information Sc.)
Building a Modern Computer From First Principles
Stored Programs In today’s lesson, we will look at: what we mean by a stored program computer how computers store and run programs what we mean by the.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.nand2tetris.org Building a Modern Computer.
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 4: Machine Language slide 1www.nand2tetris.org Building a Modern.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 4: Machine Language slide 1www.nand2tetris.org Building a Modern.
Computer Organization and Machine Language Programming CPTG 245
The Stored Program Computer
Computer Science 210 Computer Organization
Chapter 5: Computer Systems Organization
CPU Emulator Tutorial This program is part of the software suite
A primer on Computers and Programs
Introduction to Computer Systems
A Top-Level View Of Computer Function And Interconnection
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Little work is accurate
Presentation transcript:

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 1www.idc.ac.il/tecs Computer Architecture Elements of Computing Systems, Nisan & Schocken, MIT Press Usage and Copyright Notice: Copyright 2005 © Noam Nisan and Shimon Schocken This presentation contains lecture materials that accompany the textbook “The Elements of Computing Systems” by Noam Nisan & Shimon Schocken, MIT Press, We provide both PPT and PDF versions. The book web site, features 13 such presentations, one for each book chapter. Each presentation is designed to support about 3 hours of classroom or self-study instruction. You are welcome to use or edit this presentation as you see fit for instructional and non- commercial purposes. If you use our materials, we will appreciate it if you will include in them a reference to the book’s web site. If you have any questions or comments, you can reach us at

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 2www.idc.ac.il/tecs Babbage’s Analytical Engine (1835) “We may say most aptly that the Analytical Engine weaves algebraic patterns just as the Jacquard- loom weaves flowers and leaves” (Ada Lovelace) Charles Babbage ( )

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 3www.idc.ac.il/tecs Other early computers and “computer scientists” Blaise Pascal Gottfried Leibniz

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 4www.idc.ac.il/tecs Von Neumann machine (c. 1940) Andy Grove (and others)... made it small and fast. John Von Neumann (and others)... made it possible Stored program concept!

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 5www.idc.ac.il/tecs Processing logic: fetch-execute cycle Executing the current instruction involves one or more of the following micro tasks: Have the ALU compute some function f(registers) Write the ALU output to selected register(s) As a side-effect of executing these tasks, figure out which instruction to fetch and execute next.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 6www.idc.ac.il/tecs The Hack chip-set and hardware platform Elementary logic gates  Nand  Not  And  Or  Xor  Mux  Dmux  Not16  And16  Or16  Mux16  Or8Way  Mux4Way16  Mux8Way16  DMux4Way  DMux8Way Combinational chips  HalfAdder  FullAdder  Add16  Inc16  ALU Sequential chips  DFF  Bit  Register  RAM8  RAM64  RAM512  RAM4K  RAM16K  PC Computer Architecture  Memory  CPU  Computer done this lecture

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 7www.idc.ac.il/tecs The Hack computer Main parts of the Hack computer: Instruction memory Memory:  Data memory  Screen  Keyboard CPU Computer (the glue that holds everything together). 16-bit Von Neumann platform Instruction memory and data memory are physically separate I/O: 512 by 256 black and white screen, standard keyboard Designed to execute programs written in the Hack machine language Can be easily built from the chip-set that we built so far in the course

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 8www.idc.ac.il/tecs Lecture plan Instruction memory Memory: Data memory Screen Keyboard CPU Computer

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 9www.idc.ac.il/tecs Instruction memory Function: Pre-loaded with a machine language program Always emits a 16-bit number: out = ROM32K[address] This number is interpreted as the current instruction.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 10www.idc.ac.il/tecs Data memory Reading/writing logic Low level: Set address, in, load ; probe out Higher level (e.g. OS level): peek(address) poke(address,value).

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 11www.idc.ac.il/tecs Lecture plan Instruction memory Memory: Data memory Screen Keyboard CPU Computer  

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 12www.idc.ac.il/tecs Screen Functions exactly like a 16-bit 8K RAM : out = Screen[address] If load then Screen[address] = in Side effect: continuously refreshes a 256 by 512 black-and-white screen.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 13www.idc.ac.il/tecs Screen memory map Writing pixel(x,y) to the screen: Low level: Set the y%16 bit of the word found at Screen[x*32+y/16] High level: Use drawPixel(x,y) (OS service, later).

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 14www.idc.ac.il/tecs Keyboard Keyboard chip = 16-bit register Input: 16-bit value coming from a physical keyboard Output: the scan code of the pressed key, or 0 if no key is pressed Special keys: Reading the keyboard: Low level: probe the contents of the Keyboard register High level: use keyPressed() (OS service, later).

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 15www.idc.ac.il/tecs The Hack computer Instruction memory Memory: Data memory Screen Keyboard CPU Computer    

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 16www.idc.ac.il/tecs Memory Function: Access to any address from 0 to 16,383 results in accessing the RAM Access to any address from 16,384 to 24,575 results in accessing the Screen memory map Access to address 24,576 results in accessing the keyboard memory map Access to any address > is invalid.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 17www.idc.ac.il/tecs The Hack computer Instruction memory Memory: Data memory Screen Keyboard CPU Computer     

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 18www.idc.ac.il/tecs CPU CPU components: ALU + A, D, PC registers CPU Function: Executes the instruction according to the Hack language specification: The M value is read from inM The D and A values are read from (or written to) these CPU-resident registers If the instruction wants to write to M (e.g. M=D ), then the M value is placed in outM, the value of the CPU-resident A register is placed in addressM, and writeM is asserted If reset=1, then pc is set to 0; Otherwise, pc is set to the address resulting from executing the current instruction.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 19www.idc.ac.il/tecs CPU CHIP CPU { IN inM[16], instruction[16], reset; OUT outM[16], writeM, addressM[15], pc[15]; PARTS: // Implementation missing } CHIP CPU { IN inM[16], instruction[16], reset; OUT outM[16], writeM, addressM[15], pc[15]; PARTS: // Implementation missing } CPU implementation: next 3 slides.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 20www.idc.ac.il/tecs The C-instruction revisited

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 21www.idc.ac.il/tecs Execute logic: Decode Execute Fetch logic: If jump then set PC to A else set PC to PC+1 CPU implementation Cycle: Fetch Execute Reset logic: Set reset to 1, then to 0. Chip diagram: Includes most of the exec. logic Control logic is hinted.

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 22www.idc.ac.il/tecs The Hack computer Instruction memory Memory: Data memory Screen Keyboard CPU Computer      

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 23www.idc.ac.il/tecs Computer -on-a-chip interface

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 24www.idc.ac.il/tecs Computer -on-a-chip implementation CHIP Computer { IN reset; PARTS: // implementation missing } CHIP Computer { IN reset; PARTS: // implementation missing }

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 25www.idc.ac.il/tecs The Big Picture Instruction memory Memory: Data memory Screen Keyboard CPU Computer        “Ya, right, but what about the software?”

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 26www.idc.ac.il/tecs How it actually looks (thank goodness for abstractions!) CPU RAM bus I/O board (graphics card) Extension slots / ports

Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 5: Computer Architecture slide 27www.idc.ac.il/tecs Perspective I/O: more units, processors Special-purpose processors (graphics, communications, …) Efficiency CISC / RISC (HW/SW trade-off) Diversity: desktop, laptop, hand-held, game machines, … General-purpose VS dedicated / embedded computers Silicon compilers And more...