Difference between revisions of "Instruction Set/inner"

From Mill Computing Wiki
Jump to: navigation, search
m (Protected "Instruction Set/inner": generated ([Edit=<protect-level-bot>] (indefinite) [Move=<protect-level-bot>] (indefinite)))
Line 4:Line 4:
 
</div>
 
</div>
  
enter a loop
+
Unconditional loop.
 +
 
 +
In many respects the inner operations are the same as the corresponding [[Instruction_Set/call|call]] operations. They have the same syntax and encodings and variants and behaviors. They get passed arguments and reserve return value slots.
 +
 
 +
The only difference is, that inner operations don't create a new frame, i.e. the frame ID stays the same, and the new values on the belt are still tagged with the same ID. This means it is still possible to access all belt values, and it is still possible to retrieve values from the caller from the [[Scratchpad]].
 +
 
 +
This is somewhat comparable to how many functional languages have no dedicated looping keyword construct, but implement looping with recursive tail calls, that just reuse and overwrite the old context. Inner doesn't overwrite the old context due to the nature of the belt, but it also doesn't create a new one.
 +
 
 +
The inner operation, in conjunktion with the [[Instruction_Set/rotate|rotate]] operation and the [[Scratchpad]] makes it possible to statically schedule and [[pipeline|Pipelining]] nested loops of any depth level.
 +
 
 +
<b>related operations:</b>  [[Instruction_Set/innertr|innertr]], [[Instruction_Set/innerfl|innerfl]]
 +
 
 
----
 
----
 
<code style="font-size:130%"><b style="color:#050">inner</b>(<i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">n</span></i>, <span style="color:#009">[[Domains#p|p]]</span> <span title="call argument from calls window">target</span>, <span style="color:#009">[[Domains#args|args]]</span> <span title="zero or more call  
 
<code style="font-size:130%"><b style="color:#050">inner</b>(<i><span style="color:#009">[[Immediates#lit|lit]]</span> <span title="morsel-sized manifest constant">n</span></i>, <span style="color:#009">[[Domains#p|p]]</span> <span title="call argument from calls window">target</span>, <span style="color:#009">[[Domains#args|args]]</span> <span title="zero or more call  

Revision as of 17:40, 4 February 2015

realizing  flow stream  flow block  call phase   operation  

native on: all

Unconditional loop.

In many respects the inner operations are the same as the corresponding call operations. They have the same syntax and encodings and variants and behaviors. They get passed arguments and reserve return value slots.

The only difference is, that inner operations don't create a new frame, i.e. the frame ID stays the same, and the new values on the belt are still tagged with the same ID. This means it is still possible to access all belt values, and it is still possible to retrieve values from the caller from the Scratchpad.

This is somewhat comparable to how many functional languages have no dedicated looping keyword construct, but implement looping with recursive tail calls, that just reuse and overwrite the old context. Inner doesn't overwrite the old context due to the nature of the belt, but it also doesn't create a new one.

The inner operation, in conjunktion with the rotate operation and the Scratchpad makes it possible to statically schedule and Pipelining nested loops of any depth level.

related operations: innertr, innerfl


inner(lit n, p target, args args) → ops r0 ...

operands: like Inv :


encoding: inner(lit n, p target, off argv, count argc)
encoding: inner(lit n, p target, off argv, count argc, lit argv)
alternate encoding: inner0, inner1, innern,

Core In Slots Latencies
Tin F0 1
Copper F0 F1 1
Silver F0 F1 F2 1
Gold F0 F1 F2 F3 1
Decimal8 F0 F1 F2 1
Decimal16 F0 F1 F2 1

inner(lit n, lbl target, args args) → ops r0 ...

operands: like Inv :


encoding: inner(lit n, off target, count argc)
encoding: inner(lit n, off target, count argc, lit argv)
encoding: inner(lit n, off target, count argc, lit argv, lit argv)
alternate encoding: inner0, inner1, innern,

Core In Slots Latencies
Tin F0 1
Copper F0 F1 1
Silver F0 F1 F2 1
Gold F0 F1 F2 F3 1
Decimal8 F0 F1 F2 1
Decimal16 F0 F1 F2 1


Instruction Set, alphabetical, Instruction Set by Category, Instruction Set, sortable, filterable