1 / 33

ROB Example

ROB Example. We will go through an example of the use of reorder buffers in two scenarios— Completion without exceptions One instruction raises an exception First, let’s consider the data structures in use for the example. FUs. RF. R0. R1. ROB. R2. R3. HEAD. TAIL. Reservation

teal
Download Presentation

ROB Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ROB Example • We will go through an example of the use of reorder buffers in two scenarios— • Completion without exceptions • One instruction raises an exception • First, let’s consider the data structures in use for the example. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  2. FUs RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  3. Code for the example A LW R2, 4(R0) B MULT R3, R1, R2 C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2 At each step, we will show the changes by coloring the cell backgrounds pink. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  4. A LW R2, 4(R0) FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  5. A LW R2, 4(R0) FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  6. B MULT R3, R1, R2 FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  7. B MULT R3, R1, R2 FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  8. C LW R2, 8(R0) FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD TAIL Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  9. C LW R2, 8(R0) HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  10. D ADD R1, R1, R2 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  11. D ADD R1, R1, R2 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  12. E SUB R2, R0, R1 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  13. E SUB R2, R0, R1 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 2 (cache hit) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  14. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 2, 667, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  15. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 3 ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  16. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 3, 743, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  17. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 4, –689, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  18. F ADD R0, R1, R2 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  19. F ADD R0, R1, R2 HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  20. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0 (cache miss) 5, 54, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  21. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 0, 650000, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  22. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R2, Tag=0, Val=650000 R0 Note: Tag doesn’t match RF tag, don’t set “In RF” Note: Commit value to register- file state R1 ROB R2 R3 Reservation Stations 1 (multiply) ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  23. Two scenarios next… • Multiply • Scenario #1: Completes without exception • Scenario #2: Raises exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  24. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 1, 49400000, no exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  25. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R3, Tag=1, Val=49400000 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 ROB R2 R3 Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  26. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R2, Tag=2, Val=667 R0 Note: Tag does not match RF tag, don’t set “In RF” Note: Commit value to register-file state R1 ROB R2 R3 Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  27. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R1, Tag=3, Val=743 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 ROB R2 R3 Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  28. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R2, Tag=4, Val=–689 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register-file state R1 ROB R2 R3 Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  29. TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF Reg=R0, Tag=5, Val=54 R0 Note: Tag matches RF tag, so set “In RF” Note: Commit value to register file state R1 ROB R2 R3 HEAD Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  30. Now do scenario #2 • Multiply raises exception. ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  31. HEAD TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 Reservation Stations 1, exception ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  32. TAIL FUs ALW R2, 4(R0) BMULT R3, R1, R2 CLW R2, 8(R0) DADD R1, R1, R2 ESUB R2, R0, R1 FADD R0, R1, R2 RF R0 R1 ROB R2 R3 HEAD Reservation Stations ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

  33. Other animations • Another good animation of reorder buffers is the one by John Kubiatowicz. See www.cs.ccu.edu.tw/~chen/arch/reorder-step.ppt or www.cs.uit.no/studier/kurs/d241/info/2002h/notes/Berkeley/ Kubiatowicz-2001f/files/lectures/lec19-memory.ppt. • A higher-level visualization of the process is at http://www.ece.lsu.edu/koppel/see/ ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,NC State University

More Related