PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Data Fields
FloatFormat Class Reference

#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
 

Detailed Description

Definition at line 240 of file soft_float_cg_ext.hpp.

Member Enumeration Documentation

◆ FPException

Enumerator
FPException_Overflow 
FPException_IEEE 
FPException_Saturation 

Definition at line 249 of file soft_float_cg_ext.hpp.

◆ FPRounding

Enumerator
FPRounding_Truncate 
FPRounding_NearestEven 

Definition at line 243 of file soft_float_cg_ext.hpp.

Constructor & Destructor Documentation

◆ FloatFormat()

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().

Here is the caller graph for this function:

Member Function Documentation

◆ FromString()

FloatFormatRef FloatFormat::FromString ( std::string  ff_str)
static

◆ ieee_format()

bool FloatFormat::ieee_format ( ) const

◆ operator!=()

bool FloatFormat::operator!= ( const FloatFormat other) const

◆ operator==()

bool FloatFormat::operator== ( const FloatFormat other) const

◆ ToString()

std::string FloatFormat::ToString ( ) const

Field Documentation

◆ exception_mode

FPException FloatFormat::exception_mode

Definition at line 260 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ exp_bias

int32_t FloatFormat::exp_bias

Definition at line 258 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ exp_bits

uint8_t FloatFormat::exp_bits

Definition at line 256 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ frac_bits

uint8_t FloatFormat::frac_bits

Definition at line 257 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ has_one

bool FloatFormat::has_one

Definition at line 261 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ has_subnorm

bool FloatFormat::has_subnorm

Definition at line 262 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ rounding_mode

FPRounding FloatFormat::rounding_mode

Definition at line 259 of file soft_float_cg_ext.hpp.

Referenced by ieee_format(), operator!=(), operator==(), and ToString().

◆ sign

bit_lattice FloatFormat::sign

Definition at line 263 of file soft_float_cg_ext.hpp.

Referenced by FromString(), ieee_format(), operator!=(), operator==(), and ToString().


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:03:51 for PandA-2024.02 by doxygen 1.8.13