ROB Example

Post on 25-Feb-2016

61 views 0 download

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

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-1

ROB ExampleROB 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,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-2

Entry Dest Result Exception Completed PC

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

ROB

TAILHEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value – 54 – 76 – -5 – -99

ReservationStations

R0

R1R2

R3

All valuesnow inreg. file Reservation stations

and ROB are empty

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-3

Code for the exampleCode 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,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-4

Entry Dest Result Exception Completed PC

0

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

ROB

TAILHEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value – 54 – 76 – -5 – -99

ReservationStations

R0

R1R2

R3

A LW R2, 4(R0)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-5

Entry Dest Result Exception Completed PC

0 R2 A

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

ROB

TAILHEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

0 54 Imm=4

In RF tag value – 54 – 76

0 -5 – -99

ReservationStations

R0

R1R2

R3

A LW R2, 4(R0)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

Entries made inreservation station

and ROB

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-6

Entry Dest Result Exception Completed PC

0 R2 A

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

ROB

TAILHEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

0 54 Imm=4

In RF tag value – 54 – 76

0 –5 – – 99

ReservationStations

R0

R1R2

R3

B MULT R3, R1, R2

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-7

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

ROB

TAIL

HEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 0

In RF tag value – 54 – 76

0 – 5

1 –99

ReservationStations

R0

R1R2

R3

B MULT R3, R1, R2

0 (cache miss)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-8

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

ROB

TAIL

HEAD

FUs

RF

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 0

In RF tag value – 54 – 76

0 –5

1 –99

ReservationStations

R0

R1R2

R3

C LW R2, 8(R0)

0 (cache miss)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-9

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

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

2 54 Imm=8

1 76 0

In RF tag value – 54 – 76

2 –5

1 –99

ReservationStations

R0

R1R2

R3

C LW R2, 8(R0)

TAIL

0 (cache miss)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-10

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

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

2 54 Imm=8

1 76 0

In RF tag value – 54 – 76

2 –5

1 –99

ReservationStations

R0

R1R2

R3

D ADD R1, R1, R2

TAIL

0 (cache miss)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-11

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

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

3 76 2

1 76 0

In RF tag value – 54

3 76

2 –5

1 –99

ReservationStations

R0

R1R2

R3

D ADD R1, R1, R2

TAIL

0 (cache miss)2 (cache hit)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-12

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

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

3 76 2

1 76 0

In RF tag value – 54

3 76

2 –5

1 –99

ReservationStations

R0

R1R2

R3

E SUB R2, R0, R1

TAIL

0 (cache miss)2 (cache hit)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-13

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

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

4 54 3

3 76 2

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

E SUB R2, R0, R1

TAIL

0 (cache miss)2 (cache hit)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-14

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 no C

3 R1 D

4 R2 E

5

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

4 54 3

3 76 667

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

2, 667, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-15

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 no C

3 R1 D

4 R2 E

5

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

4 54 3

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)3

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-16

667 + 76 = 743

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 no C

3 R1 743 no D

4 R2 E

5

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

4 54 743

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

3, 743, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-17

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

4, –689, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

54 – 743 = –689

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-18

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 0

In RF tag value – 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

F ADD R0, R1, R2

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-19

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

5 743 –689

1 76 0

In RF tag value

5 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

F ADD R0, R1, R2

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-20

Entry Dest Result Exception Completed PC

0 R2 A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 0

In RF tag value

5 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0 (cache miss)

5, 54, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

743 + –689 = 54

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-21

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

1 76 650000

In RF tag value

5 54

3 76

4 –5

1 –99

ReservationStations

R0

R1R2

R3

TAIL

0, 650000, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-22

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54

3 76

4 650000

1 –99

ReservationStations

R0

R1R2

R3

TAIL

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)

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-23

Two scenarios next…Two scenarios next… Multiply

Scenario #1: Completes without exception Scenario #2: Raises exception

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-24

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54

3 76

4 650000

1 –99

ReservationStations

R0

R1R2

R3

TAIL

1, 49400000, no exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

650000 76 = 49400000

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-25

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54

3 76

4 650000 – 49400000

ReservationStations

R0

R1R2

R3

TAIL

Reg=R3, Tag=1, Val=49400000

Note: Tag matches RF tag, so set “In RF”Note: Commit value to register-file state

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-26

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEADmytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54

3 76

4 667 – 49400000

ReservationStations

R0

R1R2

R3

TAIL

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) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-27

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEADmytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54 – 743

4 667 – 49400000

ReservationStations

R0

R1R2

R3

TAIL

Reg=R1, Tag=3, Val=743

Note: Tag matches RF tag, so set “In RF”Note: Commit value to register-file state

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-28

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54 – 743 – – 689 – 49400000

ReservationStations

R0

R1R2

R3

TAIL

Reg=R2, Tag=4, Val=–689

Note: Tag matches RF tag, so set “In RF”Note: Commit value to register-file state

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-29

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 49400000 No B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value – 54 – 743 – –689 – 49400000

ReservationStations

R0

R1R2

R3

TAIL

Reg=R0, Tag=5, Val=54

Note: Tag matches RF tag, so set “In RF”Note: Commit value to register file state

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0)

D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-30

Now do scenario #2Now do scenario #2 Multiply raises exception.

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-31

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 – Yes B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value

5 54

3 76

4 650000

1 –99

ReservationStations

R0

R1R2

R3

TAIL

1, exception

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-32

Entry Dest Result Exception Completed PC

0 R2 650000 No A

1 R3 – Yes B

2 R2 667 No C

3 R1 743 No D

4 R2 –689 No E

5 R0 54 No F

6

7

8

9

10

11

12

13

14

15

ROB

FUs

RF

HEAD

mytag

src1ready

src1tag/value

src2ready

src2tag/value

In RF tag value – 54 – 76 – 650000 – –99

ReservationStations

R0

R1R2

R3

TAIL

A LW R2, 4(R0) B MULT R3, R1, R2C LW R2, 8(R0) D ADD R1, R1, R2 E SUB R2, R0, R1 F ADD R0, R1, R2

ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE,ECE 463/521, Profs. Conte, Rotenberg, & Gehringer, Dept. of ECE, NC State UniversityNC State University ILP-33

Other animationsOther animations Another good animation of reorder buffers is

the one by John Kubiatowicz. See www.cs.ccu.edu.tw/~chen/arch/reorder-step.ppt

orwww.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/