MatchLib
nvhls::nvhls_t< N, B > Struct Template Reference

Definition of vendor agnostic integer data types. More...

Detailed Description

template<unsigned int N, bool B = (N <= 64)>
struct nvhls::nvhls_t< N, B >

Definition of vendor agnostic integer data types.

Template Parameters
NBitwidth of integer
Overview
  • Wrapper to unify use of different integer implementation and simplify use of ac_int, sc_int and sc_bigint types
  • Contains nvuint_t and nvint_t typedefs that conditionally map to ac_int or sc_int types based on CFLAG
  • Specifying CFLAG HLS_CATAPULT typedefs ac_int to nvint, otherwise typedefs sc_int to nvint
  • nvint also supports conditional typedef of sc_int and sc_bigint depending on bitwidth
  • Simple macros to declare integers are defined in nvhls_types.h
A Simple Example
#include <nvhls_int.h>
#include <nvhls_types.h>
const GLOBAL_CONST_WIDTH = 5;
...
template <int N>
void myfunc() {
nvhls::nvhls_t<5>::nvuint_t var1; // Unsigned integer of width 5
nvhls::nvhls_t<3>::nvint_t var2; // Signed integer of width 3
NVUINT5 var3; // Simplified unsigned integer of width 5 defined using macro
NVINT3 var4; // Simplified signed integer of width 3 defined using macro
NVUINTW(N) var5; // Simplified unsigned integer where width is template parameter
NVINTW(N) var6; // Simplified signed integer where width is template parameter
NVUINTC(GLOBAL_CONST_WIDTH) var7; // Simplified unsigned integer where width is global constant
NVINTC(GLOBAL_CONST_WIDTH) var8; // Simplified signed integer where width is global constant
}
...
NVUINTW(Wrapped< T >::width) TypeToNVUINT(T in)
Convert Type to NVUINT.
Definition: TypeToBits.h:115
#define NVINTC(width)
Definition: nvhls_types.h:79
#define NVINTW(width)
Definition: nvhls_types.h:51
#define NVUINTC(width)
Definition of vendor agnostic integer data types.
Definition: nvhls_int.h:336

Definition at line 336 of file nvhls_int.h.


The documentation for this struct was generated from the following file: