74 const DataT & dat = data_.
getValue();
101 return clock_->
getCycle(data_valid_time_stamp_);
File that defines the Clock class.
#define sparta_assert(...)
Simple variadic assertion that will throw a sparta_exception if the condition fails.
File that defines a ValidValue.
A representation of simulated time.
Scheduler * getScheduler() const
Cycle getCycle(const Scheduler::Tick &tick) const
Given the tick, convert to a Clock::Cycle.
Used by DataInPort and SyncInPort, this class holds received data from these ports and remembers the ...
DataContainer(const sparta::Clock *clk)
Construct the DataContainer with the clock used for timestamping.
DataT pullData()
Return the last data received by the port, then clear it.
bool dataReceived() const
Has this port received data (not timed)
bool dataReceivedThisCycle() const
Has this port received data this cycle.
void setData_(const DataT &dat)
Set the data received.
const DataT & peekData() const
Peek at the data in the port, but don't invalidate it.
void clearData()
Clear the validity of the data at the port.
Clock::Cycle getReceivedTimeStamp() const
Returns the clock cycle data was received.
Tick getCurrentTick() const noexcept
The current tick the Scheduler is working on or just finished.
uint64_t Tick
Typedef for our unit of time.
Provides a wrapper around a value to ensure that the value is assigned.
void clearValid()
Clear the validity of this object.
const value_type & getValue() const
Get the value - const version.
bool isValid() const
Is this value valid.
Macros for handling exponential backoff.