Difference between revisions of "Instruction Set/pick"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:pick}} | {{DISPLAYTITLE:pick}} | ||
− | <div style="font-size:80%;line-height:90%;margin-bottom:2em">[[Speculation| | + | <div style="font-size:80%;line-height:90%;margin-bottom:2em">[[Speculation|speculable]] [[Encoding|exu stream]] [[Decode|pick block]] [[Phasing|picked phase]] operation [[Domains|in the logical value domain]] <br /> |
'''native on:''' [[Cores|all]]<br /> | '''native on:''' [[Cores|all]]<br /> | ||
</div> | </div> | ||
Line 6: | Line 6: | ||
Pick between two values based on a condition. | Pick between two values based on a condition. | ||
− | The pick operation takes 3 arguments and has its own dedicated encoding [[Block]]. The selector argument q only looks at the lowest bit, and when it is set, the first value v1 is moved to the front of the belt, else v2. | + | The pick operation takes 3 arguments and has its own dedicated encoding [[Block]]. The selector argument q only looks at the lowest bit, and when it is set, the first value v1 is moved to the front of the belt, else v2.<br /> |
+ | When the selector and the two other operands are vectors of the same size, the pick takes place on a per element basis. | ||
The pick operation has zero latency, because there isn't actually any processing taking place. It merely renames the belt positions in different ways in the same process that advances the belt positions between cycles as new values are dropped. | The pick operation has zero latency, because there isn't actually any processing taking place. It merely renames the belt positions in different ways in the same process that advances the belt positions between cycles as new values are dropped. | ||
Line 24: | Line 25: | ||
! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]] | ! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]] | ||
|- | |- | ||
− | | [[Cores/Tin/Encoding#pick|Tin]] || P0 || | + | | [[Cores/Tin/Encoding#pick|Tin]] || P0 || 1 |
|- | |- | ||
− | | [[Cores/Copper/Encoding#pick|Copper]] || P0 || | + | | [[Cores/Copper/Encoding#pick|Copper]] || P0 || 1 |
|- | |- | ||
− | | [[Cores/Silver/Encoding#pick|Silver]] || P0 P1 || | + | | [[Cores/Silver/Encoding#pick|Silver]] || P0 P1 || 1 |
|- | |- | ||
− | | [[Cores/Gold/Encoding#pick|Gold]] || P0 | + | | [[Cores/Gold/Encoding#pick|Gold]] || P0 || 1 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|} | |} | ||
Line 47: | Line 44: | ||
! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]] | ! [[Cores|Core]] || [[Slot|In Slots]]|| [[Latency|Latencies]] | ||
|- | |- | ||
− | | [[Cores/Tin/Encoding#pick|Tin]] || P0 || | + | | [[Cores/Tin/Encoding#pick|Tin]] || P0 || 1 |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
|- | |- | ||
− | | [[Cores/ | + | | [[Cores/Copper/Encoding#pick|Copper]] || P0 || 1 |
|- | |- | ||
− | | [[Cores/ | + | | [[Cores/Silver/Encoding#pick|Silver]] || P0 P1 || 1 |
|- | |- | ||
− | | [[Cores/ | + | | [[Cores/Gold/Encoding#pick|Gold]] || P0 || 1 |
|} | |} | ||
[[Instruction_Set|Instruction Set, alphabetical]], [[Instruction Set by Category]], [http://millcomputing.com/instructions.html?collapse=7#ops Instruction Set, sortable, filterable] | [[Instruction_Set|Instruction Set, alphabetical]], [[Instruction Set by Category]], [http://millcomputing.com/instructions.html?collapse=7#ops Instruction Set, sortable, filterable] |
Latest revision as of 14:06, 23 February 2021
Pick between two values based on a condition.
The pick operation takes 3 arguments and has its own dedicated encoding Block. The selector argument q only looks at the lowest bit, and when it is set, the first value v1 is moved to the front of the belt, else v2.
When the selector and the two other operands are vectors of the same size, the pick takes place on a per element basis.
The pick operation has zero latency, because there isn't actually any processing taking place. It merely renames the belt positions in different ways in the same process that advances the belt positions between cycles as new values are dropped.
How many pick operations can be executed in parallel depends on the number of pick Slots of the Core. It finds extensive use in if-conversion to transform control flow into data flow and avoid conditional branches which are a major source of stalls.
related operations: recur
A pick operation where the second pick value would be a None of the same width as the first.
Core | In Slots | Latencies |
---|---|---|
Tin | P0 | 1 |
Copper | P0 | 1 |
Silver | P0 P1 | 1 |
Gold | P0 | 1 |
Core | In Slots | Latencies |
---|---|---|
Tin | P0 | 1 |
Copper | P0 | 1 |
Silver | P0 P1 | 1 |
Gold | P0 | 1 |
Instruction Set, alphabetical, Instruction Set by Category, Instruction Set, sortable, filterable