CS1104: Computer Organisation

Slides:



Advertisements
Similar presentations
MICRO PROCESSER The micro processer is a multipurpose programmable, clock driven, register based, electronic integrated device that has computing and decision.
Advertisements

CpE442 Intro. To Computer Architecture CpE 442 Introduction To Computer Architecture Lecture 1 Instructor: H. H. Ammar These slides are based on the lecture.
Room: E-3-31 Phone: Dr Masri Ayob TK 2123 COMPUTER ORGANISATION & ARCHITECTURE Lecture 5: CPU and Memory.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
©Brooks/Cole, 2003 Chapter 5 Computer Organization.
Chapter 0 Introduction to Computing
ECE 232 L2 Basics.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 2 Computer.
Chapter 2: Impact of Machine Architectures What is the Relationship Between Programs, Programming Languages, and Computers.
CS / Schlesinger Lec1.1 1/20/99©UCB Spring 1999 Computer Architecture Lecture 1 Introduction and Five Components of a Computer Spring, 1999 Arie Schlesinger.
Henry Hexmoor1 Chapter 10- Control units We introduced the basic structure of a control unit, and translated assembly instructions into a binary representation.
ECE 232 L1 Intro.1 Adapted from Patterson 97 ©UCBCopyright 1998 Morgan Kaufmann Publishers ECE 232 Hardware Organization and Design Lecture 1 Introduction.
Chapter 6 Memory and Programmable Logic Devices
Computer Systems CS208. Major Components of a Computer System Processor (CPU) Runs program instructions Main Memory Storage for running programs and current.
CS1104-8Memory1 CS1104: Computer Organisation Lecture 8: Memory
Processor Types And Instruction Sets Barak Perelman CS147 Prof. Lee.
6. The CPU and Memory Chapt. 7.
Computer Structure.
C.S. Choy95 COMPUTER ORGANIZATION Logic Design Skill to design digital components JAVA Language Skill to program a computer Computer Organization Skill.
Compsci Today’s topics l Binary Numbers  Brookshear l Computer Architecture  Notes from David A. Patterson and John L. Hennessy, Computer.
Computers Central Processor Unit. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
Cs 152 L1 Intro.1 Patterson Fall 97 ©UCB What is “Computer Architecture” Computer Architecture = Instruction Set Architecture + Machine Organization.
CS 1308 Computer Literacy and the Internet Computer Systems Organization.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
Computer Systems Organization CS 1428 Foundations of Computer Science.
Computers organization & Assembly Language Chapter 0 INTRODUCTION TO COMPUTING Basic Concepts.
Chapter 4 The Von Neumann Model
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Computer Architecture And Organization UNIT-II Structured Organization.
Computer Organization and Design Computer Abstractions and Technology
CPU How It Works. 2 Generic Block Diagram CPU MemoryInputOutput Address Bus Data Bus.
EKT221 ELECTRONICS DIGITAL II CHAPTER 4: Computer Design Basics
Introduction to Computer Architecture. What is binary? We use the decimal (base 10) number system Binary is the base 2 number system Ten different numbers.
Introduction to Computer Engineering CS/ECE 252, Fall 2009 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin – Madison.
General Concepts of Computer Organization Overview of Microcomputer.
Computer Architecture And Organization UNIT-II General System Architecture.
Intro MIPS Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann – Wrote a.
Computer Science 101 Computer Systems Organization.
Chapter 4 MARIE: An Introduction to a Simple Computer.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
Computer Architecture 2 nd year (computer and Information Sc.)
Computer Organization. The digital computer is a digital system that performs various computational tasks Digital computer use binary number system which.
CS 1308 Computer Literacy and the Internet. Objectives In this chapter, you will learn about:  The components of a computer system  Putting all the.
1 chapter 1 Computer Architecture and Design ECE4480/5480 Computer Architecture and Design Department of Electrical and Computer Engineering University.
Logic Design / Processor and Control Units Tony Diep.
Computer Systems. Bits Computers represent information as patterns of bits A bit (binary digit) is either 0 or 1 –binary  “two states” true and false,
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
Overview von Neumann Architecture Computer component Computer function
Random Access Memory (RAM).  A memory unit stores binary information in groups of bits called words.  The data consists of n lines (for n-bit words).
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Basic Concepts Computer Organization & Assembly Language Programming Instructor: Maram Alsahafi [Some of the contents Adapted from slides Dr Adnan Gutub,
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Chapter 5: Computer Systems Organization Invitation to Computer Science,
Computer Operation. Binary Codes CPU operates in binary codes Representation of values in binary codes Instructions to CPU in binary codes Addresses in.
Logic Gates Dr.Ahmed Bayoumi Dr.Shady Elmashad. Objectives  Identify the basic gates and describe the behavior of each  Combine basic gates into circuits.
BASIC COMPUTER ARCHITECTURE HOW COMPUTER SYSTEMS WORK.
1 Chapter 1 Basic Structures Of Computers. Computer : Introduction A computer is an electronic machine,devised for performing calculations and controlling.
CS4100: 計算機結構 Course Outline 國立清華大學資訊工程學系 九十九年度第二學期.
Computer Organization and Architecture Lecture 1 : Introduction
Chapter 4 The Von Neumann Model
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Chapter 5: Computer Systems Organization
Computer Architecture
Information Representation: Machine Instructions
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

CS1104: Computer Organisation http://www.comp.nus.edu.sg/~cs1104 School of Computing National University of Singapore

Lecture 1: Introduction Computer Organisation/Architecture Machine Organisation Buses Instruction Set Architecture (ISA) Questions Clock Cycles Central Processing Unit (CPU) CS1104-P2-1 Introduction

Lecture 1: Introduction Code Execution Memory CS1104-P2-1 Introduction

Computer Organisation/Architecture Computer organisation: electronics engineer’s view of a computer system. Computer architecture: assembly programmer’s view of a computer system – an abstract view. In practice, difficult to distinguish the two. Who needs to study this? Software engineers, embedded systems programmers, computer engineers. CS1104-P2-1 Introduction

Computer Organisation/Architecture (2) In-depth understanding of the inner-workings of modern computers, and trade-offs present at the hardware/software boundary. Emphasis is on the concept understanding and not on the hardware implementation. Textbook: Computer Organizations and Design (The hardware/software interface) by David A. Patterson and John L. Hennessy, Morgan Kaufmann, 2nd ed, 1998. Read Chapter 1.2 and 1.3. CS1104-P2-1 Introduction

Machine Organisation von Neumann architecture: Programs and data are stored in memory (stored-memory concept). Consists of processor, memory and devices. Data are carried along buses between components. CS1104-P2-1 Introduction

Machine Organisation (2) Processor Control Datapath Memory Devices Input Output Cache Registers Bus CS1104-P2-1 Introduction

Buses Bus: A communication path between components. Data bus, control bus, address bus. Bus width: the number of lines (bits). Data bus width usually coincides with word size, which is also usually the register size. Address bus width determines the addressable address range. A n-bit address bus can address up to 2n locations. CS1104-P2-1 Introduction

Instruction Set Architecture (ISA) Computer Architecture = Instruction Set + Machine Organisation. The Instruction Set serves as the interface between hardware and software. ISA: “… the attribute of a [computing] system as seen by the programmer, i.e. the conceptual structure and functional behavior, as distinct from the organization of the data flows and controls the logic design, and the physical implementation.” – Amdahl, Blaaw and Brooks, 1964. CS1104-P2-1 Introduction

Instruction Set Architecture (ISA) (2) Compilers,Operating Systems, Programming Languages, Software Engineering Digital Design Circuit Design Compiler Operating System Applications Firmware Datapath & Control Layout I/O system Processor Memory organization Instruction Set Architecture PART 2 PART 1 Electrical Engineering CS1104-P2-1 Introduction

Instruction Set Architecture (ISA) (3) Some examples of ISAs: 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,80286, 1978-96 80486,Pentium,…) CS1104-P2-1 Introduction

Instruction Set Architecture (ISA) (4) Issues concerning an ISA design: Organisation of programmable storage Data types and data structures: encoding and representations Instruction set Instruction formats Modes of addressing and accessing data items and instructions Exceptional conditions CS1104-P2-1 Introduction

Questions Computer architecture is a study of instruction set architecture only. programming language only. machine organisation only. (a) and (c) (a), (b) and (c) Instruction set architecture is an important interface between digital circuit and datapath control. application software and operating system. application software and hardware organisation. compiler and programming language. high-level programming language and assembly language. [Answer] [Answer] CS1104-P2-1 Introduction

Questions (2) Which of the following does not belong to the definition of an ISA? Instruction formats and types. Compilation of a C program into machine code. Encoding and representation of data in memory. Modes of addressing and accessing data in memory. None of the above. Which of the following statements is true? Hardware implementation of machine organization is part of the instruction set architecture definition. Instruction set architecture is an interface between the assembly language and the machine language. A Pentium II processor running at 450 MHz & a Pentium II processor running at 500 MHz have the same ISA. Computer architecture is a subset of the instruction set architecture. [Answer] [Ans] CS1104-P2-1 Introduction

Questions (3) Which of the following statements is true about ISA? If two machines can read and understand the same piece of memory data, they must have the same ISA. If two machines have the same ISA, they must have the same performance. In general, executable codes for one ISA cannot be run on another, different ISA. The ISA of a processor defines the hardware implementation of the processor. None of the above. State whether this statement is true or false: “Changing the hardware machine organisation will definitely change the instruction set architecture (ISA).” [Answer] [False] CS1104-P2-1 Introduction

Questions (4) Which of the following can be considered as part of the ISA design? Specification of high level languages such as JAVA or “C”. Compiler that translates high level language programs into machine language codes. Machine instruction types such as “ADD” or “LOAD”. Data accessing method by the processor. Implementation of hardware functional units in the processor. [Answer: (c), (d)] CS1104-P2-1 Introduction

Clock Cycles A synchronous system is synchronised according to a clock. Falling edge Rising edge Clock period A clock cycle is the duration between two consecutive rising (falling) edges, and its duration is also known as the clock period. CS1104-P2-1 Introduction

Clock Cycles (2) The clock frequency is the reciprocal of clock period, measured in Hertz (Hz): number of cycles per second. A clock with period of 250ns (nano-seconds) has a frequency of 4MHz. A B Clock A has twice the clock period than that of clock B, and half the frequency of B’s. CS1104-P2-1 Introduction

Central Processing Unit (CPU) CPU = Control Unit + ALU + Registers. Control Unit: monitors and directs sequences of instructions. ALU (Arithmetic-Logic Unit): performs simple arithmetic and logical operations. Examples: Add, subtract, and, or, invert, increment, etc. A B ALU select R = A op B n-bits operations R CS1104-P2-1 Introduction

Central Processing Unit (CPU) (2) Registers: Fast memories in the CPU, storing operands, temporary results and status information. General-purpose registers and special registers: PC (program counter) ACC (accumulator) IR (instruction register) MAR (memory address register) MBR (memory buffer register) or MDR (memory data register) CS1104-P2-1 Introduction

Code Execution Program in High-level language (C, Pascal, etc) Compile program into assembly language Assemble program to machine language Link multiple machine-language programs to one program Load program into computer’s memory Execute program CS1104-P2-1 Introduction

Code Execution (2) Instruction Fetch Decode Operand Execute Result Store Next Instruction execution cycle: fetch, decode, execute. Fetch: fetch next instruction (using PC) from memory into IR. Decode: decode the instruction. Execute: execute instruction. CS1104-P2-1 Introduction

Memory Memory stores programs and data. Definitions: 1 byte = 8 bits 1 word: in multiple of bytes; a unit of transfer between main memory and registers, usually size of register. 1 KB (kilo-bytes) = 210 bytes; 1 MB (mega-bytes) = 220 bytes; 1 GB (giga-bytes) = 230 bytes; 1TB (tera-bytes) = 240 bytes. Desirable properties: fast access, large capacity, economical cost, non-volatile. However, most memory devices do not possess all these properties. CS1104-P2-1 Introduction

Memory (2) Memory hierarchy: Fast, expensive (small numbers), volatile registers main memory disk storage magnetic tapes Fast, expensive (small numbers), volatile Slow, cheap (large numbers), non-volatile CS1104-P2-1 Introduction

Up to 2k addressable locations. Memory (3) Data transfer: Address k-bit address bus 1 2 3 4 5 Processor MAR MDR Memory : n-bit data bus Control lines (R/W, etc.) Up to 2k addressable locations. CS1104-P2-1 Introduction

Memory (4) A memory unit stores binary information in groups of bits called words. The data consists of n lines (for n-bit words). Data input lines provide the information to be stored (written) into the memory, while data output lines carry the information out (read) from the memory. The address consists of k lines which specify which word (among the 2k words available) to be selected for reading or writing. The control lines Read and Write (usually combined into a single control line Read/Write) specifies the direction of transfer of the data. CS1104-P2-1 Introduction

Memory (5) Block diagram of a memory unit: n data input lines 2k words n bits per word k address lines k Read/Write n n data input lines n data output lines CS1104-P2-1 Introduction

Memory (6) The Write operation: The Read operation: Transfers the address of the desired word to the address lines. Transfers the data bits (the word) to be stored in memory to the data input lines. Activates the Write control line (set Read/Write to 0). The Read operation: Activates the Read control line (set Read/Write to 1). CS1104-P2-1 Introduction

Memory (7) The Read/Write operation: Two types of RAM: Static and dynamic. Static RAMs use flip-flops as the memory cells. Dynamic RAMs use capacitor charges to represent data. Though simpler in circuitry, they have to be constantly refreshed. CS1104-P2-1 Introduction

Memory (8) A single memory cell of the static RAM has the following logic and block diagrams: R S Q Input Select Output Read/Write BC Logic diagram Block diagram CS1104-P2-1 Introduction

Memory (9) Logic construction of a 4 x 3 RAM (with decoder and OR gates): CS1104-P2-1 Introduction

Block diagram of a 1K x 8 RAM chip Memory (10) An array of RAM chips: memory chips are combined to form larger memory. A 1K x 8-bit RAM chip: Block diagram of a 1K x 8 RAM chip RAM 1K x 8 DATA (8) ADRS (10) CS RW Input data Address Chip select Read/write (8) Output data 8 10 CS1104-P2-1 Introduction

Memory (11) 4K x 8 RAM. Address Input data 2x4 decoder S0 1 2 S1 3 ADRS (10) CS RW Read/write (8) Output data 0–1023 1024 – 2047 2048 – 3071 3072 – 4095 Input data 8 lines 1 2 3 2x4 decoder Lines 0 – 9 11 10 S0 S1 Address 4K x 8 RAM. CS1104-P2-1 Introduction

Memory (12) Another example: 19-bit internal chip address 2-bit decoder addresses 21-bit A 1 19 512k X 8 memory chip 20 D 31-24 7-0 23-16 15-8 Chip select 512K x 8 memory chip 19-bit address 8-bit data input/output Another example: Organization of a 2M  32 memory module using 512K  8 static memory chips. CS1104-P2-1 Introduction

End of file