Explain giving examples as appropriate, the essential features of an instruction set of a CPU. Each instruction must contain 4 basic components: Operation.

Slides:



Advertisements
Similar presentations
Chapter 2: Data Manipulation
Advertisements

Instruction Set Design
by Wannarat Computer System Design Lecture 2 Instruction Set Architecture.
ARITHMETIC LOGIC SHIFT UNIT
 Suppose for a moment that you were asked to perform a task and were given the following list of instructions to perform:
The CPU Revision Typical machine code instructions Using op-codes and operands Symbolic addressing. Conditional and unconditional branches.
TK 2633 Microprocessor & Interfacing
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
Computer Organization and Architecture Tutorial 2 Kenneth Lee.
Recap – Our First Computer WR System Bus 8 ALU Carry output A B S C OUT F 8 8 To registers’ input/output and clock inputs Sequence of control signal combinations.
Dale & Lewis Chapter 5 Computing components. Let’s design a computer Generic CPU with registers −Program counter (PC) – 5 bits (size of addresses) −Instruction.
1 Sec (2.3) Program Execution. 2 In the CPU we have CU and ALU, in CU there are two special purpose registers: 1. Instruction Register 2. Program Counter.
UNDERSTANDING ASSEMBLY LANGUAGE.
Lecture 17 Today’s Lecture –Instruction formats Little versus big endian Internal storage in the CPU: stacks vs. registers Number of operands and instruction.
Dr. Rabie A. Ramadan Al-Azhar University Lecture 6
CSCI 4717/5717 Computer Architecture
1 4.2 MARIE This is the MARIE architecture shown graphically.
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
GCSE Computing#BristolMet Session Objectives#11 MUST identify what program instructions consist of SHOULD describe how instructions are coded as bit patterns.
Chapter 4 MARIE: An Introduction to a Simple Computer.
CPU Design. Introduction – The CPU must perform three main tasks: Communication with memory – Fetching Instructions – Fetching and storing data Interpretation.
Module 8 Part B Adapted By and Prepared James Tan © 2001.
Chapter 8: The Very Simple Computer
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
Lecture 14 Today’s topics MARIE Architecture Registers Buses
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Lec 5 Basic Computer Organization
Input-Output Organization
MARIE: An Introduction to a Simple Computer. 2 MARIE Our model computer, the Machine Architecture that is Really Intuitive and Easy, MARIE, was designed.
D75P 34 – HNC Computer Architecture
Computer Structure & Architecture 7b - CPU & Buses.
September 26, 2001Systems Architecture I1 Systems Architecture I (CS ) Lecture 2: Implementation of a Simplified Computer Jeremy R. Johnson Wednesday,
Represents different voltage levels High: 5 Volts Low: 0 Volts At this raw level a digital computer is instructed to carry out instructions.
Computer Systems Organization
ECEG-3202 Computer Architecture and Organization Chapter 6 Instruction Sets: Addressing Modes and Formats.
Dale & Lewis Chapter 5 Computing components
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Assembly Language Programming of 8085 BY Prof. U. V. THETE Dept. of Computer Science YMA.
Operand Addressing And Instruction Representation Tutorial 3.
Designing a CPU –Reading a programs instruction from memory –Decoding the instruction –Executing the instruction –Transferring Data to/From memory / IO.
Jeremy R. Johnson William M. Mongan
8085 INTERNAL ARCHITECTURE.  Upon completing this topic, you should be able to: State all the register available in the 8085 microprocessor and explain.
Central Processing Unit Decode Cycle. Central Processing Unit Current Instruction Register (CIR) I1 The fetch cycle has transferred an instruction from.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
First Foray into Programming (the hard way). A reminder from last lesson: A machine code instruction has two parts:  Op-code  Operand An instruction.
F453 Module 8: Low Level Languages 8.1: Use of Computer Architecture.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Displacement (Indexed) Stack
CS 270: Mathematical Foundations of Computer Science
Immediate Addressing Mode
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
Lesson Objectives A note about notes: Aims
Architecture Review Instruction Set Architecture
A Closer Look at Instruction Set Architectures
William Stallings Computer Organization and Architecture 8th Edition
Data Representation – Instructions
Processor Organization and Architecture
Systems Architecture I (CS ) Lecture 2: A Simplified Computer
ECEG-3202 Computer Architecture and Organization
8085 MICROPROCESSOR 8085 CPU Registers and Status Flags S Z AC P C A B
Classification of instructions
ECE 352 Digital System Fundamentals
Instruction execution and ALU
COMPUTER ARCHITECTURE
Sec (2.3) Program Execution.
Little Man Computer.
Presentation transcript:

Explain giving examples as appropriate, the essential features of an instruction set of a CPU. Each instruction must contain 4 basic components: Operation code: specifies the operation to be performed, expressed as a binary code. Source operand references: operands required for the instruction are specified Result reference: where should the result of the operation be placed? Next instruction reference: how / where is the next instruction to be found An instruction set should be functionally complete and should permit the user to formulate any high-level data processing task. Explain giving examples as appropriate, the essential features of an instruction set of a CPU. Each instruction must contain 4 basic components: Operation code: specifies the operation to be performed, expressed as a binary code. Source operand references: operands required for the instruction are specified Result reference: where should the result of the operation be placed? Next instruction reference: how / where is the next instruction to be found An instruction set should be functionally complete and should permit the user to formulate any high-level data processing task.

3 address instructions - Both operands and the result are explicitly contained in the instruction word – Example: X = Y + Z. 2 address instructions – One of the addresses is used to specify both an operand and the result location – Example: X = X + Y 1 address instructions – Traditional accumulator-based operations – Example: Acc = Acc + X 0 address instructions – This relies on use of registers only and no access to address bus is made directly. All addresses are implied, as in register-based operations Example: TBA (transfer register B to A) What types of instructions would a CPU typically be required to support

Explain briefly the steps that you would take to design an instruction set for a 16-bit CPU. 1.Decide on the instructions that you want to support as given above. Describe these in RTL notation for reference. 2.Allocate the number of bits that you need to accommodate all the instructions you identified in 1 above. i.e. for 16 instructions use 4 bits. 3.Decide the addressing mode for the operand fetch and allocate the bits for this (i.e. direct/indirect use 1 bit. This stage could be incorporated in 2 above to satisfy the number of instructions supported. Technically this now gives 32 possible instructions and that may be too many. 4.Allocate the rest of bit to the operand value

Decode the following code using the instruction set information provided below 0F FF

Convert hexadecimal to binary 0F = FF = 60 = 05 = 23 = 33 = 71 = 02 =

Convert hexadecimal to binary 0F = FF = = = = = = =

Map 16 bits onto architecture diagram 0F = FF = => 60 = = => 23 = = => 71 = = =>

Map 16 bits onto architecture diagram 0F = FF = => 60 = = => 23 = = => 71 = = =>

Convert opcode to instruction mnemonics

Convert opcode to instruction mnemonics and xplain what registers and memory are affected at each step LDA 0FFAC<-0FF SUB 5ACAC<AC-5 STA [333]M [333]<-AC;MEMORY LOCATION 333 STORES ACCUMULATOR VALUE WHICH IS CHANGING ACCORDING TO THE VALUE AC-5. JNZ [102]JUMP IF NOT ZERO to 102 i.e. loop while not zero