Computer Science 210 Computer Organization

Slides:



Advertisements
Similar presentations
Chapter 5 The LC-3.
Advertisements

The LC-3 – Chapter 6 COMP 2620 Dr. James Money COMP
Chapter 5 The LC-3 Instruction Set Architecture l ISA Overview l Operate instructions l Data Movement instructions l Control Instructions l LC-3 data path.
CS25410 Memory Machine Code. Common types of non-rotating memory (1) RAMRandom Access Memory In reality, read/write memory This is usually volatile, meaning.
CEG 320/520: Computer Organization and Assembly Language Programming1 Assembly Language Programming Machine Code Hand Assembly.
Chapter 5 The LC-3.
Chapter 4 - ISA 1.The Von Neumann Model. 4-2 The Stored Program Computer 1943: ENIAC Presper Eckert and John Mauchly -- first general electronic computer.
LC-3 Computer LC-3 Instructions
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
Introduction to Computing Systems (2nd Exam). 1. [15] Complete a truth table (inputs: A, B, C; output: D) for the transistor-level circuit shown in Figure.
LC-3 Instruction Set Architecture (Textbook’s Chapter 5)
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Chapter 6 Programming in Machine Language The LC-3 Simulator
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Chapters 5 - The LC-3 LC-3 Computer Architecture Memory Map
LC-3 Instruction Set Architecture
Chapters 4 & 5: LC-3 Computer Architecture Machine Instructions Assembly language Programming in Machine and Assembly Language.
Overview von Neumann Model Components of a Computer Some Computer Organization Models The Computer Bus An Example Organization: The LC-3.
Part II: Addressing Modes
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 von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-2 Instruction Set Architecture Operate instructions Data Movement instructions.
Housekeeping 1.teams—end of class 2.Example verilog code (alter) 3.Example altera report 4.Lab Monday: you will be asked to show: -- one or more reports.
Chapter 4 The Von Neumann Model
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-3 Instruction Set Architecture ISA Overview Operate instructions Data.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Data Movement Instructions Load --
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA = All of the.
Chapter 5 The LC Instruction Set Architecture ISA = All of the programmer-visible components and operations of the computer memory organization.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
© BYU LC3-DC Page 1 ECEn 224 LC3-DC Designing The LC-3 Control IR PC enaMARMenaPC enaALU enaMDR ALU AB.
Our programmer needs to do this !
Spring 20067W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 Design of Complex Digital Systems Lecture 11: Data Converter,
March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Connecting Hardware to InstructionsConnecting Hardware to Instructions.
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
Introduction to Computing Systems and Programming The LC-2.
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
1 Contents: 3.1 Instruction format and Addressing Modes 3.2 Instruction Introduction Chapter 3 Instruction system.
Computer Science 210 Computer Organization Machine Language Instructions: Control.
מבוסס על שקפים מאת יאן ציטרין
Chapter 4 The Von Neumann Model
COSC121: Computer Systems: Review
Computer Science 210 Computer Organization
Conditional Branches What distinguishes a computer from a simple calculator is its ability to make decisions Decisions are made using the if statement,
Decode and Operand Read
Computer Science 210 Computer Organization
Design of the Control Unit for Single-Cycle Instruction Execution
Chapter 5 The LC-3.
The LC-3 Instruction Set Architecture Data Movement instructions
Introduction to Computer Engineering
LC-3 Details and Examples
Computer Science 210 Computer Organization
CS/COE0447 Computer Organization & Assembly Language
Chapter 5 The LC-3.
Computer Science 210 Computer Organization
Topic 6 LC-3.
MIPS Instruction Encoding
Introduction to Computer Engineering
MIPS Instruction Encoding
Computer Science 210 Computer Organization
Introduction to Micro Controllers & Embedded System Design
Computer Science 210 Computer Organization
Chapter 4 The Von Neumann Model
LC-2: The Little Computer 2
Dr. Juan Gómez Luna Prof. Onur Mutlu ETH Zurich Spring 2018
Chapter 5 The LC-3.
Presentation transcript:

Computer Science 210 Computer Organization Machine Language Instructions: Data Movement

Data Movement Move data from memory to a register (load - LD, LDR, LDI, LEA) Move data from a register to memory (store - ST, STR, STI) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Opcode Src or Address info Dst

PC-Relative Mode To compute the memory address: Sign-extend the address info (9-bit twos comp) Add the result to the incremented PC 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Opcode Src or Address info Dst

PC-Relative: LD and ST RDst  M[PC + offset] M[PC + offset]  RSrc 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 1 0 0 1 0 1 1 0 1 0 1 1 1 1 RDst  M[PC + offset] LD R2 x1AF 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 1 M[PC + offset]  RSrc ST R2 x1AF The operation is executed after the PC has been incremented Address must be within +256 or -255 of the LD or ST instruction

Data Path for LD

Data Path for ST

PC-Indirect Mode To compute the memory address: Sign-extend the address info (9-bit twos comp) Add the result to the incremented PC Use this address to locate another address in memory 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Opcode Src or Address info Dst

PC-Indirect: LDI and STI 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 RDst  M[M[PC + offset]] LDI R3 x1CC 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 0 1 1 0 1 1 1 1 1 0 0 1 1 0 0 M[M[PC + offset]]  RSrc STI R3 x1CC Contents at the address is another address, which can be anywhere in memory

Data Path for LDI

Base + Offset Mode To compute the memory address: Sign-extend the offset info (6-bit twos comp) Add the result to contents of the base register 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Opcode Src or Base Offset Dst

Base + Offset: LDR and STR 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 1 0 0 0 1 0 1 0 0 1 1 1 0 1 RDst  M[base + offset] LDR R1 R2 x1D 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 1 1 M[base + offset]  RSrc STR R1 R2 x1D Address does not depend on the PC Offset must range from -32 to +31

Data Path for LDR

Load Effective Address (LEA) Computes the address like PC-relative and just stores the result in the destination register Memory is not accessed 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Opcode Src or Address info Dst

Data Path for LEA

For Friday Control Instructions