Computer Organization II CMSC 3833 Lecture 33

Similar documents
Notes: The Marie Simulator

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

CC312: Computer Organization

Chapter 4. MARIE: An Introduction to a Simple Computer. Chapter 4 Objectives. 4.1 Introduction. 4.2 CPU Basics

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. Introduc>on to MARIE

The MARIE Architecture

Problem Points Your Points Total 80

Chapter 4. MARIE: An Introduction to a Simple Computer

Computer Architecture. CSE 1019Y Week 16. Introduc>on to MARIE

2.2 THE MARIE Instruction Set Architecture

CSE100 Lecture03 Machines, Instructions, and Programs Introduction to Computer Systems

Chapter 4. Chapter 4 Objectives. MARIE: An Introduction to a Simple Computer

MARIE: An Introduction to a Simple Computer

MARIE: An Introduction to a Simple Computer

CS311 Lecture: The Architecture of a Simple Computer

CMSC 3833 Lecture 37

Chapter 4. Chapter 4 Objectives

CHAPTER 4 MARIE: An Introduction to a Simple Computer

CDA 3103 Computer Organization Homework #7 Solution Set

SCRAM Introduction. Philipp Koehn. 19 February 2018

MARIE: An Introduction to a Simple Computer

Chapter 16. Control Unit Operation. Yonsei University

William Stallings Computer Organization and Architecture

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

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

Processing Unit CS206T

There are four registers involved in the fetch cycle: MAR, MBR, PC, and IR.

Computer Systems and Networks. ECPE 170 Jeff Shafer University of the Pacific. MARIE Simulator

Lecture 5: Computer Organization Instruction Execution. Computer Organization Block Diagram. Components. General Purpose Registers.

CPU Structure and Function

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

ECE 375 Computer Organization and Assembly Language Programming Winter 2018 Solution Set #2

Register Transfer and Micro-operations

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

COMARCH. COMPUTER ARCHITECTURE TERM 3 SY COMPUTER ENGINEERING DE LA SALLE UNIVERSITY Quiz 1

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

COMPUTER ORGANIZATION

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Module 5 - CPU Design

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

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

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

Wednesday, September 13, Chapter 4

Unit II Basic Computer Organization

COSC 243. Computer Architecture 1. COSC 243 (Computer Architecture) Lecture 6 - Computer Architecture 1 1

William Stallings Computer Organization and Architecture

CPU Structure and Function

session 7. Datapath Design

Computer Architecture

Wednesday, February 4, Chapter 4

STRUCTURE OF DESKTOP COMPUTERS

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

Blog -

THE MICROPROCESSOR Von Neumann s Architecture Model

Chapter. Computer Architecture

Programming Level A.R. Hurson Department of Computer Science Missouri University of Science & Technology Rolla, Missouri

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

CHAPTER 8: Central Processing Unit (CPU)

DC57 COMPUTER ORGANIZATION JUNE 2013

Teaching London Computing

Arab Open University. Computer Organization and Architecture - T103

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

Computer Organisation CS303

csitnepal Unit 3 Basic Computer Organization and Design

UNIT- 5. Chapter 12 Processor Structure and Function

OSIAC Read OSIAC 5362 posted on the course website

Computer Architecture (part 2)

Designing Computers. The Von Neumann Architecture. The Von Neumann Architecture. The Von Neumann Architecture

The Von Neumann Architecture. Designing Computers. The Von Neumann Architecture. CMPUT101 Introduction to Computing - Spring 2001

IA-32 architecture. PDP8/e architecture Arithmetic. IA-32 architecture (cont)

CMPUT101 Introduction to Computing - Summer 2002

A3 Computer Architecture

Computer Organization and Design

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

Digital System Design Using Verilog. - Processing Unit Design

Introduction to CPU architecture using the M6800 microprocessor

Computer Architecture Lecture No.10,11

Problem Set 1 Solutions

Objective now How are such control statements registers and other components Managed to ensure proper execution of each instruction

Computer Organization (Autonomous)

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

2010 Summer Answers [OS I]

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

AS/A Level Computing Syllabus 2011

The MIPS Processor Datapath

Programming Using C Homework 5

Computer Organization

BASIC COMPUTER ORGANIZATION AND DESIGN

Author : Dalbir Singh, Computer Science Deptt. CPU Structure and Functions. 1. Processor Organization

Computer Architecture and Organization: L06: Instruction Cycle

Chapter 4. MARIE: An Introduction to a Simple Computer 4.8 MARIE 4.8 MARIE A Discussion on Decoding

Chapter 10 - Computer Arithmetic

Basic Computer Organization and Design Part 2/3

5-1 Instruction Codes

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

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

Chapter 2 Instruction Set Architecture

Transcription:

Term MARIE Definition Machine Architecture that is Really Intuitive and Easy 4.8.1 The Architecture Figure s Architecture Characteristics: Binary, two s complement Stored program, fixed word length Word (but not byte) addressable 4K (4096) words of main memory (this implies 12 bits per address) 16-bit data (words have 16 bits) 16-bit instructions: 4 bits for the opcode and 12 bits for the operand A 16-bit accumulator (AC) A 16-bit instruction register (IR) A 16-bit memory buffer register (MBR) A 12-bit memory address register (MAR) An 8-bit input register An 8-bit output register 4.8.2 Registers and Buses Register Description AC The accumulator holds data values. This is a general-purpose register and it holds data that the CPU needs to process. Most computers today have multiple general-purpose registers. 1

MAR MBR PC IR InREG OutREG status The memory address register hold the memory address of the data being referenced. The memory buffer register holds either the data just read from memory or the data ready to be written to memory. The program counter holds the address of the next instruction to be executed in the program. The instruction register holds the next instruction to be executed. The input register holds data from the input device. The output register holds data for the output device. The status or flag register holds information indicating various conditions, such as an overflow in the ALU, whether or not the4 result of an arithmetic or logical operation is zero, if a carry bit should be used in a computation, and when a result is negative. 2

Figure 4.9 Datapath in MARIE To copy data from one place to another, you must specify the origin and destination. For example, if you wish to copy data from the PC to the IR, then the origin is 2 (010 2 ) and the destination is 7 (111 2 ). 3

4.8.3 Instructions Set Architecture Figure 4.10 MARIE s Instruction Format Instruction Number Bin Hex Instruction Meaning 0000 0 JnS X Store the PC address X and jump to X+1 0001 1 Load X Load the contents of address X. 0010 2 Store X Store the contents of the AC at address X. 0011 3 Add X Add the contents of address X to the AC and store the result in the AC. 0100 4 Subt X Subtract the contents of address X from the AC and store the result in the AC. 0101 5 Input Input a value from the keyboard into the AC. 0110 6 Output Output the value in the AC to the display. 0111 7 Halt Terminate the program. 1000 8 Skipcond Skip the next instruction on condition. 1001 9 Jump X Load the value of X into the PC. 1010 A Clear Put all zeros in the AC 1011 B AddI Add indirect: Go to address X. Use the value at X as the actual address of the data operand to add to the AC. 1100 C JumpI X Jump indirect: Go to address X. Use the value at X as the actual address of the location to jump to. 1101 D LoadI X Load indirect: Go to address X. Use the value at X as the actual address of the operand to load into the AC. 1110 E StoreI X Store indirect: Go to address X. Use the value at X as the destination address for storing the value in the 1111 F Table 4.2 MARIE s Instruction Set (Complete) 4

Conditional branching: Bits 11 10 Meaning 00 skip if the AC is negative 01 skip if the AC is equal to 0 10 skip if the AC is greater than 0 opcode address (operand) skip if the AC is negative 1 0 0 0 0 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 opcode address (operand) skip if the AC is equal to 0 1 0 0 0 0 1 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 opcode address (operand) skip if the AC is greater than 0 1 0 0 0 1 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 4.8.4 Register Transfer Notation Used to specify microoperations. A microoperation is an operation that can be performed in one clock cycle. Notation Meaning A transfer of information. For example, MMMMMM XX, the memory address register is assigned the value of XX. MM[XX] MM is memory and XX is an address in the memory. MM[XX] is value in memory and address XX. Instruction RTN Explanation Load X Store the address portion of the instruction X 12 bits into the memory address register. Store the contents of memory at the address in the memory address register to the memory buffer register. AC MBR register to the 5

Instruction RTN Explanation Store X, MBR AC Simultaneously, store the address portion of the instruction X 12 bits into the memory address register and store the value of the accumulator in the memory buffer register. M[MAR] MBR register in memory at the address in the memory address register. Add X Store the address portion of the instruction X 12 bits into the memory address register. AC AC + MBR register in memory at the address in the memory address register. Add the value in the accumulator and the memory buffer register and store the sum in the Subt X Store the address portion of the instruction X 12 bits into the memory address register. AC AC-MBR register in memory at the address in the memory address register. Subtract the value in the memory buffer register from the accumulator and store the difference in the Input AC InREG Store the value in the input register to the Output OutREG AC Store the value in the accumulator to the output register. Halt Skipcond If IR[11-10]=00 then If AC<0 then PC PC+1 else If IR[11-10]=01 then If AC=0 then PC PC+1 else If IR[11-10]=10 then If AC>0 then PC PC+1 No operations are performed on registers; the machine simply ceases execution of the program. If bits 10 and 11 of the IR are 00 then If bits 10 and 11 of the IR are 01 then If bits 10 and 11 of the IR are 10 then Jump X PC X (PC IR[11-0]) Store the least significant 12 bits of the instruction register into the program counter. 6

Instruction RTN Explanation Clear Clear the Assign zero to the AC 0 Assign zero to the AddI X JumpI X LoadI X StoreI X MAR MBR AC AC + MBR PC MBR MAR MBR AC MBR MAR MBR MBR AC M[MAR[ AC Add Indirect. Find the address of the operand in X. First, fetch the address stored at X. Call this address Y. Then, fetch the value at Y. Call this value Z. Add Z to the Jump Indirect. Find the address of the operand in X. First, fetch the instruction address stored at X. Call this address Y. Transfer control to the instruction at Y. Assign Y to the PC. Load Indirect. Find the address of the operand in X. First, fetch the address stored at X. Call this address Y. Next, fetch the value stored at Y. Assign Y to the Store Indirect. Find the address of the destination address at location X. First, fetch the address stored at X. Call this address Y. Assign the value in the accumulator to the memory location at address Y. 7