Hardware Level Organization

Similar documents
The Stored Program Computer

IC220 SlideSet #2: Instructions (Chapter 2)

Chapter 3. Instructions:

Computer Architecture

Computer Model. What s in a computer? Processor Memory I/O devices (keyboard, mouse, LCD, video camera, speaker, disk, CD drive, )

Chapter 2: Instructions:

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Announcements HW1 is due on this Friday (Sept 12th) Appendix A is very helpful to HW1. Check out system calls

CSE 141 Computer Architecture Spring Lecture 3 Instruction Set Architecute. Course Schedule. Announcements

ELEC / Computer Architecture and Design Fall 2013 Instruction Set Architecture (Chapter 2)

Processing Unit CS206T

Math 230 Assembly Programming (AKA Computer Organization) Spring MIPS Intro

Chapter 2. Instructions:

ECE369. Chapter 2 ECE369

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Chapter 4. The Processor

ECE232: Hardware Organization and Design

Lecture 3 Machine Language. Instructions: Instruction Execution cycle. Speaking computer before voice recognition interfaces

Chapter 4. The Processor

Stored Program Concept. Instructions: Characteristics of Instruction Set. Architecture Specification. Example of multiple operands

Architecture I. Computer Systems Laboratory Sungkyunkwan University

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

ECE 486/586. Computer Architecture. Lecture # 7

Chapter 4. The Processor Designing the datapath

ECE232: Hardware Organization and Design

AS/A Level Computing Syllabus 2011

Lecture 4: Instruction Set Architecture

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4

Alternate definition: Instruction Set Architecture (ISA) What is Computer Architecture? Computer Organization. Computer structure: Von Neumann model

Topic Notes: MIPS Instruction Set Architecture

CPE300: Digital System Architecture and Design

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Chapter 3 MIPS Assembly Language. Ó1998 Morgan Kaufmann Publishers 1

CHAPTER 5 A Closer Look at Instruction Set Architectures

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Review of instruction set architectures

Instructions: MIPS arithmetic. MIPS arithmetic. Chapter 3 : MIPS Downloaded from:

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Instruction Sets: Characteristics and Functions

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Processor design - MIPS

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

COMP3221: Microprocessors and. and Embedded Systems. Instruction Set Architecture (ISA) What makes an ISA? #1: Memory Models. What makes an ISA?

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Real instruction set architectures. Part 2: a representative sample

CSEE 3827: Fundamentals of Computer Systems

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Computer Architecture

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

THE MICROPROCESSOR Von Neumann s Architecture Model

Review Questions. 1 The DRAM problem [5 points] Suggest a solution. 2 Big versus Little Endian Addressing [5 points]

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

Running Applications

CS2304-SYSTEM SOFTWARE 2 MARK QUESTION & ANSWERS. UNIT I INTRODUCTION

Microprocessors. Microprocessors and rpeanut. Memory. Eric McCreath

Microprocessors and rpeanut. Eric McCreath

Chapter 4. The Processor

SCRAM Introduction. Philipp Koehn. 19 February 2018

Chapter 2 Instruction: Language of the Computer

Today s topics. MIPS operations and operands. MIPS arithmetic. CS/COE1541: Introduction to Computer Architecture. A Review of MIPS ISA.

Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , , Appendix B

Introduction. Datapath Basics

ADD R Operation : ACC = ACC + R SIZE : 1 byte, 8 bit Time : 3 T Cycle Work : Read R, Read ACC, Add, Write Result to ACC

CS3350B Computer Architecture MIPS Instruction Representation

Digital System Design Using Verilog. - Processing Unit Design

CSC 220: Computer Organization Unit 12 CPU programming

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

Lecture 5: Instruction Set Architectures II. Take QUIZ 2 before 11:59pm today over Chapter 1 Quiz 1: 100% - 29; 80% - 25; 60% - 17; 40% - 3

COMPUTER ORGANIZATION & ARCHITECTURE

CS222: MIPS Instruction Set

Machine Language Instructions Introduction. Instructions Words of a language understood by machine. Instruction set Vocabulary of the machine

Chapter 1. Computer Abstractions and Technology

CHAPTER 5 A Closer Look at Instruction Set Architectures

MIPS Instruction Set Architecture (1)

Instruction Set Architecture

Chapter 2 Data Manipulation

SISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:

Instruction Set Architecture. "Speaking with the computer"

CS 61C: Great Ideas in Computer Architecture Intro to Assembly Language, MIPS Intro

We will study the MIPS assembly language as an exemplar of the concept.

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

101 Assembly. ENGR 3410 Computer Architecture Mark L. Chang Fall 2009

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

ECE 486/586. Computer Architecture. Lecture # 6

Five classic components

CC312: Computer Organization

Micro-Operations. execution of a sequence of steps, i.e., cycles

Introduction to the MIPS. Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University

A Processor. Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University. See: P&H Chapter , 4.1-3

General Purpose Processors

Processor (I) - datapath & control. Hwansoo Han

ECE 154A Introduction to. Fall 2012

CPU Structure and Function. Chapter 12, William Stallings Computer Organization and Architecture 7 th Edition

General purpose registers These are memory units within the CPU designed to hold temporary data.

Transcription:

Hardware Level Organization Intro MIPS 1 Major components: - memory - central processing unit - registers - the fetch/execute cycle CPU PC IR Ex Unit MAR MBR I/O AR I/O BR System Bus Main Memory 0 (the hardware process) I/O Module Data Data Data n-1 buffers PC IR MAR MBR I/O AR I/O BR = program counter = instruction register = memory address register = memory buffer register = I/O address register = I/O buffer register

Central Processing Unit Intro MIPS 2 Control - decodes instructions and manages CPU s internal resources Registers - general-purpose registers available to user processes - special-purpose registers directly managed in fetch/execute cycle - other registers may be reserved for use of operating system - very fast and expensive (relative to memory) - hold all operands and results of arithmetic instructions (on RISC systems) - save bits in instruction representation Data path or arithmetic/logic unit (ALU) - operates on data

Stored Program Concept Intro MIPS 3 s are collections of bits Programs are stored in memory, to be read or written just like data memory for data, programs, compilers, editors, etc. Main Memory 0 PC CPU MAR IR MBR Ex Unit I/O AR I/O BR Data Data Data n-1 Fetch & Execute Cycle s are fetched and put into a special register Bits in the register "control" the subsequent actions Fetch the next instruction and continue

Stored Program Concept Intro MIPS 4 Of course, on most systems several programs will be stored in memory at any given time. On most contemporary systems instructions of only one of those will be executed at any given instant. Main Memory PowerPoint pgm (machine code) vim (machine code) GIS source code (data) CPU PC IR Ex Unit MAR MBR I/O AR I/O BR g++ (machine code) The operating system will rapidly switch among the eligible processes, producing the illusion that several programs are executing at the same time.

Fetch/Execute Cycle Intro MIPS 5 Sometimes called the hardware process executes continuously. Fetch Stage Execute Stage START Fetch Next Execute HALT Steps: - fetch an instruction from memory to the instruction register - increment the program counter register (by the instruction length) - decode the instruction (in the control unit) - fetch operands, if any, usually from registers - perform the operation (in the data path); this may modify the PC register - store the results, usually to registers

Machine Language Intro MIPS 6 But, how is all of this driven? Machine language: - registers store collections of bits - all data and instructions must be encoded as collections of bits (binary) - bits are represented as electrical charges (more or less) - control logic and arithmetic operations are implemented as circuits, which are driven by the movement of electrical charges - so, the instructions directly manipulate the underlying hardware (cool, huh?) The collection of all valid binary instructions is known as the machine language. - what s valid depends on the design of the hardware, especially the control circuitry - must be formally specified - machine language is not human-friendly

Assembly Language Intro MIPS 7 More human-friendly syntax: - expressed in text, not in binary - instructions are identified by (more-or-less) mnemonic names - instruction operands may include registers, memory locations, or Aspects of assembly language: - unlike high-level languages, each instruction is extremely simple, so assembly language programs are much longer than corresponding high-level language programs - assembly language must be translated into machine language in order to be executed - assembly language is not usually any more portable across different hardware platforms that is machine language - most assembly languages are quite similar from a certain point of view

MIPS ISA Intro MIPS 8 We ll be working with the MIPS instruction set architecture (ISA) - similar to other architectures developed since the 1980's - almost 100 million MIPS processors manufactured in 2002 - used by NEC, Nintendo, Cisco, Silicon Graphics, Sony, 1400 1300 1200 1100 1000 900 800 Other SPARC Hitachi SH PowerPC Motorola 68K MIPS IA-32 ARM 700 600 500 400 300 200 100 0 1998 1999 2000 2001 2002

MIPS Registers Intro MIPS 9 Registers - 32 32-bit general-purpose registers, referred to as $0, $1,, $31-32 32-bit floating-point registers, referred to as $f0, $f1, $f31-16 64-bit floating-point registers, referred to as $f0, $f2, $f30 - conventions govern the use of the general registers We will, for now, adopt the view that the underlying computer is a black box that understands MIPS machine language.

Registers vs. Memory Intro MIPS 10 Operands to arithmetic and logical instructions must be registers or immediates. Compiler associates variables with registers What about programs with lots of variables? Control Input Memory Datapath Output Processor I/O

MIPS Assembly Language Intro MIPS 11 We will study the MIPS assembly language as an exemplar of the concept. MIPS assembly instructions each consist of a single token specifying the command to be carried out, and zero or more operation parameters: <opcode> par1 par2 parn The tokens are separated by commas. Indentation is insignificant to the assembler, but is certainly significant to the human reader. MIPS command tokens are short and mnemonic (in principle). For example: add lw sw jr The MIPS reference card bound in the front of P&H includes a complete listing of many of the MIPS commands you will need to understand and use.

MIPS Assembly Language Intro MIPS 12 MIPS operands include: - hardware registers - offset and base register - literal constants (immediate parameters) - labels Of course, MIPS assembly also allows comments. Simply, all characters from a # character to the end of the line are considered a comment. There are also some special directives, but those can wait...

Memory Organization Intro MIPS 13 Viewed as a large, single-dimension array, with an address. A memory address is an index into the array "Byte addressing" means that the index points to a byte of memory. 0 1 2 3 4 5 6... 8 bits of data 8 bits of data 8 bits of data 8 bits of data 8 bits of data 8 bits of data 8 bits of data

MIPS Memory Organization Intro MIPS 14 Bytes are nice, but most data items use larger "words" For MIPS, a word is 32 bits or 4 bytes. 0 4 8 12... 32 bits of data 32 bits of data 32 bits of data 32 bits of data Registers hold 32 bits of data 2 32 bytes with byte addresses from 0 to 2 32-1 2 30 words with byte addresses 0, 4, 8,... 2 32-4 Words are aligned, that is, each has an address that is a multiple of 4. MIPS can be either big-endian (that is, the address of each word is the address of the left-most byte of the word) or little-endian. This is important when viewing the contents of memory.