Tomasulo's algorithm: Difference between revisions

Content deleted Content added
m Reverted 1 edit by 24.106.141.110 (talk) to last revision by Monkbot (TW)
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 85:
|Issue
|Station {{mono|r}} empty
|<sourcesyntaxhighlight lang="c">
if (RegisterStat[rs].Qi¦0) {
RS[r].Qj ← RegisterStat[rs].Qi
Line 102:
RS[r].Busy ← yes;
RegisterStat[rd].Q ← r;
</syntaxhighlight>
</source>
|-
|Load or Store
|Buffer {{mono|r}} empty
|<sourcesyntaxhighlight lang="c">
if (RegisterStat[rs].Qi¦0) {
RS[r].Qj ← RegisterStat[rs].Qi;
Line 116:
RS[r].A ← imm;
RS[r].Busy ← yes;
</syntaxhighlight>
</source>
|-
|Load only
|
|<sourcesyntaxhighlight lang="c">
RegisterStat[rt].Qi ← r;
</syntaxhighlight>
</source>
|-
|Store only
|
|<sourcesyntaxhighlight lang="c">
if (RegisterStat[rt].Qi¦0) {
RS[r].Qk ← RegisterStat[rt].Qi;
Line 134:
RS[r].Qk ← 0
};
</syntaxhighlight>
</source>
|}
 
Line 158:
|-
|FP operation
| <sourcesyntaxhighlight lang="text">
(RS[r].Qj = 0) and (RS[r].Qk = 0)
</syntaxhighlight>
</source>
|
Compute result: operands are in Vj and Vk
Line 166:
|Load/store step 1
|<code>RS[r].Qj = 0</code> & r is head of load-store queue
|<sourcesyntaxhighlight lang="text">
RS[r].A ← RS[r].Vj + RS[r].A;
</syntaxhighlight>
</source>
|-
|Load step 2
Line 191:
|FP operation or load
|Execution complete at {{mono|r}} & CDB available
|<sourcesyntaxhighlight lang="c">
∀x(if (RegisterStat[x].Qi = r) {
regs[x] ← result;
Line 205:
});
RS[r].Busy ← no;
</syntaxhighlight>
</source>
|-
|Store
|Execution complete at {{mono|1=r & RS[r].Qk = 0}}
|<sourcesyntaxhighlight lang="c">
Mem[RS[r].A] ← RS[r].Vk;
RS[r].Busy ← no;
</syntaxhighlight>
</source>
|}