Instruction Clock Cycles Generally, 1 cycle per memory access: – 1 cycle to fetch instruction word – +1 cycle if or #Imm – +2 cycles.

Slides:



Advertisements
Similar presentations
Required:PM: Ch 8.1-3, pgs Recommended:Wiki: Microarchitecture Wiki: Addressing_mode Wiki: Three-state logicWiki: Microarchitecture Wiki: Addressing_mode.
Advertisements

Fetch-Execute cycle. Memory Read operation Read from memory.
The Fetch – Execute Cycle
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
CSC 3210 Computer Organization and Programming
RAT R1 R2 R3 R4 R5 R6 R7 Fetch Q RS MOB ROB Execute Retire.
Chapter 5 The LC-3.
Central Processing Unit
Adding the Jump Instruction
CS364 CH16 Control Unit Operation
S04: MSP430 Microarchitecture
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
NDG-L37-41Introduction to ASIC Design1 Design of a Simple Customizable Microprocessor * Chapter 7 and 15, “Digital System Design and Prototyping”  SIMP.
LC-3 Computer LC-3 Instructions
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
Computer Systems. Computer System Components Computer Networks.
Execution of an instruction
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
Class 9.1 Computer Architecture - HUJI Computer Architecture Class 9 Microprogramming.
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
Chapter 6 – MSP430 Micro-Architecture
Design and Synthesis of a RISC Stored-Program Machine
CPU Fetch/Execute Cycle
Computer Science 210 Computer Organization The Instruction Execution Cycle.
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA.
The structure COMPUTER ARCHITECTURE – The elementary educational computer.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Execution of an instruction
Fetch-execute cycle.
Computer Systems Organization
© BYU LC3-DC Page 1 ECEn 224 LC3-DC Designing The LC-3 Control IR PC enaMARMenaPC enaALU enaMDR ALU AB.
Computer Organization Instructions Language of The Computer (MIPS) 2.
Chapter 3 – Instruction Set Architecture. Instruction Length and Cycles.
RegDst 1: RegFile destination No. for the WR Reg. comes from rd field. 0: RegFile destination No. for the WR Reg. comes from rt field.
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.
מבוסס על שקפים מאת יאן ציטרין
Achieving Turing Completeness
Machine Code typically: word 1 words 2-3 words 4-5
Immediate Addressing Mode
Quiz 4.1 Four LEDs are attached to Port 4, bits 0 thru 3. Indicate which LEDs are ON/OFF after each instruction is executed. P4.7 P4.6 P4.5 P4.4 P4.3.
ECE 382 Lesson 4 Lesson Outline Readings
Decode and Operand Read
Multi-Cycle CPU.
Computer Science 210 Computer Organization
The fetch-execute cycle
CS/COE0447 Computer Organization & Assembly Language
Computer Science 210 Computer Organization
Single-Cycle CPU DataPath.
Topic 6 LC-3.
Datapath & Control MIPS
ADDRESSING MODES AND INSTRUCTION SET
Computer Science 210 Computer Organization
Computer Architecture and the Fetch-Execute Cycle
An Introduction to pipelining
Introduction to Micro Controllers & Embedded System Design
Computer Science 210 Computer Organization
THE FETCH-EXECUTE CYCLE.
Computer Concept and Practice
Instruction Set Summary
THE FETCH-EXECUTE CYCLE.
Problem: Consider the following two SRC code segments for implementing multiplication. Find which one is more efficient in terms of instruction count and.
Alternative datapath (book): Multiple Cycle Datapath
The Processor: Datapath & Control.
Computer Architecture
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

Instruction Clock Cycles Generally, 1 cycle per memory access: – 1 cycle to fetch instruction word – +1 cycle if or #Imm – +2 cycles if source uses indexed mode 1 st to fetch base address 2 nd to fetch source Includes absolute and symbolic modes – +2 cycles if destination uses indexed mode – +1 cycle if writing destination back to memory – +1 cycle if writing to PC (R0) – Jump instructions are always 2 cycles 1 MSP430 Clock Cycles

All Jumps = 2 Cycles

src IR temp PC add.w r5,r6 ;r6 <- r6 + r5 Address Bus dst ALU Registers 0x540a Address Bus Data Bus Memory 0x540a r5 r6

7 00 = Register Mode Addressing Modes Registers CPU Memory ADDER add.w r4,r10 ;r10 = r4 + r10 PC R10 R4 IR Data Bus (1 cycle) 0x540a PC ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (1 Cycle Instruction

Memory 8 01 = Indexed Mode Addressing Modes Registers Address Bus Data Bus (+1 cycle) CPU ADDER add.w 6(r4),r10 ;r10 = M(r4+6) + r10 0x0006 PC R10 R4 IR Data Bus (1 cycle) 0x541a PC ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (3 Cycle Instruction

Memory 9 10 = Indirect Register Mode Addressing Modes Registers Address Bus Data Bus (+1 cycle) CPU ADDER ;r10 = M(r4) + r10 PC R10 R4 IR Data Bus (1 cycle) 0x542a Address Bus 0x542a PC ALU +2 opcodeS-regAdb/wAsD-reg (2 Cycle Instruction

Memory 10 Addressing Modes Registers Data Bus (+1 cycle) CPU ADDER 11 = Indirect Auto-increment Mode ;r10 = M(r4+) + r10 PC R10 R4 IR Data Bus (1 cycle) 0x543a Address Bus PC 0x543a Address Bus 0002 ALU +2 opcodeS-regAdb/wAsD-reg (2 Cycle Instruction

Memory 11 Addressing Modes Registers Address Bus Data Bus (+1 cycle) CPU ADDER 01 w/R0 = Symbolic Mode ( PC Relative ) cnt add.w cnt,r10 ;r10 = M(cnt) + r10 0x000c PC R10 IR Data Bus (1 cycle) 0x501a PC ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (3 Cycle Instruction

Memory 12 Addressing Modes Registers Address Bus Data Bus (+1 cycle) CPU ADDER cnt 01 w/R2 = Absolute Mode 0000 add.w &cnt,r10 ;r10 = M(cnt) + r10 0xc018 PC R10 IR Data Bus (1 cycle) 0x521a PC ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (3 Cycle Instruction

Memory 13 Addressing Modes Registers CPU ADDER 11 w/R0 = Immediate Mode add.w #100,r10 ;r10 = r10 PC R10 Data Bus (+1 cycle) IR Data Bus (1 cycle) 0x503a PC 0x503a 0x0064 ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (2 Cycle Instruction

Memory 14 Addressing Modes Registers CPU ADDER Constant Generator add.w #1,r10 ;r10 = #1 + r10 PC R ffff IR Data Bus (1 cycle) 0x531a Address Bus PC 0x531a ALU +2 opcodeS-regAdb/wAsD-reg (1 Cycle Instruction

Memory 15 Addressing Modes Registers Address Bus Data Bus (+1 cycle) CPU ADDER Three Word Instruction cnt add.w cnt,var ;var = M(cnt) + M(var) 0x000c PC var Address Bus Data Bus (+1 cycle) PC Data Bus (+1 cycle) 0x0218 IR Data Bus (1 cycle) 0x5090 PC ALU Address Bus +2 opcodeS-regAdb/wAsD-reg (6 Cycle Instruction

16 Instruction Length 1 word (2 bytes) for instruction: – Format I: – Format II: – Format III: OpcodeS-regAdb/wAsD-reg Instruction Length Opcodeb/wAdD/S-reg OpcodeCondition10-bit, 2s complement PC offset 1 additional word (2 bytes) for each of the following addressing modes: Source index mode ( As = 01 ) mov 10(r4),r5 mov cnt,r5 mov &P1IN,r5 Source immediate mode ( As = 11, S-reg = PC ) (except constants -1, 0, 1, 2, 4, 8 which use S-reg = r2/r3) mov #100,r5 mov r4,10(r5) mov r4,cnt mov r4,&P1OUT Destination index mode ( Ad = 1 )