File gpi_priv.h

Defines

GPI_ENTRY_POINT(NAME, func)

extern “C” { \

void NAME##_entry_point() \

{ \

func(); \

} \

}


Typedefs

typedef enum gpi_cb_state gpi_cb_state_e
typedef void (*layer_entry_func)()

Enums

enum gpi_cb_state

Values:

enumerator GPI_FREE = 0
enumerator GPI_PRIMED = 1
enumerator GPI_CALL = 2
enumerator GPI_REPRIME = 3
enumerator GPI_DELETE = 4

Functions

int gpi_register_impl(GpiImplInterface *func_tbl)
void gpi_embed_init(int argc, char const *const *argv)
void gpi_cleanup()
void gpi_embed_end()
void gpi_embed_event(gpi_event_t level, const char *msg)
void gpi_load_extra_libs()
class GpiHdl

Subclassed by GpiCbHdl, GpiIterator, GpiObjHdl

Public Functions

GpiHdl(GpiImplInterface *impl)
GpiHdl(GpiImplInterface *impl, void *hdl)
~GpiHdl() = default
template<typename T>
T get_handle() const
bool is_this_impl(GpiImplInterface *impl)

Public Members

GpiImplInterface *m_impl

Protected Attributes

void *m_obj_hdl

Private Functions

GpiHdl()
class GpiObjHdl : public GpiHdl

Subclassed by FliObjHdl, GpiSignalObjHdl, VhpiArrayObjHdl, VhpiObjHdl, VpiArrayObjHdl, VpiObjHdl

Public Functions

GpiObjHdl(GpiImplInterface *impl)
GpiObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype)
GpiObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const)
~GpiObjHdl() = default
const char *get_name_str()
const char *get_fullname_str()
const char *get_type_str()
gpi_objtype_t get_type()
bool get_const()
int get_num_elems()
int get_range_left()
int get_range_right()
int get_indexable()
const std::string &get_name()
const std::string &get_fullname()
const char *get_definition_name()
const char *get_definition_file()
bool is_native_impl(GpiImplInterface *impl)
int initialise(std::string &name, std::string &full_name)

Protected Attributes

int m_num_elems
bool m_indexable
int m_range_left
int m_range_right
std::string m_name
std::string m_fullname
std::string m_definition_name
std::string m_definition_file
gpi_objtype_t m_type
bool m_const
class GpiSignalObjHdl : public GpiObjHdl

Subclassed by FliSignalObjHdl, VhpiSignalObjHdl, VpiSignalObjHdl

Public Functions

GpiSignalObjHdl(GpiImplInterface *impl, void *hdl, gpi_objtype_t objtype, bool is_const)
~GpiSignalObjHdl() = default
const char *get_signal_value_binstr() = 0
const char *get_signal_value_str() = 0
double get_signal_value_real() = 0
long get_signal_value_long() = 0
int set_signal_value(const long value, gpi_set_action_t action) = 0
int set_signal_value(const double value, gpi_set_action_t action) = 0
int set_signal_value_str(std::string &value, gpi_set_action_t action) = 0
int set_signal_value_binstr(std::string &value, gpi_set_action_t action) = 0
GpiCbHdl *value_change_cb(int edge) = 0

Public Members

int m_length
class GpiCbHdl : public GpiHdl

Subclassed by FliProcessCbHdl, GpiValueCbHdl, VhpiCbHdl, VpiCbHdl

Public Functions

GpiCbHdl(GpiImplInterface *impl)
int arm_callback() = 0
int run_callback()
int cleanup_callback() = 0
int set_user_data(int (*gpi_function)(const void*), const void *data, )
const void *get_user_data()
void set_call_state(gpi_cb_state_e new_state)
gpi_cb_state_e get_call_state()
~GpiCbHdl()

Protected Attributes

int (*gpi_function)(const void*)
const void *m_cb_data
gpi_cb_state_e m_state
class GpiValueCbHdl : public virtual GpiCbHdl

Subclassed by FliSignalCbHdl, VhpiValueCbHdl, VpiValueCbHdl

Public Functions

GpiValueCbHdl(GpiImplInterface *impl, GpiSignalObjHdl *signal, int edge)
int run_callback() override

Protected Attributes

std::string required_value
GpiSignalObjHdl *m_signal
class GpiIterator : public GpiHdl

Subclassed by FliIterator, VhpiIterator, VpiIterator, VpiSingleIterator

Public Types

enum Status

Values:

enumerator NATIVE
enumerator NATIVE_NO_NAME
enumerator NOT_NATIVE
enumerator NOT_NATIVE_NO_NAME
enumerator END

Public Functions

GpiIterator(GpiImplInterface *impl, GpiObjHdl *hdl)
~GpiIterator() = default
Status next_handle(std::string &name, GpiObjHdl **hdl, void **raw_hdl)
GpiObjHdl *get_parent()

Protected Attributes

GpiObjHdl *m_parent
template<class Ti, class Tm>
class GpiIteratorMapping

Public Functions

GpiIteratorMapping(void (*populate)(GpiIteratorMapping<Ti, Tm>&))
std::vector<Tm> *get_options(Ti type)
void add_to_options(Ti type, Tm *options)

Private Members

std::map<Ti, std::vector<Tm>> options_map
class GpiImplInterface

Subclassed by FliImpl, VhpiImpl, VpiImpl

Public Functions

GpiImplInterface(const std::string &name)
const char *get_name_c()
const std::string &get_name_s()
~GpiImplInterface() = default
void sim_end() = 0
void get_sim_time(uint32_t *high, uint32_t *low) = 0
void get_sim_precision(int32_t *precision) = 0
const char *get_simulator_product() = 0
const char *get_simulator_version() = 0
GpiObjHdl *native_check_create(std::string &name, GpiObjHdl *parent) = 0
GpiObjHdl *native_check_create(int32_t index, GpiObjHdl *parent) = 0
GpiObjHdl *native_check_create(void *raw_hdl, GpiObjHdl *parent) = 0
GpiObjHdl *get_root_handle(const char *name) = 0
GpiIterator *iterate_handle(GpiObjHdl *obj_hdl, gpi_iterator_sel_t type) = 0
GpiCbHdl *register_timed_callback(uint64_t time_ps) = 0
GpiCbHdl *register_readonly_callback() = 0
GpiCbHdl *register_nexttime_callback() = 0
GpiCbHdl *register_readwrite_callback() = 0
int deregister_callback(GpiCbHdl *obj_hdl) = 0
const char *reason_to_string(int reason) = 0

Protected Attributes

std::string m_product
std::string m_version

Private Members

std::string m_name