Computer Organization and Design: The Hardware/Software Interface, Second Edition David A.Patterson and John L. Hennessy ERRATA FOR FIRST PRINTING* 17 August, 1998 Page Error 1. - Back end sheet, left-hand side, in the "MIPS assembly language" table, in the "Meaning" column, 3rd row, change "$s1 = $s2 + $s3" to "$s1 = $s2 + 100" 2. - Back end sheet, left-hand side, in the "MIPS assembly language" table, in the column "Meaning", 6th row, change "$s1 = $s2 + $s3" to "$s1 = $s2 + 100" 3. - Front end sheet, right-hand side, change Chapter 9 title to "Multiprocessors" 4. - Copyright page, line 32, change "mkp@mkp.com" to "cod2bugs@mkp.com" 5. xxiii Line 9, delete "the" before "there is much less" 6. xxix Line 4, change "Farleigh" to "Fraleigh" 7. xxviii Line 16, change "mkp@mkp.com" to "cod2bugs@mkp.com" 8. xxviii Line 34, change "Southwest Texas University" to "Southwest Texas State University" 9. 14 Line 4 of the figure caption text, change "Figure 1.19" to "Figure 1.9" 10. 47 Line 1, change "Exercises 1.36 through 1.44" to "Exercises 1.27 through 1.44" 11. 90 Exercise 2.2, in the "Instructions executed on M2" column, change "160 × 106" to "160 × 106" 12. 92 Exercise 2.13, in the "CPI on M2" column, 3rd row, change "8" to "3" 13. 113 In the Example, change "A[8] = h + A[8];" to "A[12] = h + A[8];" 14. 113 Line 4, change "section A.9 on page A-38" to "page A-48" 15. 120 Lines 9-10, change "($18, $8, and $8)" to "(18, 8, and 8)" 16. 126 In the example, line 3, change "to the registers" to "with the registers" 17. 134 In the example, line 4, change "anguage" to "language" 18. 137 In the answer to the example, in the 6th code segment, change "mult" to "mul" * All line numbers refer to running text and do not include tables, figures, or code samples Page 1 of 6 19. 138 Figure 3.11, 1) move text in column 1, row 1 to column 2, row 3; 2) move text in column 2, row 1 to column 2, row 4; 3) delete empty cells in row 1 20. 143 In the answer to the example, in the 1st code segment, change "$s0, 4($sp)" to "$s0, 0($sp)" 21. 144 In the 4th code segment, change "$s0, 4($sp)" to "$s0, 0($sp)" 22. 149 In the example, in the 3rd line of code, change "add $t1,$t1,$s5" to "add $t1,$t1,$s6" 23. 149 In the answer to the example, in the "80008" row, 3rd column, change "21" to "22" 24. 160 Figure 3.22, change "7fff ffffhex" to "7fff fffchex" 25. 160 In the 2nd line of the figure caption text, change "7fff ffffhex" to "7fff fffchex" 26. 161 Column 3, 5th row from the bottom, change "lw" to "sw" 27. 169 In the elaboration, line 10, change "increment" to "decrement" 28. 169 Line 29, change "encouters" to "encounters" 29. 175 In the quote at the top of the page, insert "altogether" after "beauty is" 30. 175 In the quote at the top of the page, change "American saying" to "Margaret Wolfe Hungerford, Molly Bawn, 1877" 31. 179 Lines 10-11, replace the sentence beginning "With only eight…" with "The 80386 contains only eight GPRs. This means MIPS programs can use four times as many." 32. 199 Exercise 3.8, line 1, change "{Ex. 3.7}" to "{Ex. 3.6}" 33. 199 Exercise 3.9, line 7, change "equals" to "do not equal" 34. 199 Exercise 3.9, line 8, delete "do not" 35. 228 Figure 4.7, in the "MIPS assembly language" table, in the "Meaning" column, 25th row, change "go to p10000" to "go to 10000" 36. 274 Figure 4.43, in the "MIPS assembly language" table, in the "Meaning" column, 3rd row, change "$s1 = $s2 + $s3" to "$s1 = $s2 + 100" 37. 329 Exercise 4.41, line 5, change "two instructions" to "one instruction" 38. 330 Exercise 4.44, line 1, change "page 242" to "page 247" 39. 333 Exercise 4.53, line 4, change "multiplicand" to "product" 40. 358 Figure 5.17, switch placement of "0" and "1" on all three muxes 41. 373 In the example, in the first bulleted item, insert "2" before "nanoseconds" Page 2 of 6 42. 379 Line 18, after "and multiplexors are fairly small", insert "compared to a memory unit or ALU" 43. 381 Figure 5.32, in the 1st line of the caption text, change "ALUSelB" to "ALUSrcB" 44. 429 Exercise 5.15, line 3, change "Chapter 4 on page 223" to "Chapter 3 on page 145" 45. 445 Line 8, after "…that uses the sum", insert "($s0)" 46. 488 In the elaboration, line 9, change "Exercise 6.17" to "Exercise 6.20" 47. 488 In the elaboration, line 16, change "ALUSelB" to "ALUSrcB" 48. 497 Line 11, after "…to the ID stage.", insert "Figure 6.51 shows the revised datapath." 49. 498 Line 6, before the sentence beginning "By moving…", insert the following sentence, "Moving the branch test to the ID stage implies copying the forwarding and hazard detection hardware as well, since a branch dependent on a result still in the pipeline must still work properly with this optimization." 50. 498 Line 11, delete the sentence "Figure 6.51 shows the revised datapath." 51. 499 Line 5 of the figure caption text, after the last sentence insert the following sentence, "The forwarding muxes and paths must also be added to this stage, but are not shown to simplify the figure." 52. 502 Beneath the "Elaboration", insert the following additional Elaboration: A side effect of moving branch decision to the decode pipeline stage is that we have to copy the muxes and control for forwarding and stalling to the decode stage too. That is, an add or load followed by a branch that tests the result of the instruction must still work correctly and efficiently even if we change the pipeline. 53. 504 In the answer to the example, line 2, change "page 376" to "page 397" 54. 504 In the answer to the example, line 11, change "4.04ns" to "4.04 x 2ns or 8.08ns" 55. 504 In the answer to the example, lines 12-13, change "1.7 times faster than multicycle and" to "about" and insert "multicycle or" before "single-cycle control." 56. 505 Line 4, change "page 385" to "page 410" 57. 534 Exercise 6.21, line 1, change "Exercise 5.15" to "Exercise 5.12" 58. 534 Exercise 6.26, change "sw $3 40($4)" to "sw $3, 40($4)" 59. 535 Exercise 6.30, line 10, change "page 485" to "page 513" 60. 564 In the formula for CPU time, change "sycles" to "cycles" 61. 577 In the answer to the example, in the formula for Total CPI, insert "10 +" before "2% × 100 = 3.5" 62. A-22 In the 6th bulleted item, line 1, change "first free" to "last" Page 3 of 6 63. A-23 Figure A.10, in the "Register name" column, 24th row, change "$t7" to "$s7" 64. A-24 Line 10, insert "of" after "which points to the first word" 65. A-26 At the top of the page, 3rd step, change "subtracting the frame size from" to "adding the frame size to" 66. A-31 Line 2, change "latter" to "later" 67. A-31 In the 3rd section of code, between the 4th and 5th line, insert the following "addu $v0, $v0, 1" 68. A-53 In the "Multiply (without overflow)" section, line 1, change "rsrc" to "rsrc1" 69. A-54 Figure A.19, replace original figure with the following: 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 16 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f op(31:26) j jal beq bne blez bgtz addi addiu slti sltiu andi ori xori lui z=0 z=1 z=2 z=3 lb lh lwl lw lbu lhu lwr sb sh swl sw swr lwc0 lwc1 lwc2 lwc3 swc0 swc1 swc2 swc3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 rs (25:21) mfcz 0 1 (16:16) bczf bczt cfcz mtcz ctcz if z = 0 copz copz if z = l, if z = l, f=d f=s funct (4:0) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 tlbr tlbwi tlbwr tlbp rte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 rt (20:16) bltz bgez bltzal bgezal 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 funct(5:0) sll srl sra srlv srav jr jalr syscall break mfhi mthi mflo mtlo mult multu div divu add addu sub subu and or xor nor slt sltu 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 funct(5:0) add.f sub.f mul.f div.f abs.f mov.f neg.f cvt.s. f cvt.d.f cvt.w.f c.f.f c.un.f c.eq.f c.ueq.f c.olt. f c.ult. f c.ole.f c.ule.f c.st. f c.ngle.f c.seq.f c.ngl.f c.lt. f c.nge.f c.le.f c.ngt.f 70. A-56 In the "Unsigned multiply" section, in the 3rd field,, change "r" to "rt" 71. A-56 In the "Multiply"section, in the 3rd field, change "r" to "rt" 72. A-57 In the "OR" section, line 1, change "rd into register rt" to "rt into register rd" 73. A-58 In the "Shift right arithmetic" section, in the 2nd, 3rd, and 4th fields, change "R" Page 4 of 6 to "r" 74. A-58 In the "Shift right logical variable" section, line 1, change "sa" to "shamt" 75. A-58 76. A-62 In the "Shift right logical variable" section, after the last sentence, insert the following sentence "Note that argument rs is ignored for s11, sra, and srl." In the "Branch on equal" section, change "beq Rs, Rt, label" to "beq rs, rt, label" 77. A-62 In the "Branch on equal" section, in the 2nd and 3rd fields, change "R" to "r" 78. A-62 In the "Branch on greater than equal zero" section, in the 2nd field, change "R" to "r" 79. A-63 In the "Branch on equal zero" section, line 1, change "rsrc1" to "rsrc" 80. A-63 In the "Branch on not equal" section, change "bne rs, label" to "bne rs, rt, label" 81. A-64 In the "Branch on greater than unsigned" section, change "bgtu rsrc1, rrc2, label" to "bgtu rsrc1, src2, label" 82. A-65 In the "Jump and link" section, line 2, change "register rd" to "register $ra" 83. A-65 In the "Jump register" section, in the 1st field, change "0×0" to "0" 84. A-65 In the "Jump register" section, in the 4th field, change "0×8" to "8" 85. A-65 In the "Jump register" section, change the labels for the 3rd and 4th fields from "16" and "5" to "15" and "6" 86. A-66 In the "Load word right" section, in the 1st field, change "0×23" to "0×26" 87. A-66 In the "Load word right" section, change all cases of "Rt" to "rt" 88. A-66 In the "Load unsigned halfword" section, line 1, change "register tt" to "register rt" 89. A-68 In the "Store word coprocessor" section, in the 1st field, change "0×3(1-z)" to "0×32" 90. A-69 In the "Move to lo" section, change "mtlo" to "mtlo rs" 91. A-69 In the "Move to hi" section, change "mthi" to "mthi rs" 92. A-72 In the "Convert double to single" section, in the 4th and 5th fields, change "F" to "f" 93. A-73 In the "Negate single" section, in the 3rd field, change "ft" to "0" 94. A-73 In the "Negate double" section, in the 3rd field, change "ft" to "0" 95. A-75 In the "Break" section, change "break" to "break code" 96. B-8 Line 15, change "Outn" to "Out2n-1" Page 5 of 6 97. B-10 In the 3rd equation, change the diamonds to centered dots 98. B-26 Figure B.19, 4th row, change "Register n-1" to "Register n-2" 99. B-26 Figure B.19, 5th row, change "Register n" to "Register n-1" 100. B-27 Figure B.20, 4th row, change "Register n-1" to "Register n-2" 101. B-27 Figure B.20, 5th row, change "Register n" to "Register n-1" 102. B-32 In the elaboration, line 5, change "the switch is open" to "the switch is closed" 103. B-48 Exercise B.25, line 2, change "page 36" to "page B-36" Page 6 of 6