| 所組別 : | 資訊工程學系 | 科目 : | 計算機結構 | 考試時間 : | 05月01日第4 節 |
| loop | lw | $u1,0($b0) | #Read next word from source | |
| addi | $u0,$u0,1 | #Increment count words copied | ||
| sw | $u1,0($b1) | #Write to destination | ||
| addi | $b0,$b0,1 | #Advance pointer to next source | ||
| addi | $b1,$b1,1 | #Advance pointer to next destination | ||
| bne | $u1,$zero,loop | # Loop if word copied is not equal to 0 |
| Instruction class | CPI | Frequency |
| A | 2 | 40% |
| B | 3 | 25% |
| C | 3 | 25% |
| D | 3 | 10% |
| Instruction class | Percentage of instructions executed vs. old compiler |
| A | 90% |
| B | 80% |
| C | 85% |
| D | 90% |
| F1 | Instruction Fetch 1: Instruction Address presented to I-Cache |
| F2 | Instruction Fetch 2: I-Cache produces instruction |
| R1 | Register Files are accessed. Instruction Decode Begins |
| R2 | Register file access completes, branch target computed, start computing branch condition. |
| A1 | ALU operations (including address for ld/st) start, Branch condition completed. |
| A2 | ALU operations are completed |
| M1 | Data Access 1: Data Address presented to D-Cache |
| M2 | Data Access 2: D-Cache produces data or completes store.. |
| W | Write results back to register file |
| add | r1,r4,r5 |
| add | r7,r1,r5 |
| lw | r1,0(r5) | add | r7,r1,r5 |
