-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from artemrad/device_global
Adding INTEL global variable extensions
- Loading branch information
Showing
5 changed files
with
2,029 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
202 changes: 202 additions & 0 deletions
202
extensions/INTEL/SPV_INTEL_global_variable_fpga_decorations.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,202 @@ | ||
= SPV_INTEL_global_variable_fpga_decorations | ||
:source-highlighter: coderay | ||
:coderay-linenums-mode: table | ||
|
||
// This section needs to be after the document title. | ||
:doctype: book | ||
:toc2: | ||
:toc: left | ||
:encoding: utf-8 | ||
:lang: en | ||
|
||
== Name Strings | ||
|
||
SPV_INTEL_global_variable_fpga_decorations | ||
|
||
== Contact | ||
|
||
To report problems with this extension, please open a new issue at: | ||
|
||
https://github.com/KhronosGroup/SPIRV-Registry | ||
|
||
== Contributors | ||
|
||
- Artem Radzikhovskyy, Intel | ||
- Michael Kinsner, Intel | ||
- Joe Garvey, Intel | ||
- Mohammad Fawaz, Intel | ||
- Gregory Lueck, Intel | ||
|
||
== Notice | ||
|
||
Copyright (c) 2021-2023 Intel Corporation. All rights reserved. | ||
|
||
== Status | ||
|
||
* Complete | ||
|
||
== Version | ||
|
||
[width="40%",cols="25,25"] | ||
|======================================== | ||
| Last Modified Date | {docdate} | ||
| Revision | 1 | ||
|======================================== | ||
|
||
== Dependencies | ||
|
||
This extension is written against the SPIR-V Specification, | ||
Version 1.6 Revision 2. | ||
|
||
This extension requires SPIR-V 1.0. | ||
|
||
== Overview | ||
|
||
This extension adds decorations that can be applied to global (module scope) | ||
variables. These decorations are intended to help code generation for | ||
FPGA devices, they can be ignored by all other consumers of this extension. | ||
|
||
== Extension Name | ||
To use this extension within a SPIR-V module, the following *OpExtension* must | ||
be present in the module: | ||
|
||
---- | ||
OpExtension "SPV_INTEL_global_variable_fpga_decorations" | ||
---- | ||
|
||
== New Capabilities | ||
This extension introduces a new capability: | ||
|
||
---- | ||
GlobalVariableFPGADecorationsINTEL | ||
---- | ||
|
||
== Token Number Assignments | ||
|
||
-- | ||
[width="40%"] | ||
[cols="70%,30%"] | ||
[grid="rows"] | ||
|==== | ||
|GlobalVariableFPGADecorationsINTEL | 6146 | ||
|InitModeINTEL | 6147 | ||
|ImplementInRegisterMapINTEL | 6148 | ||
|==== | ||
-- | ||
|
||
== Modifications to the SPIR-V Specification, Version 1.6 | ||
|
||
=== Initialization Mode Qualifier | ||
|
||
After Section 3.18, add a new section "3.18a Initialization Mode Qualifier" as follows | ||
|
||
Defines how the initialization should be triggered. | ||
|
||
Used by InitModeINTEL. | ||
|
||
-- | ||
[options="header"] | ||
|==== | ||
2+^| Initialization Mode Qualifier ^| Enabling Capabilities | ||
// --- ROW BREAK --- | ||
| 0 | ||
| *InitOnDeviceReprogramINTEL* | ||
|
||
Initialization is performed by reprogramming | ||
the device. This may require more frequent reprogramming but may reduce | ||
area. | ||
|
||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
// --- ROW BREAK --- | ||
| 1 | ||
| *InitOnDeviceResetINTEL* | ||
|
||
Initialization is performed by sending a reset | ||
signal to the device. This may increase area but may reduce reprogramming | ||
frequency. | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
|==== | ||
-- | ||
|
||
=== Decoration | ||
|
||
Modify Section 3.20, Decoration, adding these rows to the Decoration table: | ||
|
||
-- | ||
[cols="^4,20,2*5,22",options="header"] | ||
|==== | ||
2+^.^| Decoration 2+<.^| Extra Operands | Enabling Capabilities | ||
|
||
// --- ROW BREAK --- | ||
| 6147 | ||
a| | ||
*InitModeINTEL* + | ||
Only valid on global (module scope) *OpVariable* which has an _Initializer_ | ||
operand. | ||
|
||
This decoration only has an effect when the consumer is an FPGA or similar | ||
device. The _Trigger_ value tells how the global variable should be | ||
initialized. | ||
|
||
If a global *OpVariable* with an _Initializer_ operand is not decorated with | ||
*InitModeINTEL*, the method by which the variable's value is initialized is | ||
implementation defined. | ||
|
||
2+| Initialization Mode Qualifier + | ||
_Trigger_ | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
// --- ROW BREAK --- | ||
| 6148 | ||
a| | ||
*ImplementInRegisterMapINTEL* + | ||
Only valid on global (module scope) *OpVariable*. | ||
|
||
This decoration only has an effect when the consumer is an FPGA or similar | ||
device. The _Value_ value controls the interface of this global variable with | ||
hardware outside the boundary of the SPIR-V module. | ||
|
||
Legal values of _Value_: | ||
|
||
* 0 [False] - Access to this memory is through a dedicated interface. | ||
* 1 [True] - Access to this memory is through a common register map interface that may be shared by other control or data inputs and outputs. | ||
|
||
If a global *OpVariable* is not decorated with *ImplementInRegisterMapINTEL*, the | ||
interface for the variable is implementation defined. | ||
|
||
2+| Literal Number + | ||
_Value_ | ||
| *GlobalVariableFPGADecorationsINTEL* | ||
|
||
|==== | ||
-- | ||
|
||
=== Capability | ||
|
||
Modify Section 3.31, Capability, adding a row to the Capability table: | ||
-- | ||
[options="header"] | ||
|==== | ||
2+^| Capability ^| Implicitly Declares | ||
| 6146 | ||
| GlobalVariableFPGADecorationsINTEL | ||
| | ||
|==== | ||
-- | ||
|
||
== Issues | ||
|
||
None. | ||
|
||
== Revision History | ||
|
||
[cols="5,15,15,70"] | ||
[grid="rows"] | ||
[options="header"] | ||
|======================================== | ||
|Rev|Date|Author|Changes | ||
|1|2022-11-1|Gregory Lueck|Initial revision | ||
|2|2023-04-25|Artem Radzikhovskyy| Seperated the FPGA specific decorations from the generic ones | ||
|======================================== |
Oops, something went wrong.