PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0]

Slides:



Advertisements
Similar presentations
Chapter 5 The LC-3.
Advertisements

Chapter 4 - MicroArchitecture
Adding the Jump Instruction
COMP3221 lec23-decode.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lectures 23: Instruction Representation; Assembly and Decoding.
Chapter 9 TRAP Routines and Subroutines. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9-2 Subroutines.
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.
©UCB CS 161Computer Architecture Chapter 5 Lecture 9 Instructor: L.N. Bhuyan Adapted from notes by Dave Patterson (http.cs.berkeley.edu/~patterson)
1 RISC Pipeline Han Wang CS3410, Spring 2010 Computer Science Cornell University See: P&H Chapter 4.6.
S. Barua – CPSC 240 CHAPTER 5 THE LC-3 Topics Memory organization Registers Instruction set Opcodes.
PCPC addr instr INSTR MEM R1 R2 WR W Data R Data 1 R Data 2 ALU DATA MEM ALU CTRL rs rt op +4 shift 2 zero BRANCH CTRL muxmux sign extend immed 1632 ADDADD.
Chapter 5 The LC-3 LC-3 Computer Architecture Memory Map
Choice for the rest of the semester New Plan –assembler and machine language –Operating systems Process scheduling Memory management File system Optimization.
Chapter 9 & 10 Subroutines and Interrupts. JSR Instruction: JSR offset (11 bit) xxxxxxxxxxx [PC ]  R7, JMP Offset Jump to Subroutine at offset.
CS 161, Spring 2006 Test 2 Answers. Q1(a) +10 = in 2’s complement. And in sign-extended -12 = in 2’s comp And.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
Chapter 9 Trap Routines TRAP number (go to service routine) & RET (return from service routine) Subroutines (or Functions) JSR offset or JSRR rn (go to.
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.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 13: Regression Testing, MemAccess Block.
Department of Communication Engineering, NCTU 1 Unit 6 Design and Synthesis of a RISC Store-Program Machine.
Chapter 5 The LC-3. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5-2 Instruction Set Architecture ISA.
Spring 2007W. Rhett Davis with slight modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 11: Memories,
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-2 Instruction Set Architecture Operate instructions Data Movement instructions.
Introduction to Computing Systems from bits & gates to C & beyond Chapter 5 The LC-3 Instruction Set Architecture ISA Overview Operate instructions Data.
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 9 Chapter 9 Subroutines and TRAPs l Privileged Instructions l TRAP Routines l Subroutines.
1 Instruction memory is used to store a program Processor gets one instruction at a time It stores it locally (like) I0, I1 registers PC points to next.
Sample Code (Simple) Run the following code on a pipelined datapath: add1 2 3 ; reg 3 = reg 1 + reg 2 nand ; reg 6 = reg 4 & reg 5 lw ; reg.
Electrical and Computer Engineering University of Cyprus LAB 2: MIPS.
1 ALU ports can get input from any of the two registers ALU can perform one of the eight operations Shift unit can perform one of the four possible types.
Spring 2007W. Rhett Davis with minor modification by Dean Brock UNCA ECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 12: Intro to the.
© 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 !
How Computers Work Lecture 3 Page 1 How Computers Work Lecture 3 A Direct Execution RISC Processor: The Unpipelined BETA.
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 System Bus. Conceptual CPU Block Diagram Datapath Regs Buses ALU Control Unit Bus Interface IR etc. PC etc. Control Signals Status Signals PSR System.
Spring 2009W. Rhett DavisNC State UniversityECE 406Slide 1 ECE 406 – Design of Complex Digital Systems Lecture 12: Intro to the LC-3 Micro-architecture.
The LC-3 – Chapter 5 COMP 2620 Dr. James Money COMP
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
Introduction to Computing Systems and Programming The LC-2.
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.
1 To write any register, we need register address and a write signal A 3-bit write address is decoded if write signal is present One of the eight registers.
1 Instructions are stored in a memory called instruction memory To execute each instruction, we get the instruction out of memory, store in a register.
Computer Science 210 Computer Organization Machine Language Instructions: Control.
LC-3 Datapath ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin – Madison.
Design a MIPS Processor (II)
Access the Instruction from Memory
Electrical and Computer Engineering University of Cyprus
Single Cycle CPU.
Chapter 7 & 9.2 Assembly Language
Computer Science 210 Computer Organization
Decode and Operand Read
Chapter 9 TRAP Routines and Subroutines
School of Computing and Informatics Arizona State University
The LC-3 Instruction Set Architecture Data Movement instructions
ADITI SHINDE CHIDAMBARAM ALAGAPPAN
CSCI206 - Computer Organization & Programming
CSCI206 - Computer Organization & Programming
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Computer Science 210 Computer Organization
Enhancing Data Path M 4-bit Reg X A L U
Storing Control A L U We need a memory to store control
TRAP Routines Privileged Instructions Subroutines
School of Computer Science and Technology
Review Fig 4.15 page 320 / Fig page 322
Presentation transcript:

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} P37X Non-Pipelined Datapath - Spring 2006

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} ALU1: 0000 Names: ______________________________ CSE372 Lab 3, part a

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} ALU2: 0001

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} TRAP: 0010

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} RTT: 0011

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} JUMP: 0100

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} JUMPR: 0101

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} JSR: 0110

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} JSRR: 0111

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} BR: 1000

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} CONST: 1001

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} INC: 1010

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} LEA: 1011

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} LDR: 1100

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} STR: 1101

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} LD: 1110

PC Memory 2 16 by 16 bit Reg. File ALUALU SEXT 16 I[5:0] I[7:0] 8 6 Controller +1 Rd1 Rd2 Wr WE Out1 In Out2 I Memory 2 16 by 16 bit 16 WE ZEXT 16 I[11:0] 12 SEXT 16 I[8:0] 9 InData Addr I[8:6] 3’b111 Zero 16 I[11:9] I[5:3] I[11:9] I[8:6] I[15:12] I[11:9] Out 16 BR Logic 4’b0100 {I[12],I[2:0]} ST: 1111