Go to the documentation of this file.
51 #ifndef __SYSTEMC_EXT_DT_FX_SCFX_MANT_HH__
52 #define __SYSTEMC_EXT_DT_FX_SCFX_MANT_HH__
54 #include "../../utils/endian.hh"
55 #include "../../utils/functions.hh"
66 typedef unsigned int word;
104 static void free(
word *, std::size_t);
118 #if defined(SC_BOOST_BIG_ENDIAN )
120 #elif defined(SC_BOOST_LITTLE_ENDIAN)
128 #if defined(SC_BOOST_BIG_ENDIAN)
130 #elif defined(SC_BOOST_LITTLE_ENDIAN)
139 #if defined(SC_BOOST_BIG_ENDIAN)
141 #elif defined(SC_BOOST_LITTLE_ENDIAN)
150 #if defined(SC_BOOST_BIG_ENDIAN)
152 #elif defined(SC_BOOST_LITTLE_ENDIAN)
159 m_array = alloc(size_);
163 m_array(0), m_size(rhs.m_size)
175 if (
m_size != rhs.m_size) {
217 for (
int i = 0;
i <
size;
i++) {
219 #if defined(SC_BOOST_BIG_ENDIAN)
221 #elif defined(SC_BOOST_LITTLE_ENDIAN)
225 #if defined(SC_BOOST_BIG_ENDIAN)
227 #elif defined(SC_BOOST_LITTLE_ENDIAN)
233 for (
int i = 0;
i <
size;
i++) {
235 #if defined(SC_BOOST_BIG_ENDIAN)
237 #elif defined(SC_BOOST_LITTLE_ENDIAN)
241 #if defined(SC_BOOST_BIG_ENDIAN)
243 #elif defined(SC_BOOST_LITTLE_ENDIAN)
261 "mantissa index out of range");
262 #if defined(SC_BOOST_BIG_ENDIAN)
264 #elif defined(SC_BOOST_LITTLE_ENDIAN )
273 "mantissa index out of range" );
274 #if defined(SC_BOOST_BIG_ENDIAN)
276 #elif defined(SC_BOOST_LITTLE_ENDIAN)
285 #if defined(SC_BOOST_BIG_ENDIAN)
287 #elif defined(SC_BOOST_LITTLE_ENDIAN)
299 for (
int i = 0;
i < size;
i++) {
300 target[
i] = ~source[
i];
311 for (
int i = 0;
i < mant.size();
i++) {
349 void *
operator new(std::size_t sz) { return ::operator
new (sz); }
366 m_mant(const_cast<scfx_mant *>(& mant)), m_not_const(false)
370 m_mant(mant), m_not_const(true)
373 inline scfx_mant_ref &
378 m_mant =
const_cast<scfx_mant *
>(&mant);
400 inline scfx_mant_ref::operator
scfx_mant & ()
415 #endif // __SYSTEMC_EXT_DT_FX_SCFX_MANT_HH__
static void free(word *, std::size_t)
static word * alloc(std::size_t)
void inc(scfx_mant &mant)
void complement(scfx_mant &target, const scfx_mant &source, int size)
void resize_to(int, int=0)
static void free_word(word *array, std::size_t size)
scfx_mant_ref & operator=(const scfx_mant &)
scfx_mant & operator=(const scfx_mant &)
const T sc_min(const T &a, const T &b)
word operator[](int) const
static word * alloc_word(std::size_t size)
half_word * half_addr(int=0) const
half_word half_at(int) const
#define SC_ASSERT_(cnd, msg)
Generated on Wed Sep 30 2020 14:02:15 for gem5 by doxygen 1.8.17