1 B. Bruidegom Computer Architecture Top down approach B. Bruidegom AMSTEL-instituut.

Slides:



Advertisements
Similar presentations
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Advertisements

Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Addition Facts
Processor Data Path and Control Diana Palsetia UPenn
Computer Science Education
Machine cycle.
Chapter 4 The Von Neumann Model
Chapter 4 The Von Neumann Model
SE-292 High Performance Computing
Addition 1’s to 20.
25 seconds left…...
Week 1.
Execution Cycle. Outline (Brief) Review of MIPS Microarchitecture Execution Cycle Pipelining Big vs. Little Endian-ness CPU Execution Time 1 IF ID EX.
CS/COE1541: Introduction to Computer Architecture Datapath and Control Review Sangyeun Cho Computer Science Department University of Pittsburgh.
RAT R1 R2 R3 R4 R5 R6 R7 Fetch Q RS MOB ROB Execute Retire.
Chapter 1. Basic Structure of Computers
Introduction to Computer Systems
Chapter 3 โพรเซสเซอร์และการทำงาน The Processing Unit
CPSC 330 Fall 1999 HW #1 Assigned September 1, 1999 Due September 8, 1999 Submit in class Use a word processor (although you may hand-draw answers to Problems.
MIPS Assembly Tutorial
CWRU EECS 3221 Language of the Machine EECS 322 Computer Architecture Instructor: Francis G. Wolff Case Western Reserve University.
Datorteknik DataHazard bild 1 Data Hazards 0x30 sub $6 $0 $1 0x34 add $7 $6 $
ELEN 468 Advanced Logic Design
Datorteknik DatapathControl bild 1 Designing a Single Cycle Datapath & Datapath Control.
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Computer ArchitectureFall 2007 © October 3rd, 2007 Majd F. Sakr CS-447– Computer Architecture.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Copyright 1998 Morgan Kaufmann Publishers, Inc. All rights reserved. Digital Architectures1 Machine instructions execution steps (1) FETCH = Read the instruction.
1. 2 Instructions: Words of the language understood by CPU Instruction set: CPU’s vocabulary Instruction Set Architecture (ISA): CPU’s vocabulary together.
Processor: Datapath and Control
Computer Architecture and Design – ECEN 350 Part 6 [Some slides adapted from A. Sprintson, M. Irwin, D. Paterson and others]
W.S Computer System Design Lecture 4 Wannarat Suntiamorntut.
Computer Architecture CSE 3322 Lecture 3 Assignment: 2.4.1, 2.4.4, 2.6.1, , Due 2/3/09 Read 2.8.
By Wannarat Computer System Design Lecture 4 Wannarat Suntiamorntut.
Datapath and Control AddressInstruction Memory Write Data Reg Addr Register File ALU Data Memory Address Write Data Read Data PC Read Data Read Data.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
MIPS Processor.
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
Access the Instruction from Memory
EE204 Computer Architecture
CS161 – Design and Architecture of Computer Systems
CS 230: Computer Organization and Assembly Language
Introduction CPU performance factors
MIPS Coding Continued.
ELEN 468 Advanced Logic Design
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Designing MIPS Processor (Single-Cycle) Presentation G
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle CPU DataPath.
CS/COE0447 Computer Organization & Assembly Language
MIPS Processor.
Datapath & Control MIPS
ECE232: Hardware Organization and Design
Rocky K. C. Chang 6 November 2017
The Processor Lecture 3.1: Introduction & Logic Design Conventions
MIPS Assembly.
Systems Architecture I
COMS 361 Computer Organization
Access the Instruction from Memory
Review Fig 4.15 page 320 / Fig page 322
MIPS Assembly.
MIPS Coding Continued.
CS/COE0447 Computer Organization & Assembly Language
The Processor: Datapath & Control.
COMS 361 Computer Organization
7/6/
MIPS Processor.
Processor: Datapath and Control
CS/COE0447 Computer Organization & Assembly Language
Presentation transcript:

1 B. Bruidegom Computer Architecture Top down approach B. Bruidegom AMSTEL-instituut

2 B. Bruidegom Basic Components Program Counter (PC) Instruction Memory Registers Arithmetic Logic Unit (ALU) Data Memory

3 B. Bruidegom Simplified View of a Harvard Architecture Instruction Memory Registers (16)Data Memory ALU PC Instruction Data Address Register # Data

4 B. Bruidegom 16 bit Data-path Instruction Memory Registers (16)Data Memory ALU PC Instruction Data Address Register # Data

5 B. Bruidegom Simplified View of a Harvard Architecture Instruction Memory RegistersData Memory ALU PC Instruction Data Address Register # Data Two types of functional units: elements that operate on data values (combinational) elements that contain state (sequential )

6 B. Bruidegom Simplified View of a Harvard Architecture Instruction Memory RegistersData Memory ALU PC Instruction Data Address Register # Data Two types of functional units: elements that operate on data values (combinational) elements that contain state (sequential )

7 B. Bruidegom Simplified View of a Harvard Architecture Instruction Memory RegistersData Memory ALU PC Instruction Data Address Register # Data Two types of functional units: elements that operate on data values (combinational) elements that contain state (sequential ) Edge triggered Level Triggered CLOCK Edge

8 B. Bruidegom Voorbeeld van een instructie: ADD Instruction Memory RegistersData Memory ALU PC Instruction Data Address 1 st register # 2 nd register # Dest. reg. # Data ADD $r0, $r1, $r2 $r0 = $r1 + $r2 Assembly Language

9 B. Bruidegom Voorbeeld van een immediate instructie: ADDI Instruction Memory RegistersData Memory ALU PC Instruction Data Address 1 st register # 2 nd register # Dest. reg. # Data ADDI $r0, $r1, 100 $r0 = $r

10 B. Bruidegom De load-instructie LW: Register  Memory Instruction Memory RegistersData Memory ALU PC Instruction Data Address 1 st register # 2 nd register # Dest. reg. # Data LW $r0, 100($r1) $r0 = Memory[$r ] 100

11 B. Bruidegom Branch-instruction: Branch Equal BEQ Instruction Memory RegistersData Memory ALU PC Instruction Data Address 1 st register # 2 nd register # Dest. reg. # Data BEQ $r0, $r1, 100 IF($r0 == $r1) GOTO z

12 B. Bruidegom Vijf fases van een instructie Instruction Memory Registers (16)Data Memory ALU PC Instruction Data in Address 1 st register # 2d register # Dest. reg. # Data in 1: Instruction fetch2: Instruction decode3: Execution 5: Write back Figuur 10 Vijf fases van een instructie Data out 4: Memory access

13 B. Bruidegom Welke instructie gebruikt welke fase? Instruction type Instruction fetch Instruction decode ExecuteMemory access Write back LIx xx ADDx xxx ADDI LW SW BEQ

14 B. Bruidegom 16 bit Harvard Processor

15 B. Bruidegom Voorbeeld van een immediate instructie: Load Immediate Instruction Memory RegistersData Memory ALU PC Instruction Data Address 1 st register # 2 nd register # Dest. reg. # Data LI $r1, 0x1FD $r1 = 0x1FD 1FD

16 B. Bruidegom 16 bit Harvard Processor LI $1, 0x1FD

17 B. Bruidegom 16 bit Harvard Processor LI $1, 0x1FD

18 B. Bruidegom 16 bit Harvard Processor LI $1, 0x1FD

19 B. Bruidegom 16 bit Harvard Processor LI $1, 0x1FD

20 B. Bruidegom ALU tabel ALU 2 ALU 1 ALU 0 operatie 000complement van B 001BB wordt doorgegeven 010A - Brekenkundige - 011A plus Brekenkundige A  B bitwise XOR 101A + Bbitwise OR 110A. Bbitwise AND

21 B. Bruidegom Instruction format

22 B. Bruidegom Instruction format Mem Write Mem ToReg Br2Re g Reg Writ e ALUOpcod e OpA rs OpB rt Dest rd Immediate nr of bit s NOT x180rtrd0 MOVE x190rtrd0 LDI x0900rdimmediate ADD x1Brsrtrd0 SUB ADDI ANDI BEQ LW SW

23 B. Bruidegom Instruction set 16 bit Harvard machine MnemonicMeaning ExampleMeaning MOVE rd, rtCopy register MOVE $1, $2 r1  r2 NOT rd, rtOne complement NOT $1, $2 r1  ~r2 SUB rd, rs, rtSubtract SUB $4, $2, $3 r4  r2 - r3 ADD rd, rs, rtAdd ADD $4, $2, $3 r4  r2 + r3 XOR rd, rs, rtBitwise exclusive or XOR $4, $2, $3 r4  r2  r3 OR rd, rs, rtBitwise or ADD $4, $2, $3 r4  r2 | r3 AND rd, rs, rtBitwise and ADD $4, $2, $3 r4  r2 & r3 LI rd, immLoad Immediate LDI $1, 0x34 r1  0x34 NOTI rd, imm Not ImmediateNOTI $1, 0x34 r1  ~0x34 SUBI rd, rs, immSub Immediate SUBI $1, $2, 0x34 r1  r2 - 0x34 ADDI rd, rs, immAdd Immediate ADDI $1, $2, 0x34 r1  r2 + 0x34 XORI rd, rs, immXOR Immediate XORI $1, $2, 0x34 r1  r2  0x34 ORI rd, rs, immOr Immediate ADDI $1, $2, 0x34 r1  r2 | 0x34 ANDI rd, rs, immAnd Immediate ADDI $1, $2, 0x34 r1  r2 & 0x34 BRA offsetBranch Always to “label” BRA label PC  PC + offset BZ rt, offsetBranch if rt = 0 BZ $6, endIf (r6 = 0) goto ‘end’ BEQ rs, rt, offsetBranch if rs = rt BEQ $6, $8, loopIf (r6 = r8) goto ‘loop’ LW rd, rs,indexLoad Word from Memory LW $2, 0x8($1) R2  Address (8 + r1) SW rs, rt, indexStore Word to Memory SW $2, 0x8($1) Address (8 + r1)  r2