File FliImpl.h

Functions

void cocotb_init()
void handle_fli_callback(void *data)
class FliProcessCbHdl : public virtual GpiCbHdl

Subclassed by FliShutdownCbHdl, FliSignalCbHdl, FliSimPhaseCbHdl, FliStartupCbHdl, FliTimedCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

int cleanup_callback()

Public Functions

FliProcessCbHdl(GpiImplInterface *impl)
virtual ~FliProcessCbHdl()
virtual int arm_callback() = 0

Protected Attributes

mtiProcessIdT m_proc_hdl
bool m_sensitised
class FliSignalCbHdl : public FliProcessCbHdl, public GpiValueCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

FliSignalCbHdl(GpiImplInterface *impl, FliSignalObjHdl *sig_hdl, unsigned int edge)
int arm_callback()

Public Functions

virtual ~FliSignalCbHdl()
int cleanup_callback()

Private Members

mtiSignalIdT m_sig_hdl
class FliSimPhaseCbHdl : public FliProcessCbHdl

Subclassed by FliNextPhaseCbHdl, FliReadOnlyCbHdl, FliReadWriteCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

int arm_callback()

Public Functions

FliSimPhaseCbHdl(GpiImplInterface *impl, mtiProcessPriorityT priority)
virtual ~FliSimPhaseCbHdl()

Protected Attributes

mtiProcessPriorityT m_priority
class FliReadWriteCbHdl : public FliSimPhaseCbHdl

Public Functions

FliReadWriteCbHdl(GpiImplInterface *impl)
virtual ~FliReadWriteCbHdl()
class FliNextPhaseCbHdl : public FliSimPhaseCbHdl

Public Functions

FliNextPhaseCbHdl(GpiImplInterface *impl)
virtual ~FliNextPhaseCbHdl()
class FliReadOnlyCbHdl : public FliSimPhaseCbHdl

Public Functions

FliReadOnlyCbHdl(GpiImplInterface *impl)
virtual ~FliReadOnlyCbHdl()
class FliStartupCbHdl : public FliProcessCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

int arm_callback()
int run_callback()

Public Functions

FliStartupCbHdl(GpiImplInterface *impl)
virtual ~FliStartupCbHdl()
class FliShutdownCbHdl : public FliProcessCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

int arm_callback()
int run_callback()

Public Functions

FliShutdownCbHdl(GpiImplInterface *impl)
virtual ~FliShutdownCbHdl()
class FliTimedCbHdl : public FliProcessCbHdl

cleanup callback

Called while unwinding after a GPI callback

We keep the process but desensitize it

NB: need a way to determine if should leave it sensitized…

FliTimedCbHdl(GpiImplInterface *impl, uint64_t time_ps)
int arm_callback()
int cleanup_callback()

Public Functions

virtual ~FliTimedCbHdl()
void reset_time(uint64_t new_time)

Private Members

uint64_t m_time_ps
class FliObj

Subclassed by FliObjHdl, FliSignalObjHdl

Public Functions

FliObj(int acc_type, int acc_full_type)
virtual ~FliObj()
int get_acc_type()
int get_acc_full_type()

Protected Attributes

int m_acc_type
int m_acc_full_type
class FliObjHdl : public GpiObjHdl, public FliObj

Public Functions

FliObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, int acc_type, int acc_full_type)
FliObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, int acc_type, int acc_full_type, bool is_const)
virtual ~FliObjHdl()
int initialise(std::string &name, std::string &fq_name)
class FliSignalObjHdl : public GpiSignalObjHdl, public FliObj

Subclassed by FliValueObjHdl

Public Functions

FliSignalObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var)
virtual ~FliSignalObjHdl()
GpiCbHdl *value_change_cb(unsigned int edge)
int initialise(std::string &name, std::string &fq_name)
bool is_var()

Protected Attributes

bool m_is_var
FliSignalCbHdl m_rising_cb
FliSignalCbHdl m_falling_cb
FliSignalCbHdl m_either_cb
class FliValueObjHdl : public FliSignalObjHdl

Subclassed by FliEnumObjHdl, FliIntObjHdl, FliLogicObjHdl, FliRealObjHdl, FliStringObjHdl

Public Functions

FliValueObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliValueObjHdl()
const char *get_signal_value_binstr()
const char *get_signal_value_str()
double get_signal_value_real()
long get_signal_value_long()
int set_signal_value(const long value)
int set_signal_value(const double value)
int set_signal_value(std::string &value)
void *get_sub_hdl(int index)
int initialise(std::string &name, std::string &fq_name)
mtiTypeKindT get_fli_typekind()
mtiTypeIdT get_fli_typeid()

Protected Attributes

mtiTypeKindT m_fli_type
mtiTypeIdT m_val_type
char *m_val_buff
void **m_sub_hdls
class FliEnumObjHdl : public FliValueObjHdl

Public Functions

FliEnumObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliEnumObjHdl()
const char *get_signal_value_str()
long get_signal_value_long()
int set_signal_value(const long value)
int initialise(std::string &name, std::string &fq_name)

Private Members

char **m_value_enum
mtiInt32T m_num_enum
class FliLogicObjHdl : public FliValueObjHdl

Public Functions

FliLogicObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliLogicObjHdl()
const char *get_signal_value_binstr()
int set_signal_value(const long value)
int set_signal_value(std::string &value)
int initialise(std::string &name, std::string &fq_name)

Private Members

char *m_mti_buff
char **m_value_enum
mtiInt32T m_num_enum
std::map<char, mtiInt32T> m_enum_map
class FliIntObjHdl : public FliValueObjHdl

Public Functions

FliIntObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliIntObjHdl()
const char *get_signal_value_binstr()
long get_signal_value_long()
int set_signal_value(const long value)
int initialise(std::string &name, std::string &fq_name)
class FliRealObjHdl : public FliValueObjHdl

Public Functions

FliRealObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliRealObjHdl()
double get_signal_value_real()
int set_signal_value(const double value)
int initialise(std::string &name, std::string &fq_name)

Private Members

double *m_mti_buff
class FliStringObjHdl : public FliValueObjHdl

Public Functions

FliStringObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const, int acc_type, int acc_full_type, bool is_var, mtiTypeIdT valType, mtiTypeKindT typeKind)
virtual ~FliStringObjHdl()
const char *get_signal_value_str()
int set_signal_value(std::string &value)
int initialise(std::string &name, std::string &fq_name)

Private Members

char *m_mti_buff
class FliTimerCache

Find the root handle

Find the root handle using an optional name

Get a handle to the root simulator object. This is usually the toplevel.

If no name is provided, we return the first root instance.

If name is provided, we check the name against the available objects until we find a match. If no match is found we return NULL

FliTimedCbHdl *get_timer(uint64_t time_ps)
void put_timer(FliTimedCbHdl *hdl)

Public Functions

FliTimerCache(FliImpl *impl)
~FliTimerCache()

Private Members

std::queue<FliTimedCbHdl *> free_list
FliImpl *impl
class FliIterator : public GpiIterator

Find the root handle

Find the root handle using an optional name

Get a handle to the root simulator object. This is usually the toplevel.

If no name is provided, we return the first root instance.

If name is provided, we check the name against the available objects until we find a match. If no match is found we return NULL

GpiIteratorMapping<int, FliIterator::OneToMany> iterate_over
FliIterator(GpiImplInterface *impl, GpiObjHdl *hdl)
GpiIterator::Status next_handle(std::string &name, GpiObjHdl **hdl, void **raw_hdl)
void populate_handle_list(OneToMany childType)

Public Types

enum OneToMany

Values:

OTM_END = 0
OTM_CONSTANTS
OTM_SIGNALS
OTM_REGIONS
OTM_SIGNAL_SUB_ELEMENTS
OTM_VARIABLE_SUB_ELEMENTS

Public Functions

virtual ~FliIterator()

Private Members

std::vector<OneToMany> *selected
std::vector<OneToMany>::iterator one2many
std::vector<void *> m_vars
std::vector<void *> m_sigs
std::vector<void *> m_regs
std::vector<void *> *m_currentHandles
std::vector<void *>::iterator m_iterator
class FliImpl : public GpiImplInterface

Native Check Create

Determine whether a simulation object is native to FLI and create a handle if it is

GpiObjHdl *native_check_create(std::string &name, GpiObjHdl *parent)
GpiObjHdl *native_check_create(int32_t index, GpiObjHdl *parent)
const char *reason_to_string(int reason)

Get current simulation time

Get current simulation time

NB units depend on the simulation configuration

void get_sim_time(uint32_t *high, uint32_t *low)
void get_sim_precision(int32_t *precision)

Find the root handle

Find the root handle using an optional name

Get a handle to the root simulator object. This is usually the toplevel.

If no name is provided, we return the first root instance.

If name is provided, we check the name against the available objects until we find a match. If no match is found we return NULL

GpiObjHdl *get_root_handle(const char *name)
GpiIterator *iterate_handle(GpiObjHdl *obj_hdl, gpi_iterator_sel_t type)
GpiCbHdl *register_timed_callback(uint64_t time_ps)
GpiCbHdl *register_readonly_callback()
GpiCbHdl *register_nexttime_callback()
GpiCbHdl *register_readwrite_callback()
int deregister_callback(GpiCbHdl *obj_hdl)

Public Functions

FliImpl(const std::string &name)
void sim_end()
GpiObjHdl *native_check_create(void *raw_hdl, GpiObjHdl *paret)
GpiObjHdl *create_gpi_obj_from_handle(void *hdl, std::string &name, std::string &fq_name, int accType, int accFullType)

Public Members

FliTimerCache cache

Private Functions

bool isValueConst(int kind)
bool isValueLogic(mtiTypeIdT type)
bool isValueChar(mtiTypeIdT type)
bool isValueBoolean(mtiTypeIdT type)
bool isTypeValue(int type)
bool isTypeSignal(int type, int full_type)

Private Members

FliReadOnlyCbHdl m_readonly_cbhdl
FliNextPhaseCbHdl m_nexttime_cbhdl
FliReadWriteCbHdl m_readwrite_cbhdl