Week 12 Review: Cache Analysis and Solutions in CMPT 295

week 12 review l.w
1 / 56
Embed
Share

Dive into the intricate world of caches and virtual memory in CMPT 295 with a thorough review of cache code analysis problems, sources of cache misses, and virtual memory address mapping. Explore concepts like compulsory, capacity, and conflict misses, and tackle complex cache and virtual memory problems. Enhance your understanding of cache hit rates, memory requests, and page tables for a comprehensive grasp of these crucial computer science topics.

  • Cache Analysis
  • Virtual Memory
  • CMPT 295
  • Computer Science
  • Memory Mapping

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Week 12 -Review CMPT 295 Class Review CMPT 295 Week 12

  2. Week 12 -Review CMPT 295 Caches and Virtual Memory

  3. Week 12 -Review CMPT 295 Cache Code Analysis Problem Cache-A Direct-mapped, 4KB, 64 sets Cache-B Set-associate, 4KB, 2 ways, 32 sets int size = 4096; // int is 4 bytes int a[size]; long long int a_long[size]; // long long int is 8 bytes /* loop 1 */ for (int i = 0; i < size; i++) { a[i] = i; } /* loop 2 */ for (int i = 0; i < size; i += 1) { b[ .] = a[i]; } Question: Hit rates for loop1, loop 2 (assume loop 1 has run) 3

  4. Week 12 - Review CMPT 295 Sources of Cache Misses: The 3Cs Compulsory: (Many names: cold start, process migration (switching processes), 1st reference) First access to block impossible to avoid; Effect is small for long running programs Capacity: Cache cannot contain all blocks accessed by the program, so full associativity won t hold all blocks Conflict: (collision) Multiple memory locations mapped to the same cache location, so there is a lack of associativity 4

  5. Week 12 - Review CMPT 295 Cache & VM Problem 14-bit virtual addresses, 12-bit physical address Page size = 64 bytes Cache: Direct-mapped with K = 4 B, C/K = 16 Page table (partial): VPN PPN V 0 28 1 1 0 2 33 1 3 02 1 4 0 5 16 1 6 0 7 0 VPN PPN 8 9 A B C D E F V 1 1 1 0 0 1 0 1 13 17 09 2D 0D TLB: Set Tag PPN 0 03 1 03 2 02 3 07 V 0 1 0 0 Tag PPN 09 02 08 03 V 1 0 0 1 Tag PPN 00 04 06 0A V 0 0 0 1 Tag PPN 07 0A 03 02 V 1 0 0 0 0D 0D 02 2D 34 Cache: Index 0 1 2 3 4 5 6 7 Tag 19 15 1B 36 32 0D 31 16 V 1 0 1 0 1 1 0 1 B0 99 00 43 36 11 B1 11 02 6D 72 C2 B2 23 04 8F F0 DF B3 11 08 09 1D 03 Index 8 9 A B C D E F Tag 24 2D 2D 0B 12 16 13 14 V 1 0 1 0 0 1 1 0 B0 3A 93 04 83 B1 00 15 96 77 B2 51 DA 34 1B B3 89 3B 15 D3

  6. Week 12 - Review CMPT 295 Note: It is just coincidence that the PPN is the same width as the cache Tag Memory Request Example #1 Virtual Address: 0x03D4 TLBT 13 12 11 TLBI 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 1 1 1 1 0 1 0 1 0 0 VPN VPO VPN ______ TLBT _____ TLBI _____ TLB Hit? ___ Page Fault? ___ PPN _____ Physical Address: CO CI CT 11 10 9 8 7 6 5 4 3 2 1 0 PPN PPO CT ______ CI _____ CO _____ Cache Hit? ___ Data (byte) _______ 6

  7. Week 12 - Review CMPT 295 Note: It is just coincidence that the PPN is the same width as the cache Tag Memory Request Example #2 Virtual Address: 0x038F TLBT 13 12 11 TLBI 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1 VPN VPO VPN ______ TLBT _____ TLBI _____ TLB Hit? ___ Page Fault? ___ PPN _____ Physical Address: CO CI CT 11 10 9 8 7 6 5 4 3 2 1 0 PPN PPO CT ______ CI _____ CO _____ Cache Hit? ___ Data (byte) _______ 7

  8. Week 12 - Review CMPT 295 Note: It is just coincidence that the PPN is the same width as the cache Tag Memory Request Example #3 Virtual Address: 0x0020 TLBT 13 12 11 TLBI 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 VPN VPO VPN ______ TLBT _____ TLBI _____ TLB Hit? ___ Page Fault? ___ PPN _____ Physical Address: CO CI CT 11 10 9 8 7 6 5 4 3 2 1 0 PPN PPO CT ______ CI _____ CO _____ Cache Hit? ___ Data (byte) _______ 8

  9. Week 12 - Review CMPT 295 Note: It is just coincidence that the PPN is the same width as the cache Tag Memory Request Example #4 Virtual Address: 0x036B TLBT 13 12 11 TLBI 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 1 1 0 1 1 0 1 0 1 1 VPN VPO VPN ______ TLBT _____ TLBI _____ TLB Hit? ___ Page Fault? ___ PPN _____ Physical Address: CO CI CT 11 10 9 8 7 6 5 4 3 2 1 0 PPN PPO CT ______ CI _____ CO _____ Cache Hit? ___ Data (byte) _______ 9

  10. Week 12 - Review CMPT 295 Digital Logic

  11. Week 12 - Review CMPT 295 Laws of Boolean Algebra These laws allow us to simplify Boolean expressions: 11

  12. Week 12 - Review CMPT 295 Data Multiplexor (MUX) Multiplexor ( MUX ) is a selector Place one of multiple inputs onto output (N-to-1) Shown below is an n-bit 2-to-1 MUX Input S selects between two inputs of n bits each This input is passed to output if selector bits match shown value A 0 n C n B 1 n Represents that this input has n bits S 16

  13. Week 12 - Review CMPT 295 Implementing a 1-bit 2-to-1 MUX Schematic: Boolean Algebra: A 0 n C n B 1 n s 0 0 0 0 1 1 1 1 a 0 0 1 1 0 0 1 1 b 0 1 0 1 0 1 0 1 c 0 0 1 1 0 1 0 1 Circuit Diagram: S Truth Table: 17

  14. Week 12 - Review CMPT 295 1-bit 4-to-1 MUX Schematic: A B C 00 01 10 E 11 D 2 S= S1S0 18

  15. Week 12 - Review CMPT 295 Functional Unit Hardware circuits are fixed Can t adjust wires /gates while running Build control wires to parametrize its function Function Unit: Function Select: FS func 32 32 0001 A+B 0010 A B 1000 A*B 0100 A^B 0101 A+1 1101 B opA opB 4 FS res 32

  16. Week 12 - Review CMPT 295 Functional Unit: Adder-Subtractor A B 32 FS if FS==0 then S = A+B 32 32 if FS==1 then S = A+B+1 Adder-32 C 32 = A B S

  17. Week 12 - Review CMPT 295 Sequential Circuits: Registers D (n-bit) dn-1 d1 d0 FF FF FF Register CLK CLK CLK CLK q q Q(n-bit) q N-bit register n instances of a Flip-Flop Output flips and flops between 0 and 1 Specifically this is a D-type Flip-Flop D is data input , Q is data output A group of wires when interpreted as a bit field is called a bus 23

  18. Week 12 - Review CMPT 295 Digital State Machines inputs Memory holds state information current state combinational circuit outputs memory next state compute next state based on (current state, inputs) compute outputs based on (current state, inputs) Q. What does this imply about the clock period? clock period must exceed (tpd of combinational circuit + tpd of registers) where tpd is propagational delay

  19. Week 12 - Review CMPT 295 Model for Synchronous Systems Combinational logic blocks separated by registers Clock signal connects only to sequential logic elements Feedback is optional depending on application How do we ensure proper behavior? How fast can we run our clock? 30

  20. Week 12 - Review CMPT 295 Maximum Clock Frequency Assumes Max Delay > Hold Time Max Delay = CLK-to-Q Delay + CL Delay + Setup Time Min Period = Max Delay Max Freq = 1/Min Period 31

  21. Week 12 - Review CMPT 295 The Critical Path The critical path is the longest delay between any two registers in a circuit The clock period must be longer than this critical path, or the signal will not propagate properly to that next register + Reg Reg

  22. Week 12 - Review CMPT 295 RISC-V CPU Datapath, Control Intro

  23. Week 12 - Review CMPT 295 Storage Element: Register File RW RA RB Write Enable 5 5 5 Register File consists of 32 registers: Output ports portA and portB Input port portW Register selection Place data of register RA (number) onto portA Place data of register RB (number) onto portB Store data on portW into register RW (number) when Write Enable is 1 Clock input (CLK) CLK is passed to all internal registers so they can be written to if they match RW and Write Enable is 1 portA portW 32 32 32 x 32-bit Registers portB Clk 32 34

  24. Week 12 - Review CMPT 295 Implementing R-Types 0 31 7 6 15 14 12 11 20 19 25 24 Func3 (3) func7(7) rs2(5) rs1(5) rd(5) opcode(7) Perform operation New hardware: ALU (Arithmetic Logic Unit) Abstraction for adders, multipliers, dividers, etc. How do we know what operation to execute? - Our first control bit! ALUSel(ect) - +4 Reg[] - pc inst[11:7] IMEM AddrD ALU R[rs1] inst[19:15] AddrA DataA R[rs2] inst[24:20] AddrB DataB - inst[31:0] ALUSel Control 35

  25. Week 12 - Review CMPT 295 Adding addi to datapath 31 0 12 11 7 6 15 14 20 19 Func3 (3) imm(12) rs1(5) rd(5) opcode(7) +4 Reg[] DataD ALU pc inst[11:7] Reg[rs1] alu IMEM AddrD pc+4 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB Reg[rs2] Also works for all other I-format arithmetic instruction (slti,sltiu,andi,ori, xori,slli,srli,srai) just by changing ALUSel inst[31:20] Imm. Gen imm[31:0] 36 inst[31:0] ImmSel=I RegWEn=1 BSel=1 ALUSel=Add Control Logic

  26. Week 12 - Review CMPT 295 Adding lw to datapath 31 0 7 6 15 14 12 11 20 19 offset(12) base dst opcode width alu +4 Reg[] DataD wb ALU Reg[rs1] 1 DMEM Addr pc inst[11:7] IMEM AddrD wb Reg[rs2] DataR 0 0 1 pc+4 inst[19:15] inst[24:20] AddrA AddrB DataA DataB mem inst[31:20] Imm. Gen imm[31:0] 37 inst[31:0] ImmSel=I RegWEn=1 Bsel=1 ALUSel=Add MemRW=Read WBSel=0

  27. Week 12 - Review CMPT 295 Adding sw to datapath 31 25 24 0 12 11 7 6 15 14 20 19 imm(11:5) rs2 rs1 opcode imm(4:0) func3 +4 Reg[] DataD alu wb ALU Reg[rs1] DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] pc+4 DataR 0 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 38 inst[31:0] ImmSel=S RegWEn=0 Bsel=1 ALUSel=Add MemRW=Write WBSel=* *= Don t Care

  28. Week 12 - Review CMPT 295 Adding branches to datapath 31 25 24 0 12 11 7 6 15 14 20 19 imm(4:1| 11) rs2 rs1 opcode imm(12|10:5) func3 +4 pc Reg[] DataD alu alu wb 1 0 ALU Reg[rs1] 1 0 DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] DataR 0 Branch Comp. 0 1 pc+4 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 39 ImmSel=B RegWEn=0 BrUn BrEq BrLT inst[31:0] WBSel=* PCSel=taken/not-taken Bsel=1 MemRW=Read ASel=1 ALUSel=Add

  29. Week 12 - Review CMPT 295 Adding jalr to datapath 31 0 7 6 12 11 15 14 20 19 offset base dest opcode Func3 pc+4 +4 pc Reg[] DataD alu alu wb 1 0 2 ALU Reg[rs1] 1 0 DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] pc+4 DataR 0 Branch Comp. 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 40 WBSel=2 inst[31:0] PCSel ImmSel=B RegWEn=1 Bsel=1 Asel=0 MemRW=Read ALUSel=Add BrEq=* BrLT=* BrUn=* Writes PC+4 to dest (return address) Sets PC = base + offset

  30. Week 12 - Review CMPT 295 Adding jal to datapath imm[20|10:1|11|19:12] 31 0 12 11 7 6 rd opcode pc+4 +4 pc Reg[] DataD alu alu wb 1 0 2 ALU Reg[rs1] 1 0 DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] pc+4 DataR 0 Branch Comp. 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 41 WBSel=2 inst[31:0] PCSel ImmSel=J RegWEn=1 Bsel=1 Asel=1 MemRW=Read ALUSel=Add BrEq=* BrLT=* BrUn=* jal saves PC+4 in register rd (the return address) Set PC = PC + offset (PC-relative jump)

  31. Week 12 - Review CMPT 295 Implementing lui imm[31:12] 31 0 7 6 12 11 rd opcode pc+4 +4 pc Reg[] DataD alu wb 1 0 2 ALU Reg[rs1] 1 0 alu DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] pc+4 DataR 0 Branch Comp. 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 42 inst[31:0] PCSel=pc+4 ImmSel=U RegWEn=1 Bsel=1 Asel=* ALUSel=B MemRW=Read WBSel=1 BrUn=* BrE=* BrLT=* lui writes the upper 20 bits of the destination with the immediate value, and clears the lower 12 bits

  32. Week 12 - Review CMPT 295 Implementing auipc 31 0 12 11 7 6 imm[31:12] rd opcode pc+4 +4 pc Reg[] DataD alu wb 1 0 2 ALU Reg[rs1] 1 0 alu DMEM Addr pc 1 inst[11:7] IMEM AddrD wb Reg[rs2] pc+4 DataR 0 Branch Comp. 0 1 inst[19:15] inst[24:20] AddrA AddrB DataA DataB DataW mem inst[31:7] Imm. Gen imm[31:0] 43 inst[31:0] PCSel=pc+4 ImmSel=U RegWEn=1 Bsel=1 Asel=1 ALUSel=Add MemRW=0 WBSel=1 BrUn=* BrE=* BrLT=* Adds upper immediate value to PC and places result in destination register

  33. Week 12 - Review CMPT 295 Control Signals: ADD pc+4 +4 Reg[] pc alu wb 1 DataD 2 ALU Reg[rs1] 1 DMEM alu 0 pc 1 inst[11:7] IMEM AddrD 0 Addr wb Reg[rs2] pc+4 DataR Branch Comp. 0 0 inst[19:15] AddrA DataA DataW mem 1 inst[24:20] AddrB DataB inst[31:7] Imm. Gen imm[31:0] inst[31:0] PCSel ImmSel RegWEn BrUnBrEq BrLT BSel ASel ALUSel MemRW WBSel 44

  34. Week 12 - Review CMPT 295 ADD: Control Signals Here are the signals and values we ve compiled for our ADD instruction: Inst[31:0] BrEq BrLT PCSel ImmSel BrUn ASel BSel ALUSel MemRW RegWEn WBSel * * +4 * * Reg Reg Add Read 1 (Y) ALU add (green = left 3 cols = control INPUTS) (orange = right 9 cols = control OUTPUTS) 45

  35. Week 12 - Review CMPT 295 addi datapath pc+4 +4 Reg[] pc alu wb 1 DataD 2 ALU Reg[rs1] 1 DMEM alu 0 pc 1 inst[11:7] IMEM AddrD 0 Addr wb Reg[rs2] pc+4 DataR Branch Comp. 0 0 inst[19:15] AddrA DataA DataW mem 1 inst[24:20] AddrB DataB inst[31:7] Imm. Gen imm[31:0] inst[31:0] PCSel ImmSel RegWEn BrUnBrEq BrLT BSel ASel ALUSel MemRW WBSel Control Logic Inst[31:0] PCSel ImmSel RegWEn Br Un * Br LT * Br Eq * BSel ASel ALUSel MemRW WBSel +4 I 1 Imm Reg Add Read ALU addi 46

  36. Week 12 - Review CMPT 295 lw datapath pc+4 +4 Reg[] pc alu wb 1 DataD 2 ALU Reg[rs1] 1 DMEM alu 0 pc 1 inst[11:7] IMEM AddrD 0 Addr wb Reg[rs2] pc+4 DataR Branch Comp. 0 0 inst[19:15] AddrA DataA DataW mem 1 inst[24:20] AddrB DataB inst[31:7] Imm. Gen imm[31:0] inst[31:0] PCSel ImmSel RegWEn BrUnBrEq BrLT BSel ASel ALUSel MemRW WBSel Inst[31:0] PCSel ImmSel RegWEn Br Un * Br Eq * Br LT * BSel ASel ALUSel MemRW WBSel +4 I 1 Imm Reg Add Read Mem lw 47

  37. Week 12 - Review CMPT 295 Br datapath pc+4 +4 Reg[] pc alu wb 1 DataD 2 ALU Reg[rs1] 1 DMEM alu 0 pc 1 inst[11:7] IMEM AddrD 0 Addr wb Reg[rs2] pc+4 DataR Branch Comp. 0 0 inst[19:15] AddrA DataA DataW mem 1 inst[24:20] AddrB DataB inst[31:7] Imm. Gen imm[31:0] inst[31:0] PCSel ImmSel RegWEn BrUnBrEq BrLT BSel ASel ALUSel MemRW WBSel Inst[31:0] PCSel ImmSel RegWEn BrUn BrEq BrLT BSel ASel ALUSel MemRW WBSel +4 B 0 * 0 * Imm PC Add Read * beq ALU B 0 * 1 * Imm PC Add Read * beq 48

  38. Week 12 - Review CMPT 295 jal datapath pc+4 +4 Reg[] pc alu wb 1 DataD 2 ALU Reg[rs1] 1 DMEM alu 0 pc 1 inst[11:7] IMEM AddrD 0 Addr wb Reg[rs2] pc+4 DataR Branch Comp. 0 0 inst[19:15] AddrA DataA DataW mem 1 inst[24:20] AddrB DataB inst[31:7] Imm. Gen imm[31:0] inst[31:0] PCSel ImmSel RegWEn BrUnBrEq BrLT BSel ASel ALUSel MemRW WBSel Inst[31:0] PCSel ImmSel RegWEn Br Un * Br Eq * BrLT BSel ASel ALUSel MemRW WBSel ALU J 1 * Imm PC Add Read PC+4 jal 49

  39. Week 12 - Review CMPT 295 Inst[31:0] PCSel ImmSel RegWEn Br Un * Br Eq * Br LT * BSel ASel ALUSe l Reg MemRW WBSel +4 * 1 (Y) Reg Add Read ALU add +4 * 1 * * * Reg Reg Sub Read ALU sub +4 * 1 * * * Reg Reg (Op) Read ALU (R-R Op) +4 I 1 * * * Imm Reg Add Read ALU addi +4 I 1 * * * Imm Reg Add Read Mem lw +4 S 0 (N) * * * Imm Reg Add Write * sw +4 B 0 * 0 * Imm PC Add Read * beq ALU B 0 * 1 * Imm PC Add Read * beq ALU B 0 * 0 * Imm PC Add Read * bne +4 B 0 * 1 * Imm PC Add Read * bne ALU B 0 0 * 1 Imm PC Add Read * blt ALU B 0 1 * 1 Imm PC Add Read * bltu ALU I 1 * * * Imm Reg Add Read PC+4 jalr ALU J 1 * * * Imm PC Add Read PC+4 jal +4 U 1 * * * Imm PC Add Read ALU auipc 50

  40. Week 12 - Review CMPT 295 Instruction Timing IF ID EX MEM WB Total IMEM Reg Read ALU DMEM Reg W 200 ps 100 ps 200 ps 200 ps 100 ps 800 ps 51

  41. Week 12 - Review CMPT 295 Instruction Timing Instr add beq jal lw sw IF = 200ps X X X X X ID = 100ps X X X X X ALU = 200ps X X X X X MEM=200ps WB = 100ps X Total 600ps 500ps 600ps 800ps 700ps X X X X Maximum clock frequency fmax = 1/800ps = 1.25 GHz Most blocks idle most of the time! ex. IF active every 600ps Instruction 1 Instruction 2 IF ID ALU MEM WB IF ID ALU MEM WB Cl k

  42. Week 12 - Review CMPT 295 Iron Law of Processor Performance Time = Instructions Program Program * Instruction * Cycle Cycles Time 53

  43. Week 12 - Review CMPT 295 RISC-V Pipeline tinstruction = 1000 ps Resource use in a particular time slot add t0, t1, t2 Resource use by instruction over time or t3, t4, t5 instruction sequence slt t6, t0, t3 sw t0, 4(t3) lw t0, 8(t3) tcycle = 200 ps addi t2, t2, 1 54

  44. Week 12 - Review CMPT 295 Each stage operates on different instruction add t0, t1, t2 lw t0, 8(t3) sw t0, 4(t3) slt t6, t0, t3 or t3, t4, t5 pcM pcX pcF pcD +4 +4 Reg[] rs1X DataD ALU 1 DMEM aluX AddrD 0 Addr aluM DataR Branch Comp. pcF+4 IMEM DataA AddrA DataW DataB AddrB instD rs2M rs2X immX Imm. instX instM instW Pipeline registers separate stages, hold data for each instruction in flight 55

  45. Week 12 - Review CMPT 295 RISC-V Pipeline Example Address 0x00 0x04 0x08 0x0C Inst | Cycle add a1,a2,a3 addi a4,a5,0x2f7 sub s4,s0,s3 or s1,s2,s5 0 IF 1 ID IF 2 3 4 5 6 7 EX ID IF MEM EX ID IF WB MEM EX ID WB MEM EX WB MEM WB 56

  46. Question: Assume the stage times shown below. Suppose we remove loads and stores from our ISA. Consider going from a single-cycle implementation to a 4-stage pipelined version. Instr Fetch 200ps Reg Read ALU Op Mem Access Reg Write 100 ps 200ps 200ps 100 ps 1) 2) The latency will be 1.33x slower. The throughput will be 3x faster. 57

  47. Week 12 - Review CMPT 295 Pipeline Hazards A hazard is a situation that prevents starting the next instruction in the next clock cycle 1) Structural hazard A required resource is busy (e.g. needed in multiple stages) 2) Data hazard Data dependency between instructions Need to wait for previous instruction to complete its data write 3) Control hazard Flow of execution depends on previous instruction 58

  48. Week 12 - Review CMPT 295 Structural Hazard: Register File RegFile: Used in ID and WB Time (clock cycles) I n s t r Load Add Store O r d e r Sub Or 59

  49. Week 12 - Review CMPT 295 RISC-V Pipeline: Regfile Structural Hazard Addr 0x00 0x04 0x08 0x0C addi a3, a6, 5 Inst | Cycle addi a0, zero, 5 addi a1, a4, 5 addi a2, a5, 5 0 IF 1 ID IF 2 3 4 5 6 7 8 9 10 EX ID IF MM WB EX ID IF MM WB EX ID MM WB ID EX MM WB 60

  50. Week 12 - Review CMPT 295 Data Hazard: Read after Write Addr 0x00 0x04 0x08 0x0C Inst | Cycle 0 IF 1 ID IF 2 3 4 5 6 7 8 9 10 EX ID IF MM WB - IF add s0, s1, s2 - EX ID IF MM WB EX ID sub s4, s0, s3 IF MM WB EX and s5, s0, s6 MM WB or s7, s0, s8 61

More Related Content