OSIAC Read OSIAC 5362 posted on the course website

Similar documents
Grundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss

CSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1

COSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)

EE 3170 Microcontroller Applications

The 6502 Instruction Set

instruction 1 Fri Oct 13 13:05:

The Assembly Language of the Boz 5

Computer Organization II CMSC 3833 Lecture 33

Microcontroller Intel [Instruction Set]

Chapter 3 Machine Instructions & Programs. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

H8/300L Series Programming Manual

2. ADDRESSING METHODS

TYPES OF INTERRUPTS: -

INSTRUCTION SET OF 8085

INTRODUCTION TO BRANCHING. There are two forms of unconditional branching in the MC68000.

MOS 6502 Architecture

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ).

8085 INSTRUCTION SET INSTRUCTION DETAILS

SCRAM Introduction. Philipp Koehn. 19 February 2018

Lecture 6 Assembly Programming: Branch & Iteration


EE 3170 Microcontroller Applications

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

ARM Assembly Language. Programming

(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

Lecture 04: Machine Instructions

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

CHAPTER 8: Central Processing Unit (CPU)

Microprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman

INSTRUCTION SET AND EXECUTION

Programming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD

Programming the Motorola MC68HC11 Microcontroller

Unsigned Binary Integers

Assembly Language Programming of 8085

Unsigned Binary Integers

LC-3 Instruction Set Architecture. Textbook Chapter 5

Motorola 6809 and Hitachi 6309 Programmer s Reference

CPU Design John D. Carpinelli, All Rights Reserved 1

Basic Processor Design

Table 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory

Assembly Language Programming of 8085

Regarding the change of names mentioned in the document, such as Mitsubishi Electric and Mitsubishi XX, to Renesas Technology Corp.

Mark II Aiken Relay Calculator

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Introduction to Computer. Chapter 5 The LC-3. Instruction Set Architecture

A. CPU INSTRUCTION SET SUMMARY

Levels of Programming. Registers

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

H8/500 Series Programming Manual

Homework 2. Lecture 6: Machine Code. Instruction Formats for HW2. Two parts: How to do Homework 2!!!!

Course Administration

9/25/ Software & Hardware Architecture

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

Computer Architecture

Code segment Stack segment

... Executing conditional instructions

EE 3170 Microcontroller Applications

STEVEN R. BAGLEY ARM: PROCESSING DATA

THE MICROPROCESSOR Von Neumann s Architecture Model


CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

A First Look at Microprocessors

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

10-1 C D Pearson Education, Inc. M. Morris Mano & Charles R. Kime LOGIC AND COMPUTER DESIGN FUNDAMENTALS, 4e

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

Chapter. Computer Architecture

20/08/14. Computer Systems 1. Instruction Processing: FETCH. Instruction Processing: DECODE

The PAW Architecture Reference Manual

8051 Overview and Instruction Set

Notes: The Marie Simulator

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test

MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES

Introduction to Embedded Microcomputer Systems Lecture 8.1. Computers in the future may weigh no more than 1.5 tons Popular Science, 1949

ECE232: Hardware Organization and Design

CS401 - Computer Architecture and Assembly Language Programming Glossary By

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

LC-3 Instruction Set Architecture

68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6

CN310 Microprocessor Systems Design

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

Lecture 11: Control Unit and Instruction Encoding

Computer System Architecture

SN8F5000 Family Instruction Set

Chapter 2 Instruction Set Architecture

Chapter 7 Central Processor Unit (S08CPUV2)

Processing Unit CS206T

A3 Computer Architecture

Instructions: Language of the Computer

EE 361 University of Hawaii Fall

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science & Engineering Indian Institute of Technology, Kanpur

Math 230 Assembly Programming (AKA Computer Organization) Spring 2008

Q. Classify the instruction set of 8051 and list out the instructions in each type.

Assembler. Lecture 8 CS301

bits 5..0 the sub-function of opcode 0, 32 for the add instruction

Module 5 - CPU Design

Instruction Sets: Characteristics and Functions Addressing Modes

Transcription:

OSIAC 5362 Read OSIAC 5362 posted on the course website

The Basic Structure of Control Unit m CLK Run/Inhibit Control Step Counter m Preset (to any new state) Reset IR Decoder/Encoder (combinational logic) Status Flag Condition Codes Control Signals mostly data transfers between registers

OSIAC 5362 In the following lectures, we will cover a new processor OSIAC 5362 developed by The Ohio State University We will develop the control unit for the OSIAC 5362 Write the microinstructions to implement the instruction set with associated addressing modes We will compare the instructions and addressing modes with the example computer because many are similar

Register Structure of OSIAC 5362 There are four registers R0 15 0 AC: Accumulator R1 X: Index register R2 SP: System stack pointer R3 PC: Program counter Also 4 condition code bits C V Z N Carry out, Overflow, Zero, Negative

Organized as 16-bit words Not byte addressable No long words One or more words long Operands and Addresses Instruction Types - Opcode word + others needed by addressing mode Four types Double operand Single operand Branch instruction Special instruction

Addressing Modes Seven basic addressing modes similar to the example machines Mode Name Assembler Syntax Operand* 0 Register Rk [Rk] 1 Register Indirect (Rk) [[Rk]] 2 Autoincrement (Rk)+ [[Rk]] then [Rk] + 1 Rk 3 Autodecrement -(Rk) [Rk] 1 Rk then [[Rk]] 4 Index n(rk) [n+[rk]] 5 Absolute n [n] 6 Immediate #n n * Operand is for arithmetic instructions. JUMP type instruction use is for effective address (EA).

Instructions Double operand instructions - 4 bit opcode - Instruction defines src and dst (2 operands) - There are addressing fields for each operand: 4 bits (mode) + 2 bits (register number) OP2 SAD DAD S D 15 12 11 8 7 4 3 2 1 0 OP2: op code SAD: source addressing mode DAD: destination addressing mode S: source register number D: destination register number ADD (op code = 1), SUB (=2), MOVE (=3), EXG (=4), OR (=5), AND (=6) Condition codes set accordingly

Use of Condition Code C for Borrow in Subtract Operations Example No borrow 1 1 0 1-3 1 1 0 1-3 - 1 0 0 1 -(-7) 0 1 1 1 7 0 0 1 0 0 4 1 0 1 0 0 4 Computer does (2 s complement addition) Carry out is not set in subtraction C = 0 Needs borrow 0 0 1 1 3 0 0 1 1 3-0 1 1 1-7 1 0 0 1 +(-7) 1 1 0 0 12 0 1 1 0 0 Carry out is set in subtraction C = 1

Single operand instructions Instructions (continued) - 4 bit opcode in bits 11-8. - Instruction defines dst only (1 operand) - There is one addressing field for the operand: 4 bits (mode) + 2 bits (register number) OP1: op code 0000 OP1 DAD XX D 15 12 11 8 7 4 3 2 1 0 DAD: destination addressing mode D: destination register number CLR (op code = 1), INC (=2), DEC (=3), NEG (=4), COM (=5), JMP (=6), JSR (=7), TST (=8) Condition codes set There are 8 instructions accordingly - NEG gets 2 s complement - JMP and JSR both EA(dst) PC, JSR also stores the returning address in STACK

Instructions (continued) Branch Instructions e.g. BEQ (2 words) Uses relative address (branch relative to where you are) Offset = 2 nd word First Word A branch occurs if the following expression is true Second Word IR5 [IR3 (IR4 C) + IR2 (IR4 V) + IR1 (IR4 Z) + IR0 (IR4 N)] PCUPD = PCoriginal + 2, [PCUPD] + Offset PC Special Instructions 0000 0000 10 I S/C CVZN Offset 15 12 11 8 7 6 5 4 3 2 1 0 Return from subroutine RTS, opcode = $0080 [[SP]] PC, [SP]+1 SP Set/Clear Condition Codes, opcode = 0000 0000 001 S/C CVZN HALT halt, opcode = $0000 15 12 11 8 7 4 3 2 1 0

Condition Codes Make sense of the condition codes can an operation cause a condition change? AND, OR, MOVE cannot get a carry or overflow ADD, SUB all CC s can change INC, DEC like ADD and SUB #1, all can change TST cannot cause carry or overflow, N, Z, possible CLR only Z=1; N=0, V=0, C=0 JMP, JSR not moving/operating on data, none of CC s is affected

Condition Branch Bits 3 2 1 0 marked C, V, Z, N set to 1 if that is the condition to test (most often just one at a time) Bit 4 S/C 1 test if condition is set 0 test if condition is clear Bit 5 Invert inverts the sense of everything tested to decide whether or not to branch generally 0

Opcodes for Branch Instructions IR5 IR4 IR3 IR2 IR1 IR0 Opcode (I) (S/C) (C) (V) (Z) (N) BEQ (equal) 0 1 0 0 1 0 $0092 IR1 (IR4 Z)=Z BNE (not equal) 0 0 0 0 1 0 $0082 = Z BPL (plus) 0 0 0 0 0 1 $0081 IR0 (IR4 N) =N BMI (minus) 0 1 0 0 0 1 $0091 = N BLS(low/same) 0 1 1 0 1 0 $009A IR3 (IR4 C) +IR1 (IR4 Z) = C+Z BHI (high) 1 1 1 0 1 0 $00BA = C+Z

Addressing Modes Allowed Each instruction is allowed different addressing modes ADD: s source from anywhere d immediate would not make sense AND: something you do to data, not to address Bcc: relative addressing which is just n(pc) JMP: operand is EA (where jump to)