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.
This section includes comprehensive information on the methods, synthesis
behavior, and all aspects of using the ap_(u)int<N>
arbitrary precision
integer types.
- Techniques for assigning constant and initialization values to arbitrary precision integers (including values greater than 1024-bit).
- A description of Vitis HLS helper methods, such as printing, concatenating, bit-slicing and range selection functions.
- A description of operator behavior, including a description of shift operations (a negative shift values, results in a shift in the opposite direction).