VCDValue.cpp
Go to the documentation of this file.
1 
2 #include "VCDValue.hpp"
3 
4 
5 /*!
6 */
8  VCDBit value
9 ){
10  this -> type = VCD_SCALAR;
11  this -> value.val_bit = value;
12 }
13 
14 /*!
15 */
18 ){
19  this -> type = VCD_VECTOR;
20  this -> value.val_vector= value;
21 }
22 
23 /*!
24 */
27 ){
28  this -> type = VCD_REAL;
29  this -> value.val_real = value;
30 }
31 
32 
34  return this -> type;
35 }
36 
37 
38 /*!
39 */
41  return this -> value.val_bit;
42 }
43 
44 
45 /*!
46 */
48  return this -> value.val_vector;
49 }
50 
51 
52 /*!
53 */
55  return this -> value.val_real;
56 }
57 
IEEE Floating point (64bit).
Definition: VCDTypes.hpp:54
VCDValueType type
The type of value this instance stores.
Definition: VCDValue.hpp:77
std::vector< VCDBit > VCDBitVector
A vector of VCDBit values.
Definition: VCDTypes.hpp:44
VCDValueType get_type()
Return the type of value stored by this class instance.
Definition: VCDValue.cpp:33
VCDBitVector * val_vector
Value as a bit vector.
Definition: VCDValue.hpp:82
VCDReal val_real
Value as a real number (double).
Definition: VCDValue.hpp:83
union VCDValue::valstore value
VCDBit val_bit
Value as a bit.
Definition: VCDValue.hpp:81
VCDBitVector * get_value_vector()
Get the vector value of the instance.
Definition: VCDValue.cpp:47
double VCDReal
Typedef to identify a real number as stored in a VCD.
Definition: VCDTypes.hpp:47
VCDValueType
Describes how a signal value is represented in the VCD trace.
Definition: VCDTypes.hpp:51
Vector of VCDBit.
Definition: VCDTypes.hpp:53
VCDBit
Represents the four-state signal values of a VCD file.
Definition: VCDTypes.hpp:35
Single VCDBit.
Definition: VCDTypes.hpp:52
VCDReal get_value_real()
Get the real value of the instance.
Definition: VCDValue.cpp:54
VCDBit get_value_bit()
Get the bit value of the instance.
Definition: VCDValue.cpp:40
VCDValue(VCDBit value)
Create a new VCDValue with the type VCD_SCALAR.
Definition: VCDValue.cpp:7