Developer Reference

Migrating OpenCL™ FPGA Designs to SYCL*

ID 767849
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Memory Attributes

The following table summarizes the syntax of memory attributes supported in OpenCL and SYCL*:

OpenCL Syntax SYCL Syntax

Description

__attribute__(bank_bits(b0, b1, ...,bn)) [[intel::bank_bits(b0, b1,..., bn)]]

Specifies that the local memory addresses should use bits (b0,b1,...,bn) for bank selection, where, (b0,b1,...,bn) are indicated in terms of word-addressing and not byte-addressing.

__attribute__(bankwidth(N)) [[intel::bankwidth(N)]]

Specifies that the memory system implementing the local variable must have banks that are N bytes wide, where N is a power-of-2 integer value greater than zero.

__attribute__(force_pow2_depth(N)) [[intel::force_pow2_depth(N)]]

Specifies that the memory implementing the variable or array has a power-of-2 depth. This attribute is enabled if N is 1 and disabled if N is 0.

__attribute__(max_replicates(N)) [[intel::max_replicates(N)]]

Specifies that the memory implementing the local variable or array has no more than the specified number of replicates to enable simultaneous reads from the datapath.

__attribute__(memory("impl_type")) [[intel::fpga_memory("impl_type")]

Specifies that the compiler must implement the local variable in a memory system. The optional impl_type argument controls what type of FPGA resources are used to implement that memory system.