Vitis HLS provides a C++ template class,
ap_[u]int<>
, that implements arbitrary
precision (or bit-accurate) integer data types with consistent, bit-accurate behavior
between software and hardware modeling.
This class provides all arithmetic, bitwise, logical and relational operators allowed for native C integer types. In addition, this class provides methods to handle some useful hardware operations, such as allowing initialization and conversion of variables of widths greater than 64 bits. Details for all operators and class methods are discussed below.