@@ -2055,6 +2055,17 @@ let Category = DocCatVariable;
2055
2055
This attribute may be attached to a variable or struct member declaration and
2056
2056
instructs the backend to implement the variable or struct member in a memory
2057
2057
that is clocked at twice the rate of its accessors.
2058
+
2059
+ .. code-block:: c++
2060
+
2061
+ void bar() {
2062
+ [[intel::doublepump]] int var_doublepump;
2063
+ }
2064
+
2065
+ struct foo {
2066
+ [[intel::doublepump]] unsigned int doublepump[64];
2067
+ };
2068
+
2058
2069
}];
2059
2070
}
2060
2071
@@ -2065,6 +2076,17 @@ let Category = DocCatVariable;
2065
2076
This attribute may be attached to a variable or struct member declaration and
2066
2077
instructs the backend to implement the variable or struct member in a memory
2067
2078
that is clocked at the same rate as its accessors.
2079
+
2080
+ .. code-block:: c++
2081
+
2082
+ void bar() {
2083
+ [[intel::singlepump]] int var_singlepump;
2084
+ }
2085
+
2086
+ struct foo {
2087
+ [[intel::singlepump]] unsigned int singlepump[64];
2088
+ };
2089
+
2068
2090
}];
2069
2091
}
2070
2092
@@ -2076,6 +2098,19 @@ This attribute may be attached to a variable or struct member declaration and
2076
2098
instructs the backend to implement the variable or struct member in memory
2077
2099
rather than promoting to register(s). If the optional parameter is specified
2078
2100
it indicates what type of memory to use.
2101
+
2102
+ .. code-block:: c++
2103
+
2104
+ void bar() {
2105
+ [[intel::fpga_memory]] int memory;
2106
+ }
2107
+
2108
+ struct foo {
2109
+ [[intel::fpga_memory]] unsigned int memory[64];
2110
+ [[intel::fpga_memory("MLAB")]] unsigned int memory_mlab[64];
2111
+ [[intel::fpga_memory("BLOCK_RAM")]] unsigned int mem_blockram[32];
2112
+ };
2113
+
2079
2114
}];
2080
2115
}
2081
2116
@@ -2086,6 +2121,17 @@ def IntelFPGARegisterAttrDocs : Documentation {
2086
2121
This attribute may be attached to a variable or struct member declaration and
2087
2122
instructs the backend to promote the variable or struct member to register(s)
2088
2123
if possible.
2124
+
2125
+ .. code-block:: c++
2126
+
2127
+ void bar() {
2128
+ [[intel::fpga_register]] int var_reg;
2129
+ }
2130
+
2131
+ struct foo {
2132
+ [[intel::fpga_register]] unsigned int reg[64];
2133
+ };
2134
+
2089
2135
}];
2090
2136
}
2091
2137
@@ -2096,6 +2142,18 @@ def IntelFPGABankWidthAttrDocs : Documentation {
2096
2142
This attribute may be attached to a variable or struct member declaration and
2097
2143
instructs the backend to implement the variable or struct member in a memory
2098
2144
with banks that are N bytes wide.
2145
+
2146
+ .. code-block:: c++
2147
+
2148
+ struct foo {
2149
+ [[intel::bankwidth(4)]] unsigned int bankwidth[32];
2150
+ };
2151
+
2152
+ template <int N>
2153
+ void bar() {
2154
+ [[intel::bankwidth(N)]] unsigned int bank_bits_width;
2155
+ }
2156
+
2099
2157
}];
2100
2158
}
2101
2159
@@ -2106,6 +2164,18 @@ def IntelFPGANumBanksAttrDocs : Documentation {
2106
2164
This attribute may be attached to a variable or struct member declaration and
2107
2165
instructs the backend to implement the variable or struct member in a memory
2108
2166
with N banks.
2167
+
2168
+ .. code-block:: c++
2169
+
2170
+ struct foo {
2171
+ [[intel::numbanks(8)]] unsigned int numbanks[64];
2172
+ };
2173
+
2174
+ template <int N>
2175
+ void bar() {
2176
+ [[intel::numbanks(N)]] unsigned int numbanks;
2177
+ }
2178
+
2109
2179
}];
2110
2180
}
2111
2181
@@ -2117,6 +2187,18 @@ This attribute may be attached to a variable or struct member declaration and
2117
2187
instructs the backend to replicate the memory generated for the variable or
2118
2188
struct member sufficiently to enable the specified number of simultaneous
2119
2189
threads or loop iterations.
2190
+
2191
+ .. code-block:: c++
2192
+
2193
+ struct foo {
2194
+ [[intel::private_copies(4)]] unsigned int private_copies[64];
2195
+ };
2196
+
2197
+ template <int N>
2198
+ void bar() {
2199
+ [[intel::private_copies(N)]] unsigned int private_copies;
2200
+ }
2201
+
2120
2202
}];
2121
2203
}
2122
2204
@@ -2129,6 +2211,19 @@ instructs the backend to merge the memories used to implement any variable or
2129
2211
struct members that are annotated with this attribute and the same first
2130
2212
argument. The second argument indicates if the memories should be merged in a
2131
2213
depth-wise or width-wise manner.
2214
+
2215
+ .. code-block:: c++
2216
+
2217
+ void bar() {
2218
+ [[intel::merge("mrg1", "depth")]] int merge_depth;
2219
+ [[intel::merge("mrg2", "width")]] int merge_width;
2220
+ }
2221
+
2222
+ struct foo {
2223
+ [[intel::merge("mrg1", "depth")]] unsigned int merge_depth[64];
2224
+ [[intel::merge("mrg2", "width")]] unsigned int merge_width[64];
2225
+ };
2226
+
2132
2227
}];
2133
2228
}
2134
2229
@@ -2140,6 +2235,18 @@ This attribute may be attached to a variable or struct member declaration and
2140
2235
instructs the backend to replicate the memory generated for the variable or
2141
2236
struct member no more than the specified maximum number of times to enable
2142
2237
simultaneous accesses from different load/store sites in the program.
2238
+
2239
+ .. code-block:: c++
2240
+
2241
+ struct foo {
2242
+ [[intel::max_replicates(2)]] unsigned int max_replicates[64];
2243
+ };
2244
+
2245
+ template <int N>
2246
+ void bar() {
2247
+ [[intel::max_replicates(N)]] unsigned int max_replicates;
2248
+ }
2249
+
2143
2250
}];
2144
2251
}
2145
2252
@@ -2151,6 +2258,17 @@ This attribute may be attached to a variable or struct member declaration and
2151
2258
instructs the backend to implement the variable or struct member in a memory
2152
2259
with simple dual port configuration (no memory port services both stores and
2153
2260
loads).
2261
+
2262
+ .. code-block:: c++
2263
+
2264
+ void bar() {
2265
+ [[intel::simple_dual_port]] int var_dual_port;
2266
+ }
2267
+
2268
+ struct foo {
2269
+ [[intel::simple_dual_port]] unsigned int dual_port[64];
2270
+ };
2271
+
2154
2272
}];
2155
2273
}
2156
2274
@@ -2162,6 +2280,23 @@ This attribute may be attached to a variable or struct member declaration and
2162
2280
instructs the backend to implement the variable or struct member in a banked
2163
2281
memory with 2^(N+1) banks, where the (b0, ..., bn) bits specified determine the
2164
2282
pointer address bits to bank on.
2283
+
2284
+ .. code-block:: c++
2285
+
2286
+ void bar() {
2287
+ [[intel::bank_bits(2, 3)]] int var_bank_bits;
2288
+ }
2289
+
2290
+ struct foo {
2291
+ [[intel::bank_bits(1, 2)]] unsigned int bb_bb[4]
2292
+ [[intel::bank_bits(2, 3, 4, 5)]] unsigned int bankbits[64];
2293
+ };
2294
+
2295
+ template <int N>
2296
+ void bar() {
2297
+ [[intel::bank_bits(N, 3)]] unsigned int bank_bits;
2298
+ }
2299
+
2165
2300
}];
2166
2301
}
2167
2302
@@ -2173,15 +2308,40 @@ This attribute may be attached to a variable or struct member declaration and
2173
2308
provides explicit control over the geometry of memory blocks used in a given
2174
2309
memory system.
2175
2310
2311
+ .. code-block:: c++
2312
+
2313
+ struct foo {
2314
+ [[intel::force_pow2_depth(1)]] int var_force_p2d;
2315
+ [[intel::force_pow2_depth(1)]] const int const_force_p2d[64] = {0, 1};
2316
+ };
2317
+
2318
+ template <int N>
2319
+ void bar() {
2320
+ [[intel::force_pow2_depth(N)]] unsigned int reg_force_p2d[64];
2321
+ }
2322
+
2176
2323
In the presence of this attribute, the compiler:
2177
2324
2178
2325
1. Will automatically size the memory depth to the next largest power of 2 if
2179
2326
force_pow2_depth is set to 1, and will prefer width-stitching of RAM blocks
2180
2327
over depth-stitching.
2181
2328
2329
+ .. code-block:: c++
2330
+
2331
+ void func() {
2332
+ [[intel::force_pow2_depth(1)]] unsigned int arr_force_p2d_1[64];
2333
+ }
2334
+
2182
2335
2. Will not size the memory to the next largest power of 2 if force_pow2_depth
2183
2336
is set to 0, and will prefer depth-stitching over width-stitching if RAM usage
2184
2337
can be lowered.
2338
+
2339
+ .. code-block:: c++
2340
+
2341
+ void func() {
2342
+ [[intel::force_pow2_depth(0)]] unsigned int arr_force_p2d_0[64];
2343
+ }
2344
+
2185
2345
}];
2186
2346
}
2187
2347
0 commit comments