An implementation of array that declares VectorLength variables for array of size VectorLength.
More...
#include <nvhls_array.h>
|
| nv_array (const char *prefix) |
|
| nv_array (sc_module_name prefix) |
|
| nv_array (sc_module_name prefix, const unsigned int &id) |
|
| nv_array_bank_array_no_assert_base (const char *prefix) |
|
Type & | operator[] (size_t idx) |
|
const Type & | operator[] (size_t idx) const |
|
template<typename Type, unsigned int VectorLength>
class nvhls::nv_array< Type, VectorLength >
An implementation of array that declares VectorLength variables for array of size VectorLength.
- Template Parameters
-
Type | Datatype |
VectorLength | Size of array |
- Overview
- Declares VectorLength variables to realize an array of size VectorLength
- Helpful when HLS tool does not recognize your array correctly and requires unrolling array
- nv_array also has specialization for size 0 arrays
- Usage of this class is not recommended for new models. Instead, 1) If the array is modeling a RAM/ROM, use a dedicated class for this purpose such as ac_bank_array. 2) If the array is not modeling a RAM/ROM, use a dedicated class for this purpose. In both cases, the dedicated classes should always assert on invalid indexes.
- A Simple Example
#include <nvhls_array.h>
...
nvhls::nv_array<NVUINT32, ArraySize> array;
for (unsigned i = 0; i < ArraySize; i++) {
array[i] = i;
}
Definition at line 145 of file nvhls_array.h.
The documentation for this class was generated from the following file: