CIRCT  19.0.0git
Functions
signals-runtime-wrappers.cpp File Reference
#include "signals-runtime-wrappers.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/Support/raw_ostream.h"
Include dependency graph for signals-runtime-wrappers.cpp:

Go to the source code of this file.

Functions

int allocSignal (State *state, int index, char *owner, uint8_t *value, int64_t size)
 Allocate a new signal. More...
 
void addSigArrayElements (State *state, unsigned index, unsigned size, unsigned numElements)
 Add offset and size information for the elements of an array signal. More...
 
void addSigStructElement (State *state, unsigned index, unsigned offset, unsigned size)
 Add offset and size information for one element of a struct signal. More...
 
void allocProc (State *state, char *owner, ProcState *procState)
 Add allocated constructs to a process instance. More...
 
void allocEntity (State *state, char *owner, uint8_t *entityState)
 Add allocated entity state to the given instance. More...
 
void driveSignal (State *state, SignalDetail *detail, uint8_t *value, uint64_t width, int time, int delta, int eps)
 Drive a value onto a signal. More...
 
void llhdSuspend (State *state, ProcState *procState, int time, int delta, int eps)
 Suspend a process. More...
 

Function Documentation

◆ addSigArrayElements()

void addSigArrayElements ( State state,
unsigned  index,
unsigned  size,
unsigned  numElements 
)

Add offset and size information for the elements of an array signal.

Definition at line 33 of file signals-runtime-wrappers.cpp.

References circt::llhd::sim::State::addSignalElement(), and numElements.

◆ addSigStructElement()

void addSigStructElement ( circt::llhd::sim::State state,
unsigned  index,
unsigned  offset,
unsigned  size 
)

Add offset and size information for one element of a struct signal.

Elements are assumed to be added (by calling this function) in sequential order, from first to last.

Definition at line 39 of file signals-runtime-wrappers.cpp.

References circt::llhd::sim::State::addSignalElement().

◆ allocEntity()

void allocEntity ( State state,
char *  owner,
uint8_t *  entityState 
)

Add allocated entity state to the given instance.

Definition at line 50 of file signals-runtime-wrappers.cpp.

References assert(), and circt::llhd::sim::State::getInstanceIterator().

◆ allocProc()

void allocProc ( State state,
char *  owner,
ProcState procState 
)

Add allocated constructs to a process instance.

Definition at line 44 of file signals-runtime-wrappers.cpp.

References circt::llhd::sim::State::addProcPtr(), and assert().

◆ allocSignal()

int allocSignal ( circt::llhd::sim::State state,
int  index,
char *  owner,
uint8_t *  value,
int64_t  size 
)

Allocate a new signal.

The index of the new signal in the state's list of signals is returned.

Definition at line 25 of file signals-runtime-wrappers.cpp.

References circt::llhd::sim::State::addSignalData(), and assert().

◆ driveSignal()

void driveSignal ( State state,
SignalDetail detail,
uint8_t *  value,
uint64_t  width,
int  time,
int  delta,
int  eps 
)

◆ llhdSuspend()

void llhdSuspend ( State state,
ProcState procState,
int  time,
int  delta,
int  eps 
)

Suspend a process.

Definition at line 71 of file signals-runtime-wrappers.cpp.

References circt::llhd::sim::ProcState::inst, and circt::llhd::sim::State::pushQueue().