PandA-2024.02
|
#include <soft_float_cg_ext.hpp>
Public Types | |
enum | FPRounding { FPRounding_Truncate = 0, FPRounding_NearestEven = 1 } |
enum | FPException { FPException_Overflow = 0, FPException_IEEE = 1, FPException_Saturation = 2 } |
Public Member Functions | |
FloatFormat (uint8_t _exp_bits, uint8_t _frac_bits, int32_t _exp_bias, FPRounding _rounding_mode=FPRounding_NearestEven, FPException _exception_mode=FPException_IEEE, bool _has_one=true, bool _has_subnorm=false, bit_lattice _sign=bit_lattice::U) | |
bool | operator== (const FloatFormat &other) const |
bool | operator!= (const FloatFormat &other) const |
bool | ieee_format () const |
std::string | ToString () const |
Static Public Member Functions | |
static FloatFormatRef | FromString (std::string ff_str) |
Data Fields | |
uint8_t | exp_bits |
uint8_t | frac_bits |
int32_t | exp_bias |
FPRounding | rounding_mode |
FPException | exception_mode |
bool | has_one |
bool | has_subnorm |
bit_lattice | sign |
Definition at line 240 of file soft_float_cg_ext.hpp.
Enumerator | |
---|---|
FPException_Overflow | |
FPException_IEEE | |
FPException_Saturation |
Definition at line 249 of file soft_float_cg_ext.hpp.
Enumerator | |
---|---|
FPRounding_Truncate | |
FPRounding_NearestEven |
Definition at line 243 of file soft_float_cg_ext.hpp.
FloatFormat::FloatFormat | ( | uint8_t | _exp_bits, |
uint8_t | _frac_bits, | ||
int32_t | _exp_bias, | ||
FPRounding | _rounding_mode = FPRounding_NearestEven , |
||
FPException | _exception_mode = FPException_IEEE , |
||
bool | _has_one = true , |
||
bool | _has_subnorm = false , |
||
bit_lattice | _sign = bit_lattice::U |
||
) |
Definition at line 2704 of file soft_float_cg_ext.cpp.
Referenced by FromString().
|
static |
Definition at line 2801 of file soft_float_cg_ext.cpp.
References FloatFormat(), FP_FORMAT_BIAS, FP_FORMAT_EXC, FP_FORMAT_EXP, FP_FORMAT_RND, FP_FORMAT_SIG, FP_FORMAT_SIGN, FP_FORMAT_SPEC, FPException_IEEE, FPException_Overflow, FPException_Saturation, FPRounding_NearestEven, FPRounding_Truncate, ONE, sign, and ZERO.
Referenced by soft_float_cg_ext::soft_float_cg_ext().
bool FloatFormat::ieee_format | ( | ) | const |
Definition at line 2731 of file soft_float_cg_ext.cpp.
References exception_mode, exp_bias, exp_bits, FPException_IEEE, FPRounding_NearestEven, frac_bits, has_one, has_subnorm, rounding_mode, sign, and U.
bool FloatFormat::operator!= | ( | const FloatFormat & | other | ) | const |
Definition at line 2724 of file soft_float_cg_ext.cpp.
References exception_mode, exp_bias, exp_bits, frac_bits, has_one, has_subnorm, rounding_mode, and sign.
bool FloatFormat::operator== | ( | const FloatFormat & | other | ) | const |
Definition at line 2717 of file soft_float_cg_ext.cpp.
References exception_mode, exp_bias, exp_bits, frac_bits, has_one, has_subnorm, rounding_mode, and sign.
std::string FloatFormat::ToString | ( | ) | const |
Definition at line 2739 of file soft_float_cg_ext.cpp.
References abs, exception_mode, exp_bias, exp_bits, FPException_IEEE, FPException_Overflow, FPException_Saturation, FPRounding_NearestEven, FPRounding_Truncate, frac_bits, has_one, has_subnorm, ONE, rounding_mode, sign, U, X, and ZERO.
FPException FloatFormat::exception_mode |
Definition at line 260 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
int32_t FloatFormat::exp_bias |
Definition at line 258 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
uint8_t FloatFormat::exp_bits |
Definition at line 256 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
uint8_t FloatFormat::frac_bits |
Definition at line 257 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
bool FloatFormat::has_one |
Definition at line 261 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
bool FloatFormat::has_subnorm |
Definition at line 262 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
FPRounding FloatFormat::rounding_mode |
Definition at line 259 of file soft_float_cg_ext.hpp.
Referenced by ieee_format(), operator!=(), operator==(), and ToString().
bit_lattice FloatFormat::sign |
Definition at line 263 of file soft_float_cg_ext.hpp.
Referenced by FromString(), ieee_format(), operator!=(), operator==(), and ToString().