contributed by <PunchShadow
, jia05
>
IX 代表第X個指令。
指令結束以斜線粗體表示。
Cycle | IF | ID | Issue | ALU | Mem | FAdd | FMul |
---|---|---|---|---|---|---|---|
1 | I1 | ||||||
2 | I2 | I1 | |||||
3 | I3 | I2 | I1 | ||||
4 | I4 | I3 | I2 | I1 | |||
5 | I5 | I4 | I3 | I2 | I1 | ||
6 | I6 | I5 | I4 | I1,I2 | |||
7 | I7 | I6 | I5 | I4 | I2 | ||
8 | I8 | I7 | I6 | I5 | I4 | I3 | |
9 | I8 | I7 | I4,I5 | I3 | |||
10 | I8 | I5 | I6 | ||||
11 | I7 | I6 | |||||
12 | I7 | I6 | |||||
13 | I6 | ||||||
14 | I6 | ||||||
15 | I8 | ||||||
16 | I8 | ||||||
17 | I8 | ||||||
18 | I8 | ||||||
19 | I8 |
每個指令進入 Issue 的 cycle 是不會被延遲的,因為 Re-order-buffer 有無限的空間容納指令。所以此題的 start cycle 是循序從第3個 cycle 一直排8個指令到第10個。
一開始的 I1 與 I2 都是依序執行到結束,且兩個都是 load 指令,分別在第3個與第4個進入 Issue,在第6與第7個 cycle 結束執行。
I3 需要用到 I2 的結果,也就是 F2。須等到第8個 cycle 才進入 FMul。第9個 cycle 結束執行。
I4 以及 I5 也都是 load 指令,因為輸入皆不需要前面的資料,且即將使用的 FU 也沒有被占用,所以 Issue 結束後,就依序進入 ALU 與 Mem 跑完整個指令。分別在第6個與第7個進入 Issue,在第9與第10個 cycle 結束執行。
I6 需要用到 I3 的結果,也就是 F3。須等到第10個 cycle 才進入 FMul。第14個 cycle 結束執行。
I7 需要用到 I5 的結果,也就是 F5。須等到第11個 cycle 才進入 FAdd,第12個 cycle 結束執行。
I8 需要用到 I6 的結果,也就是 F1。須等到第15個 cycle 才進入 FMul,第19個 cycle 結束執行。
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing