ROB Example

Click here to load reader

  • date post

    25-Feb-2016
  • Category

    Documents

  • view

    51
  • download

    0

Embed Size (px)

description

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. All values now in reg. file. Reservation stations and ROB are empty. - PowerPoint PPT Presentation

Transcript of ROB Example

No Slide TitleROB 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.
ILP-*
ROB
TAIL
HEAD
RF
Reservation
Stations
R0
R1
R2
R3
Entry
Dest
Result
Exception
Completed
PC
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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.
ILP-*
ROB
TAIL
HEAD
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
C LW R2, 8(R0)
Entries made in
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ILP-*
ROB
TAIL
HEAD
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
3
4
5
6
7
8
9
10
11
12
13
14
15
ILP-*
ROB
TAIL
HEAD
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
3
4
5
6
7
8
9
10
11
12
13
14
15
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
C
3
4
5
6
7
8
9
10
11
12
13
14
15
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
C
3
4
5
6
7
8
9
10
11
12
13
14
15
TAIL
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
C
3
R1
D
4
5
6
7
8
9
10
11
12
13
14
15
TAIL
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
C
3
R1
D
4
5
6
7
8
9
10
11
12
13
14
15
TAIL
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
C
3
R1
D
4
R2
E
5
6
7
8
9
10
11
12
13
14
15
TAIL
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
667
no
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
667
no
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
667
no
C LW R2, 8(R0)
54 – 743 = –689
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
667
No
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
A
1
R3
B
2
R2
667
No
ILP-*
ROB
RF
Reservation
Stations
R0
R1
R2
R3
C LW R2, 8(R0)
743 + –689 = 54
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Reg=R2, Tag=0, Val=650000
Note: Tag doesn’t match RF tag, don’t set “In RF”
Note: Commit value to register- file state
1 (multiply)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Scenario #2: Raises exception
C LW R2, 8(R0)
650000 76 = 49400000
Note: Tag matches RF tag, so set “In RF”
Note: Commit value to register-file state
A LW R2, 4(R0)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Reg=R2, Tag=2, Val=667
Note: Tag does not match RF tag, don’t set “In RF”
Note: Commit value to register-file state
A LW R2, 4(R0)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Note: Tag matches RF tag, so set “In RF”
Note: Commit value to register-file state
A LW R2, 4(R0)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Note: Tag matches RF tag, so set “In RF”
Note: Commit value to register-file state
A LW R2, 4(R0)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
Note: Tag matches RF tag, so set “In RF”
Note: Commit value to register file state
A LW R2, 4(R0)
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
C LW R2, 8(R0)
Entry
Dest
Result
Exception
Completed
PC
0
R2
650000
No
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.