CIRCT
19.0.0git
|
The simulator's state. More...
#include <State.h>
Public Member Functions | |
State ()=default | |
Construct a new empty (at 0 time) state. More... | |
~State () | |
State destructor, ensures all malloc'd regions stored in the state are correctly free'd. More... | |
Slot | popQueue () |
Pop the head of the queue and update the simulation time. More... | |
void | pushQueue (Time time, unsigned inst) |
Push a new scheduled wakeup event in the event queue. More... | |
llvm::SmallVectorTemplateCommon< Instance >::iterator | getInstanceIterator (std::string instName) |
Find an instance in the instances list by name and return an iterator for it. More... | |
int | addSignal (std::string name, std::string owner) |
Add a new signal to the state. Returns the index of the new signal. More... | |
int | addSignalData (int index, std::string owner, uint8_t *value, uint64_t size) |
void | addSignalElement (unsigned, unsigned, unsigned) |
void | addProcPtr (std::string name, ProcState *procStatePtr) |
Add a pointer to the process persistence state to a process instance. More... | |
void | dumpSignal (llvm::raw_ostream &out, int index) |
Dump a signal to the out stream. More... | |
void | dumpLayout () |
Dump the instance layout. Used for testing purposes. More... | |
void | dumpSignalTriggers () |
Dump the instances each signal triggers. Used for testing purposes. More... | |
Public Attributes | |
Time | time |
std::string | root |
llvm::SmallVector< Instance, 0 > | instances |
llvm::SmallVector< Signal, 0 > | signals |
UpdateQueue | queue |
The simulator's state.
It contains the current simulation time, signal values and the event queue.
|
default |
Construct a new empty (at 0 time) state.
State::~State | ( | ) |
void State::addProcPtr | ( | std::string | name, |
ProcState * | procStatePtr | ||
) |
Add a pointer to the process persistence state to a process instance.
Definition at line 246 of file State.cpp.
References circt::llhd::sim::ProcState::inst.
Referenced by allocProc().
int State::addSignal | ( | std::string | name, |
std::string | owner | ||
) |
int State::addSignalData | ( | int | index, |
std::string | owner, | ||
uint8_t * | value, | ||
uint64_t | size | ||
) |
Definition at line 254 of file State.cpp.
Referenced by allocSignal().
void State::addSignalElement | ( | unsigned | index, |
unsigned | offset, | ||
unsigned | size | ||
) |
Definition at line 276 of file State.cpp.
Referenced by addSigArrayElements(), and addSigStructElement().
void State::dumpLayout | ( | ) |
void State::dumpSignal | ( | llvm::raw_ostream & | out, |
int | index | ||
) |
void State::dumpSignalTriggers | ( | ) |
llvm::SmallVectorTemplateCommon< Instance >::iterator State::getInstanceIterator | ( | std::string | instName | ) |
Find an instance in the instances list by name and return an iterator for it.
Definition at line 231 of file State.cpp.
References assert().
Referenced by allocEntity().
Slot State::popQueue | ( | ) |
void State::pushQueue | ( | Time | time, |
unsigned | inst | ||
) |
Push a new scheduled wakeup event in the event queue.
Definition at line 224 of file State.cpp.
Referenced by llhdSuspend().
llvm::SmallVector<Instance, 0> circt::llhd::sim::State::instances |
UpdateQueue circt::llhd::sim::State::queue |
Definition at line 350 of file State.h.
Referenced by driveSignal().
llvm::SmallVector<Signal, 0> circt::llhd::sim::State::signals |
Definition at line 349 of file State.h.
Referenced by driveSignal().
Time circt::llhd::sim::State::time |
Definition at line 346 of file State.h.
Referenced by driveSignal().