SPV_ALTERA_fpga_memory_attributes
SPV_ALTERA_fpga_memory_attributes
Table of Contents
Name Strings
Contact
Contributors
Notice
Status
Version
Dependencies
Overview
Extension Name
New capabilities
New Decorations
Token Number Assignments
Modifications to the SPIR-V Specification, Version 1.5
Issues
Revision History
Name Strings
SPV_ALTERA_fpga_memory_attributes
Contact
To report problems with this extension, please open a new issue at:
Contributors
Ben Ashbaugh, Intel
Mohammad Fawaz, Intel
Joe Garvey, Intel
Michael Kinsner, Intel
Julian Packer, Intel
Artem Radzikhovksyy, Intel
Notice
Copyright (c) 2019-2023 Intel Corporation. All rights reserved.
Status
Final draft
Version
Last Modified Date
2023-10-03
Revision
Dependencies
This extension is written against the SPIR-V Specification,
Version 1.5 Revision 2.
This extension requires SPIR-V 1.0.
Overview
This extension adds decorations that influence compiler generation of memory structures on an FPGA target.
Extension Name
To use this extension within a SPIR-V module, the following
OpExtension
must be present in the module:
OpExtension "SPV_ALTERA_fpga_memory_attributes"
New capabilities
This extension introduces a new capability:
FPGAMemoryAttributesALTERA
New Decorations
Decorations added under the
FPGAMemoryAttributes
capability:
RegisterALTERA
MemoryALTERA
NumbanksALTERA
BankwidthALTERA
MaxPrivateCopiesALTERA
SinglepumpALTERA
DoublepumpALTERA
MaxReplicatesALTERA
SimpleDualPortALTERA
MergeALTERA
BankBitsALTERA
ForcePow2DepthALTERA
StridesizeALTERA
WordsizeALTERA
TrueDualPortALTERA
Token Number Assignments
FPGAMemoryAttributesALTERA
5824
RegisterALTERA
5825
MemoryALTERA
5826
NumbanksALTERA
5827
BankwidthALTERA
5828
MaxPrivateCopiesALTERA
5829
SinglepumpALTERA
5830
DoublepumpALTERA
5831
MaxReplicatesALTERA
5832
SimpleDualPortALTERA
5833
MergeALTERA
5834
BankBitsALTERA
5835
ForcePow2DepthALTERA
5836
StridesizeALTERA
5883
WordsizeALTERA
5884
TrueDualPortALTERA
5885
Modifications to the SPIR-V Specification, Version 1.5
Decoration
Modify Section 3.20, Decoration, adding these rows to the Decoration table:
Decoration
Extra Operands
Enabling Capabilities
5825
RegisterALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in logic and carried through the datapath.
FPGAMemoryAttributesALTERA
5826
MemoryALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in memory of the specified type.
Supported strings:
DEFAULT
: Implemenation defined what memory resource is used to implement the variable
MLAB
: data is stored in special Adaptive Logic Modules (ALMs), called memory-logic array blocks
BLOCK_RAM
: data is stored in dedicated block RAM modules
Literal String
Memory Type
FPGAMemoryAttributesALTERA
5827
NumbanksALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory with the specified number of banks.
Literal Number
Banks
FPGAMemoryAttributesALTERA
5828
BankwidthALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory whose banks have the specified width in bytes.
Literal Number
Bank Width
FPGAMemoryAttributesALTERA
5829
MaxPrivateCopiesALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that no more than the specified number of independent copies of the memory synthesized for the variable or structure member should be created for the purpose of enabling concurrent thread or loop iteration accesses.
Literal Number
Maximum Copies
FPGAMemoryAttributesALTERA
5830
SinglepumpALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory that is clocked at the same rate as accesses to it.
FPGAMemoryAttributesALTERA
5831
DoublepumpALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory that is clocked at twice the rate of accesses to it.
FPGAMemoryAttributesALTERA
5832
MaxReplicatesALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that each copy of the memory synthesized for the variable or structure member should be replicated no more than the specified number of times for the purpose of enabling simultaneous accesses from different load/store sites in the program.
Literal Number
Maximum Replicates
FPGAMemoryAttributesALTERA
5833
SimpleDualPortALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory that is configured such that no memory port services both stores and loads.
FPGAMemoryAttributesALTERA
5834
MergeALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory that is merged with any memories synthesized from arrays or structure members that are decorated with this decoration and the same specified merge key. The mechanism of this merging is specified as a subsequent literal string.
Literal String
Merge Key
Literal String
Merge Type
FPGAMemoryAttributesALTERA
5835
BankBitsALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a banked memory system, where the bits specified determine the pointer address bits to bank on.
Literal Number, Literal Number, …​
Bank Bits
FPGAMemoryAttributesALTERA
5836
ForcePow2DepthALTERA
Apply to a variable or a structure-type member. Request that the variable or structure member should be implemented in a memory that is a power-of-2 deep. This option is enabled if the subsequent literal number specified is 1, and disabled if the subsequent literal number specified is 0.
Literal Number
Force Power-Of-2 Depth
FPGAMemoryAttributesALTERA
5883
StridesizeALTERA
Apply to a variable or a structure-type member of array type. Request, to the extent possible, that
Stride Size
worth of consecutive array elements be placed in the same memory bank.
Literal Number
Stride Size
FPGAMemoryAttributesALTERA
5884
WordsizeALTERA
Apply to a variable or a structure-type member of array type. Request, to the extent possible, the size in array elements of a single memory transaction.
Literal Number
Word Size
FPGAMemoryAttributesALTERA
5885
TrueDualPortALTERA
Apply to a variable or a structure-type member. Request, to the extent possible, that the variable or structure member should be implemented in a memory that is configured such that all memory ports can service both stores and loads.
FPGAMemoryAttributesALTERA
Capability
Modify Section 3.31, Capability, adding a row to the Capability table:
Capability
Implicitly Declares
5824
FPGAMemoryAttributesALTERA
Validation Rules
None.
Issues
None.
Revision History
Rev
Date
Author
Changes
2019-02-27
Joe Garvey
Initial public release
2019-03-18
Joe Garvey
Added MaxconcurrencyALTERA decoration. Fixed NumbanksALTERA capitalization
2019-04-23
Joe Garvey
Added SinglepumpALTERA and DoublepumpALTERA decorations
2019-06-06
Joe Garvey
Changed the name of MaxconcurrencyALTERA to MaxPrivateCopiesALTERA
2019-06-18
Joe Garvey
Added the MaxReplicatesALTERA, SimpleDualPortALTERA, and MergeALTERA decorations
2019-12-18
Julian Packer
Added the BankBitsALTERA decoration
2020-02-06
Mohammad Fawaz
Added the ForcePow2DepthALTERA decoration
2023-07-26
Artem Radzikhovskyy
Added StridesizeALTERA, WordsizeALTERA, TrueDualPortALTERA decorations
2023-10-03
Artem Radzikhovskyy
Definition clarifications; Defined supported strings in MemoryALTERA