CIRCT  19.0.0git
Public Member Functions | Private Attributes | List of all members
circt::llhd::sim::Time Class Reference

The simulator's internal representation of time. More...

#include <State.h>

Collaboration diagram for circt::llhd::sim::Time:
Collaboration graph
[legend]

Public Member Functions

 Time ()=default
 Empty (zero) time constructor. All the time values are defaulted to 0. More...
 
 Time (uint64_t time, uint64_t delta, uint64_t eps)
 Construct with given time values. More...
 
bool operator< (const Time &rhs) const
 Compare the time values in order of time, delta, eps. More...
 
bool operator== (const Time &rhs) const
 Return true if all the time values are equal. More...
 
Time operator+ (const Time &rhs) const
 Add two time values. More...
 
std::string toString () const
 Get the stored time in a printable format. More...
 
uint64_t getTime () const
 

Private Attributes

uint64_t time
 Simulation real time. More...
 
uint64_t delta
 
uint64_t eps
 

Detailed Description

The simulator's internal representation of time.

Definition at line 30 of file State.h.

Constructor & Destructor Documentation

◆ Time() [1/2]

circt::llhd::sim::Time::Time ( )
default

Empty (zero) time constructor. All the time values are defaulted to 0.

Referenced by operator+().

◆ Time() [2/2]

circt::llhd::sim::Time::Time ( uint64_t  time,
uint64_t  delta,
uint64_t  eps 
)
inline

Construct with given time values.

Definition at line 36 of file State.h.

Member Function Documentation

◆ getTime()

uint64_t circt::llhd::sim::Time::getTime ( ) const
inline

Definition at line 58 of file State.h.

References time.

Referenced by circt::llhd::sim::Trace::flush(), and circt::llhd::sim::Trace::flushMerged().

◆ operator+()

Time circt::llhd::sim::Time::operator+ ( const Time rhs) const
inline

Add two time values.

Definition at line 51 of file State.h.

References delta, eps, Time(), and time.

◆ operator<()

bool circt::llhd::sim::Time::operator< ( const Time rhs) const
inline

Compare the time values in order of time, delta, eps.

Definition at line 40 of file State.h.

References delta, eps, and time.

◆ operator==()

bool circt::llhd::sim::Time::operator== ( const Time rhs) const
inline

Return true if all the time values are equal.

Definition at line 46 of file State.h.

References delta, eps, and time.

◆ toString()

std::string Time::toString ( ) const

Get the stored time in a printable format.

Definition at line 28 of file State.cpp.

Referenced by circt::llhd::sim::Trace::flushFull().

Member Data Documentation

◆ delta

uint64_t circt::llhd::sim::Time::delta
private

Definition at line 63 of file State.h.

Referenced by operator+(), operator<(), and operator==().

◆ eps

uint64_t circt::llhd::sim::Time::eps
private

Definition at line 64 of file State.h.

Referenced by operator+(), operator<(), and operator==().

◆ time

uint64_t circt::llhd::sim::Time::time
private

Simulation real time.

Definition at line 62 of file State.h.

Referenced by circt::llhd::sim::UpdateQueue::getOrCreateSlot(), getTime(), operator+(), operator<(), and operator==().


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