Name Strings
SPV_ALTERA_global_variable_fpga_decorations
Contact
To report problems with this extension, please open a new issue at:
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
Last Modified Date |
2023-10-27 |
Revision |
3 |
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_ALTERA_global_variable_fpga_decorations"
New Capabilities
This extension introduces a new capability:
GlobalVariableFPGADecorationsALTERA
Token Number Assignments
GlobalVariableFPGADecorationsALTERA |
6189 |
InitModeALTERA |
6190 |
ImplementInRegisterMapALTERA |
6191 |
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 InitModeALTERA.
| Initialization Mode Qualifier | Enabling Capabilities | |
|---|---|---|
0 |
InitOnDeviceReprogramALTERA Initialization is performed by reprogramming the device. This may require more frequent reprogramming but may reduce area. |
GlobalVariableFPGADecorationsALTERA |
1 |
InitOnDeviceResetALTERA Initialization is performed by sending a reset signal to the device. This may increase area but may reduce reprogramming frequency. |
GlobalVariableFPGADecorationsALTERA |
Decoration
Modify Section 3.20, Decoration, adding these rows to the Decoration table:
| Decoration | Extra Operands | Enabling Capabilities | ||
|---|---|---|---|---|
6190 |
InitModeALTERA 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 InitModeALTERA, the method by which the variable’s value is initialized is implementation defined. |
Initialization Mode Qualifier |
GlobalVariableFPGADecorationsALTERA |
|
6191 |
ImplementInRegisterMapALTERA 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:
If a global OpVariable is not decorated with ImplementInRegisterMapALTERA, the interface for the variable is implementation defined. |
Literal Number |
GlobalVariableFPGADecorationsALTERA |
|
Capability
Modify Section 3.31, Capability, adding a row to the Capability table:
| Capability | Implicitly Declares | |
|---|---|---|
6189 |
GlobalVariableFPGADecorationsALTERA |
|
Issues
None.
Revision History
| 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 |
3 |
2023-10-27 |
Artem Radzikhovskyy |
Reverting Capability ID |