Convert any datatype to bit-vector.
More...
|
| template<typename T > |
| sc_lv< Wrapped< T >::width > | TypeToBits (T in) |
| | Convert Type to logic vector.
|
| |
| template<typename T > |
| T | BitsToType (sc_lv< Wrapped< T >::width > mbits) |
| | Convert logic vector to type.
|
| |
| template<typename T > |
| | NVUINTW (Wrapped< T >::width) TypeToNVUINT(T in) |
| | Convert Type to NVUINT.
|
| |
| template<typename T > |
| T | NVUINTToType (const NVUINTW(Wrapped< T >::width) &uintbits) |
| | Convert NVUINT to type.
|
| |
Convert any datatype to bit-vector.
◆ TypeToBits()
template<typename T >
| sc_lv< Wrapped< T >::width > TypeToBits |
( |
T |
in | ) |
|
Convert Type to logic vector.
- Template Parameters
-
- Parameters
-
| [in] | in | Input variable of type T |
| [out] | ReturnVal | input variable converted to logic vector |
- A Simple Example
#include <TypeToBits.h>
...
NVUINT4 input = 4;
sc_lv<4> output = TypeToBits<NVUINT4>(input);
...
Definition at line 48 of file TypeToBits.h.
◆ BitsToType()
template<typename T >
| T BitsToType |
( |
sc_lv< Wrapped< T >::width > |
mbits | ) |
|
Convert logic vector to type.
- Template Parameters
-
- Parameters
-
| [in] | in | Input variable of sc_lv type |
| [out] | ReturnVal | input variable converted to target datatype |
- A Simple Example
#include <TypeToBits.h>
...
sc_lv<4> input = 4;
NVUINT4 output = BitsToType<NVUINT4>(input);
...
Definition at line 81 of file TypeToBits.h.
◆ NVUINTW()
template<typename T >
| NVUINTW |
( |
Wrapped< T >::width |
| ) |
|
Convert Type to NVUINT.
- Template Parameters
-
- Parameters
-
| [in] | in | Input variable of type T |
| [out] | ReturnVal | input variable converted to NVUINT |
- A Simple Example
#include <TypeToBits.h>
...
Word_t input;
...
NVUINT4 output = TypeToNVUINT<Word_t>(input);
...
Definition at line 115 of file TypeToBits.h.
◆ NVUINTToType()
template<typename T >
| T NVUINTToType |
( |
const NVUINTW(Wrapped< T >::width) & |
uintbits | ) |
|
Convert NVUINT to type.
- Template Parameters
-
- Parameters
-
| [in] | in | Input variable of NVUINT type |
| [out] | ReturnVal | input variable converted to target datatype |
- A Simple Example
#include <TypeToBits.h>
...
NVUINT4 input = 4;
Word_t output = NVUINTToType<Word_t>(input);
...
Definition at line 144 of file TypeToBits.h.