Kill a bunch of __vpiScope struct vs class warnings.
This commit is contained in:
parent
2fedb4942e
commit
f275dac7a8
|
|
@ -1100,7 +1100,7 @@ class vvp_fun_arrayport_aa : public vvp_fun_arrayport, public automatic_hooks_s
|
|||
private:
|
||||
void check_word_change_(unsigned long addr, vvp_context_t context);
|
||||
|
||||
struct __vpiScope*context_scope_;
|
||||
__vpiScope*context_scope_;
|
||||
unsigned context_idx_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ vvp_fun_delay::vvp_fun_delay(vvp_net_t*n, unsigned width, const vvp_delay_t&d)
|
|||
initial_ = true;
|
||||
// Calculate the values used when converting variable delays
|
||||
// to simulation time units.
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
|
||||
int pow = scope->time_units - scope->time_precision;
|
||||
round_ = 1;
|
||||
|
|
@ -770,7 +770,7 @@ static vpiHandle modpath_src_get_handle(int code, vpiHandle ref)
|
|||
return rfp->dest->scope;
|
||||
|
||||
case vpiModule:
|
||||
{ struct __vpiScope*scope = rfp->dest->scope;
|
||||
{ __vpiScope*scope = rfp->dest->scope;
|
||||
while (scope && scope->get_type_code() != vpiModule)
|
||||
scope = scope->scope;
|
||||
assert(scope);
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ class vvp_fun_edge_aa : public vvp_fun_edge, public automatic_hooks_s {
|
|||
vvp_context_t context);
|
||||
|
||||
private:
|
||||
struct __vpiScope*context_scope_;
|
||||
__vpiScope*context_scope_;
|
||||
unsigned context_idx_;
|
||||
};
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ class vvp_fun_anyedge_aa : public vvp_fun_anyedge, public automatic_hooks_s {
|
|||
vvp_context_t context);
|
||||
|
||||
private:
|
||||
struct __vpiScope*context_scope_;
|
||||
__vpiScope*context_scope_;
|
||||
unsigned context_idx_;
|
||||
};
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ class vvp_fun_event_or_aa : public vvp_fun_event_or, public automatic_hooks_s {
|
|||
vvp_context_t context);
|
||||
|
||||
private:
|
||||
struct __vpiScope*context_scope_;
|
||||
__vpiScope*context_scope_;
|
||||
unsigned context_idx_;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ void vthread_event_s::run_run(void)
|
|||
|
||||
void vthread_event_s::single_step_display(void)
|
||||
{
|
||||
struct __vpiScope*scope = vthread_scope(thr);
|
||||
__vpiScope*scope = vthread_scope(thr);
|
||||
cerr << "vthread_event: Resume thread"
|
||||
<< " scope=" << scope->vpi_get_str(vpiFullName)
|
||||
<< endl;
|
||||
|
|
@ -158,7 +158,7 @@ void del_thr_event_s::run_run(void)
|
|||
|
||||
void del_thr_event_s::single_step_display(void)
|
||||
{
|
||||
struct __vpiScope*scope = vthread_scope(thr);
|
||||
__vpiScope*scope = vthread_scope(thr);
|
||||
cerr << "del_thr_event: Reap completed thread"
|
||||
<< " scope=" << scope->vpi_get_str(vpiFullName) << endl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,8 +625,7 @@ void callback_execute(struct __vpiCallback*cur)
|
|||
case vpiScaledRealTime: {
|
||||
cur->cb_data.time->real =
|
||||
vpip_time_to_scaled_real(schedule_simtime(),
|
||||
(struct __vpiScope *) vpi_handle(vpiScope,
|
||||
cur->cb_data.obj));
|
||||
(__vpiScope *) vpi_handle(vpiScope, cur->cb_data.obj));
|
||||
break;
|
||||
}
|
||||
case vpiSuppressTime:
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void __vpiCobjectVar::vpi_get_value(p_vpi_value val)
|
|||
|
||||
vpiHandle vpip_make_cobject_var(const char*name, vvp_net_t*net)
|
||||
{
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
const char*use_name = name ? vpip_name_string(name) : 0;
|
||||
|
||||
class __vpiCobjectVar*obj = new __vpiCobjectVar(scope, use_name, net);
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ class __vpiStringParam : public __vpiStringConst {
|
|||
char*vpi_get_str(int code);
|
||||
vpiHandle vpi_handle(int code);
|
||||
|
||||
struct __vpiScope* scope;
|
||||
__vpiScope* scope;
|
||||
bool local_flag;
|
||||
unsigned file_idx;
|
||||
unsigned lineno;
|
||||
|
|
@ -454,7 +454,7 @@ struct __vpiBinaryParam : public __vpiBinaryConst {
|
|||
char*vpi_get_str(int code);
|
||||
vpiHandle vpi_handle(int code);
|
||||
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
unsigned file_idx;
|
||||
unsigned lineno;
|
||||
bool local_flag;
|
||||
|
|
@ -683,7 +683,7 @@ struct __vpiRealParam : public __vpiRealConst {
|
|||
char*vpi_get_str(int code);
|
||||
vpiHandle vpi_handle(int code);
|
||||
|
||||
struct __vpiScope* scope;
|
||||
__vpiScope* scope;
|
||||
bool local_flag;
|
||||
unsigned file_idx;
|
||||
unsigned lineno;
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ vvp_darray*__vpiDarrayVar::get_vvp_darray() const
|
|||
|
||||
vpiHandle vpip_make_darray_var(const char*name, vvp_net_t*net)
|
||||
{
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
const char*use_name = name ? vpip_name_string(name) : 0;
|
||||
|
||||
__vpiDarrayVar*obj = new __vpiDarrayVar(scope, use_name, net);
|
||||
|
|
@ -338,7 +338,7 @@ void __vpiQueueVar::vpi_get_value(p_vpi_value val)
|
|||
|
||||
vpiHandle vpip_make_queue_var(const char*name, vvp_net_t*net)
|
||||
{
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
const char*use_name = name ? vpip_name_string(name) : 0;
|
||||
|
||||
class __vpiQueueVar*obj = new __vpiQueueVar(scope, use_name, net);
|
||||
|
|
|
|||
|
|
@ -108,23 +108,23 @@ unsigned vpip_size(__vpiSignal *sig)
|
|||
return abs(sig->msb.get_value() - sig->lsb.get_value()) + 1;
|
||||
}
|
||||
|
||||
struct __vpiScope* vpip_scope(__vpiSignal*sig)
|
||||
__vpiScope* vpip_scope(__vpiSignal*sig)
|
||||
{
|
||||
if (sig->is_netarray)
|
||||
return (struct __vpiScope*) vpi_handle(vpiScope, sig->within.parent);
|
||||
return (__vpiScope*) vpi_handle(vpiScope, sig->within.parent);
|
||||
else
|
||||
return sig->within.scope;
|
||||
}
|
||||
|
||||
struct __vpiScope* vpip_scope(__vpiRealVar*sig)
|
||||
__vpiScope* vpip_scope(__vpiRealVar*sig)
|
||||
{
|
||||
if (sig->is_netarray)
|
||||
return (struct __vpiScope*) vpi_handle(vpiScope, sig->within.parent);
|
||||
return (__vpiScope*) vpi_handle(vpiScope, sig->within.parent);
|
||||
else
|
||||
return sig->within.scope;
|
||||
}
|
||||
|
||||
vpiHandle vpip_module(struct __vpiScope*scope)
|
||||
vpiHandle vpip_module(__vpiScope*scope)
|
||||
{
|
||||
while(scope && scope->get_type_code() != vpiModule) {
|
||||
scope = scope->scope;
|
||||
|
|
@ -462,7 +462,7 @@ char* vpi_get_str(PLI_INT32 property, vpiHandle ref)
|
|||
int vpip_time_units_from_handle(vpiHandle obj)
|
||||
{
|
||||
struct __vpiSysTaskCall*task;
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
struct __vpiSignal*signal;
|
||||
|
||||
if (obj == 0)
|
||||
|
|
@ -494,7 +494,7 @@ int vpip_time_units_from_handle(vpiHandle obj)
|
|||
int vpip_time_precision_from_handle(vpiHandle obj)
|
||||
{
|
||||
struct __vpiSysTaskCall*task;
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
struct __vpiSignal*signal;
|
||||
|
||||
if (obj == 0)
|
||||
|
|
@ -1253,7 +1253,7 @@ vpiHandle vpi_handle_by_index(vpiHandle ref, PLI_INT32 idx)
|
|||
static vpiHandle find_name(const char *name, vpiHandle handle)
|
||||
{
|
||||
vpiHandle rtn = 0;
|
||||
struct __vpiScope*ref = dynamic_cast<__vpiScope*>(handle);
|
||||
__vpiScope*ref = dynamic_cast<__vpiScope*>(handle);
|
||||
|
||||
/* check module names */
|
||||
if (!strcmp(name, vpi_get_str(vpiName, handle)))
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ struct __vpiSystemTime : public __vpiHandle {
|
|||
void vpi_get_value(p_vpi_value val);
|
||||
vpiHandle vpi_handle(int code);
|
||||
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
};
|
||||
|
||||
struct __vpiScopedTime : public __vpiSystemTime {
|
||||
|
|
@ -255,14 +255,14 @@ class __vpiScope : public __vpiHandle {
|
|||
inline bool is_automatic() const { return is_automatic_; }
|
||||
|
||||
public:
|
||||
struct __vpiScope *scope;
|
||||
__vpiScope *scope;
|
||||
unsigned file_idx;
|
||||
unsigned lineno;
|
||||
unsigned def_file_idx;
|
||||
unsigned def_lineno;
|
||||
bool is_cell;
|
||||
/* The scope has a system time of its own. */
|
||||
struct __vpiScopedTime scoped_time;
|
||||
__vpiScopedTime scoped_time;
|
||||
struct __vpiScopedSTime scoped_stime;
|
||||
struct __vpiScopedRealtime scoped_realtime;
|
||||
/* Keep an array of internal scope items. */
|
||||
|
|
@ -293,12 +293,12 @@ class __vpiScope : public __vpiHandle {
|
|||
bool is_automatic_;
|
||||
};
|
||||
|
||||
extern struct __vpiScope* vpip_peek_current_scope(void);
|
||||
extern void vpip_attach_to_scope(struct __vpiScope*scope, vpiHandle obj);
|
||||
extern __vpiScope* vpip_peek_current_scope(void);
|
||||
extern void vpip_attach_to_scope(__vpiScope*scope, vpiHandle obj);
|
||||
extern void vpip_attach_to_current_scope(vpiHandle obj);
|
||||
extern struct __vpiScope* vpip_peek_context_scope(void);
|
||||
extern __vpiScope* vpip_peek_context_scope(void);
|
||||
extern unsigned vpip_add_item_to_context(automatic_hooks_s*item,
|
||||
struct __vpiScope*scope);
|
||||
__vpiScope*scope);
|
||||
extern vpiHandle vpip_make_root_iterator(void);
|
||||
extern void vpip_make_root_iterator(class __vpiHandle**&table,
|
||||
unsigned&ntable);
|
||||
|
|
@ -323,7 +323,7 @@ struct __vpiSignal : public __vpiHandle {
|
|||
public:
|
||||
union { // The scope or parent array that contains me.
|
||||
vpiHandle parent;
|
||||
struct __vpiScope* scope;
|
||||
__vpiScope* scope;
|
||||
} within;
|
||||
union { // The name of this reg/net, or the index for array words.
|
||||
const char*name;
|
||||
|
|
@ -347,7 +347,7 @@ struct __vpiSignal : public __vpiHandle {
|
|||
static void operator delete[](void*);
|
||||
};
|
||||
extern unsigned vpip_size(__vpiSignal *sig);
|
||||
extern struct __vpiScope* vpip_scope(__vpiSignal*sig);
|
||||
extern __vpiScope* vpip_scope(__vpiSignal*sig);
|
||||
|
||||
extern vpiHandle vpip_make_int2(const char*name, int msb, int lsb,
|
||||
bool signed_flag, vvp_net_t*vec);
|
||||
|
|
@ -427,7 +427,7 @@ struct __vpiModPathSrc : public __vpiHandle {
|
|||
*/
|
||||
|
||||
struct __vpiModPath {
|
||||
struct __vpiScope *scope ;
|
||||
__vpiScope *scope ;
|
||||
|
||||
class vvp_fun_modpath*modpath;
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ class __vpiNamedEvent : public __vpiHandle {
|
|||
/* base name of the event object */
|
||||
const char*name_;
|
||||
/* Parent scope of this object. */
|
||||
struct __vpiScope*scope_;
|
||||
__vpiScope*scope_;
|
||||
/* List of callbacks interested in this event. */
|
||||
__vpiCallback*callbacks_;
|
||||
};
|
||||
|
|
@ -507,7 +507,7 @@ struct __vpiRealVar : public __vpiHandle {
|
|||
|
||||
union { // The scope or parent array that contains me.
|
||||
vpiHandle parent;
|
||||
struct __vpiScope* scope;
|
||||
__vpiScope* scope;
|
||||
} within;
|
||||
/* The name of this variable, or the index for array words. */
|
||||
union {
|
||||
|
|
@ -519,7 +519,7 @@ struct __vpiRealVar : public __vpiHandle {
|
|||
vvp_net_t*net;
|
||||
};
|
||||
|
||||
extern struct __vpiScope* vpip_scope(__vpiRealVar*sig);
|
||||
extern __vpiScope* vpip_scope(__vpiRealVar*sig);
|
||||
extern vpiHandle vpip_make_real_var(const char*name, vvp_net_t*net, bool is_wire);
|
||||
|
||||
class __vpiBaseVar : public __vpiHandle {
|
||||
|
|
@ -533,7 +533,7 @@ class __vpiBaseVar : public __vpiHandle {
|
|||
inline vvp_net_t* get_net() const { return net_; }
|
||||
|
||||
protected:
|
||||
struct __vpiScope* scope_;
|
||||
__vpiScope* scope_;
|
||||
const char*name_;
|
||||
|
||||
private:
|
||||
|
|
@ -560,7 +560,7 @@ struct __vpiArrayBase {
|
|||
virtual unsigned get_size(void) const = 0;
|
||||
virtual vpiHandle get_left_range() = 0;
|
||||
virtual vpiHandle get_right_range() = 0;
|
||||
virtual struct __vpiScope*get_scope() const = 0;
|
||||
virtual __vpiScope*get_scope() const = 0;
|
||||
|
||||
virtual int get_word_size() const = 0;
|
||||
virtual char*get_word_str(struct __vpiArrayWord*word, int code) = 0;
|
||||
|
|
@ -609,7 +609,7 @@ struct __vpiArray : public __vpiArrayBase, public __vpiHandle {
|
|||
unsigned get_size() const { return array_count; }
|
||||
vpiHandle get_left_range() { assert(nets == 0); return &msb; }
|
||||
vpiHandle get_right_range() { assert(nets == 0); return &lsb; }
|
||||
struct __vpiScope*get_scope() const { return scope; }
|
||||
__vpiScope*get_scope() const { return scope; }
|
||||
|
||||
int get_word_size() const;
|
||||
char*get_word_str(struct __vpiArrayWord*word, int code);
|
||||
|
|
@ -657,7 +657,7 @@ struct __vpiArray : public __vpiArrayBase, public __vpiHandle {
|
|||
|
||||
private:
|
||||
unsigned array_count;
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
|
||||
friend vpiHandle vpip_make_array(char*label, const char*name,
|
||||
int first_addr, int last_addr,
|
||||
|
|
@ -673,7 +673,7 @@ class __vpiDarrayVar : public __vpiBaseVar, public __vpiArrayBase {
|
|||
unsigned get_size() const;
|
||||
vpiHandle get_left_range();
|
||||
vpiHandle get_right_range();
|
||||
struct __vpiScope*get_scope() const { return scope_; }
|
||||
__vpiScope*get_scope() const { return scope_; }
|
||||
|
||||
int get_word_size() const;
|
||||
char*get_word_str(struct __vpiArrayWord*word, int code);
|
||||
|
|
@ -754,7 +754,7 @@ extern struct __vpiUserSystf* vpip_find_systf(const char*name);
|
|||
|
||||
struct __vpiSysTaskCall : public __vpiHandle {
|
||||
|
||||
struct __vpiScope* scope;
|
||||
__vpiScope* scope;
|
||||
struct __vpiUserSystf*defn;
|
||||
unsigned nargs;
|
||||
vpiHandle*args;
|
||||
|
|
@ -893,8 +893,8 @@ extern void vpip_execute_vpi_call(vthread_t thr, vpiHandle obj);
|
|||
* and to finish compilation in preparation for execution.
|
||||
*/
|
||||
|
||||
vpiHandle vpip_sim_time(struct __vpiScope*scope, bool is_stime);
|
||||
vpiHandle vpip_sim_realtime(struct __vpiScope*scope);
|
||||
vpiHandle vpip_sim_time(__vpiScope*scope, bool is_stime);
|
||||
vpiHandle vpip_sim_realtime(__vpiScope*scope);
|
||||
|
||||
extern int vpip_get_time_precision(void);
|
||||
extern void vpip_set_time_precision(int pres);
|
||||
|
|
@ -905,8 +905,8 @@ extern int vpip_time_precision_from_handle(vpiHandle obj);
|
|||
extern void vpip_time_to_timestruct(struct t_vpi_time*ts, vvp_time64_t ti);
|
||||
extern vvp_time64_t vpip_timestruct_to_time(const struct t_vpi_time*ts);
|
||||
|
||||
extern double vpip_time_to_scaled_real(vvp_time64_t ti, struct __vpiScope*sc);
|
||||
extern vvp_time64_t vpip_scaled_real_to_time64(double val, struct __vpiScope*sc);
|
||||
extern double vpip_time_to_scaled_real(vvp_time64_t ti, __vpiScope*sc);
|
||||
extern vvp_time64_t vpip_scaled_real_to_time64(double val, __vpiScope*sc);
|
||||
|
||||
/*
|
||||
* These functions are used mostly as compile time to strings into
|
||||
|
|
@ -969,7 +969,7 @@ extern char *simple_set_rbuf_str(const char *s1);
|
|||
extern char *generic_get_str(int code, vpiHandle ref, const char *name, const char *index);
|
||||
|
||||
/* A routine to find the enclosing module. */
|
||||
extern vpiHandle vpip_module(struct __vpiScope*scope);
|
||||
extern vpiHandle vpip_module(__vpiScope*scope);
|
||||
|
||||
extern int vpip_delay_selection;
|
||||
|
||||
|
|
|
|||
|
|
@ -54,11 +54,11 @@ void port_delete(__vpiHandle*handle);
|
|||
static class_type **class_list = 0;
|
||||
static unsigned class_list_count = 0;
|
||||
|
||||
static void delete_sub_scopes(struct __vpiScope *scope)
|
||||
static void delete_sub_scopes(__vpiScope *scope)
|
||||
{
|
||||
for (unsigned idx = 0; idx < scope->nintern; idx += 1) {
|
||||
vpiHandle item = (scope->intern)[idx];
|
||||
struct __vpiScope*lscope = static_cast<__vpiScope*>(item);
|
||||
__vpiScope*lscope = static_cast<__vpiScope*>(item);
|
||||
switch(item->get_type_code()) {
|
||||
case vpiFunction:
|
||||
case vpiTask:
|
||||
|
|
@ -148,7 +148,7 @@ static void delete_sub_scopes(struct __vpiScope *scope)
|
|||
void root_table_delete(void)
|
||||
{
|
||||
for (unsigned idx = 0; idx < vpip_root_table.size(); idx += 1) {
|
||||
struct __vpiScope *scope = static_cast<__vpiScope *>
|
||||
__vpiScope *scope = static_cast<__vpiScope *>
|
||||
(vpip_root_table[idx]);
|
||||
vthreads_delete(scope);
|
||||
delete_sub_scopes(scope);
|
||||
|
|
@ -166,7 +166,7 @@ void root_table_delete(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void construct_scope_fullname(struct __vpiScope*ref, char*buf)
|
||||
static void construct_scope_fullname(__vpiScope*ref, char*buf)
|
||||
{
|
||||
if (ref->scope) {
|
||||
construct_scope_fullname(ref->scope, buf);
|
||||
|
|
@ -199,7 +199,7 @@ static const char* scope_get_type(int code)
|
|||
|
||||
static char* scope_get_str(int code, vpiHandle obj)
|
||||
{
|
||||
struct __vpiScope*ref = dynamic_cast<__vpiScope*>(obj);
|
||||
__vpiScope*ref = dynamic_cast<__vpiScope*>(obj);
|
||||
assert(ref);
|
||||
|
||||
char buf[4096]; // XXX is a fixed buffer size really reliable?
|
||||
|
|
@ -240,7 +240,7 @@ static char* scope_get_str(int code, vpiHandle obj)
|
|||
|
||||
static vpiHandle scope_get_handle(int code, vpiHandle obj)
|
||||
{
|
||||
struct __vpiScope*rfp = dynamic_cast<__vpiScope*>(obj);
|
||||
__vpiScope*rfp = dynamic_cast<__vpiScope*>(obj);
|
||||
assert(rfp);
|
||||
|
||||
switch (code) {
|
||||
|
|
@ -290,7 +290,7 @@ static int compare_types(int code, int type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static vpiHandle module_iter_subset(int code, struct __vpiScope*ref)
|
||||
static vpiHandle module_iter_subset(int code, __vpiScope*ref)
|
||||
{
|
||||
unsigned mcnt = 0, ncnt = 0;
|
||||
vpiHandle*args;
|
||||
|
|
@ -320,7 +320,7 @@ static vpiHandle module_iter_subset(int code, struct __vpiScope*ref)
|
|||
*/
|
||||
static vpiHandle module_iter(int code, vpiHandle obj)
|
||||
{
|
||||
struct __vpiScope*ref = dynamic_cast<__vpiScope*>(obj);
|
||||
__vpiScope*ref = dynamic_cast<__vpiScope*>(obj);
|
||||
assert(ref);
|
||||
|
||||
return module_iter_subset(code, ref);
|
||||
|
|
@ -455,9 +455,9 @@ struct vpiScopeClass : public __vpiScope {
|
|||
* compiled, items that have scope are placed in the current
|
||||
* scope. The ".scope" directives select the scope that is current.
|
||||
*/
|
||||
static struct __vpiScope*current_scope = 0;
|
||||
static __vpiScope*current_scope = 0;
|
||||
|
||||
void vpip_attach_to_scope(struct __vpiScope*scope, vpiHandle obj)
|
||||
void vpip_attach_to_scope(__vpiScope*scope, vpiHandle obj)
|
||||
{
|
||||
assert(scope);
|
||||
scope->intern.push_back(obj);
|
||||
|
|
@ -476,7 +476,7 @@ compile_scope_decl(char*label, char*type, char*name, char*tname,
|
|||
{
|
||||
count_vpi_scopes += 1;
|
||||
|
||||
struct __vpiScope*scope;
|
||||
__vpiScope*scope;
|
||||
if (strcmp(type,"module") == 0) {
|
||||
scope = new vpiScopeModule(name, tname);
|
||||
} else if (strcmp(type,"function") == 0) {
|
||||
|
|
@ -531,7 +531,7 @@ compile_scope_decl(char*label, char*type, char*name, char*tname,
|
|||
static vpiHandle obj;
|
||||
compile_vpi_lookup(&obj, parent);
|
||||
assert(obj);
|
||||
struct __vpiScope*sp = dynamic_cast<__vpiScope*>(obj);
|
||||
__vpiScope*sp = dynamic_cast<__vpiScope*>(obj);
|
||||
vpip_attach_to_scope(sp, scope);
|
||||
scope->scope = dynamic_cast<__vpiScope*>(obj);
|
||||
|
||||
|
|
@ -571,7 +571,7 @@ void compile_timescale(long units, long precision)
|
|||
current_scope->time_precision = precision;
|
||||
}
|
||||
|
||||
struct __vpiScope* vpip_peek_current_scope(void)
|
||||
__vpiScope* vpip_peek_current_scope(void)
|
||||
{
|
||||
return current_scope;
|
||||
}
|
||||
|
|
@ -581,9 +581,9 @@ void vpip_attach_to_current_scope(vpiHandle obj)
|
|||
vpip_attach_to_scope(current_scope, obj);
|
||||
}
|
||||
|
||||
struct __vpiScope* vpip_peek_context_scope(void)
|
||||
__vpiScope* vpip_peek_context_scope(void)
|
||||
{
|
||||
struct __vpiScope*scope = current_scope;
|
||||
__vpiScope*scope = current_scope;
|
||||
|
||||
/* A context is allocated for each automatic task or function.
|
||||
Storage for nested scopes (named blocks) is allocated in
|
||||
|
|
@ -595,7 +595,7 @@ struct __vpiScope* vpip_peek_context_scope(void)
|
|||
}
|
||||
|
||||
unsigned vpip_add_item_to_context(automatic_hooks_s*item,
|
||||
struct __vpiScope*scope)
|
||||
__vpiScope*scope)
|
||||
{
|
||||
assert(scope);
|
||||
assert(scope->is_automatic());
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ vpiHandle __vpiStringVar::vpi_put_value(p_vpi_value val, int)
|
|||
|
||||
vpiHandle vpip_make_string_var(const char*name, vvp_net_t*net)
|
||||
{
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
const char*use_name = name ? vpip_name_string(name) : 0;
|
||||
|
||||
class __vpiStringVar*obj = new __vpiStringVar(scope, use_name, net);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ vvp_time64_t vpip_timestruct_to_time(const struct t_vpi_time*ts)
|
|||
return ti;
|
||||
}
|
||||
|
||||
double vpip_time_to_scaled_real(vvp_time64_t ti, struct __vpiScope*scope)
|
||||
double vpip_time_to_scaled_real(vvp_time64_t ti, __vpiScope*scope)
|
||||
{
|
||||
double val;
|
||||
int scale = 0;
|
||||
|
|
@ -70,7 +70,7 @@ double vpip_time_to_scaled_real(vvp_time64_t ti, struct __vpiScope*scope)
|
|||
* does not check for overflow. It is only used for modpath delays and
|
||||
* they are required to be non-negative.
|
||||
*/
|
||||
vvp_time64_t vpip_scaled_real_to_time64(double val, struct __vpiScope*scope)
|
||||
vvp_time64_t vpip_scaled_real_to_time64(double val, __vpiScope*scope)
|
||||
{
|
||||
int shift = 0;
|
||||
if (scope) shift = scope->time_units - scope->time_precision;
|
||||
|
|
@ -352,7 +352,7 @@ void __vpiScopedRealtime::vpi_get_value(p_vpi_value val)
|
|||
* $time and $stime system functions return a value scaled to a scope,
|
||||
* and the $simtime returns the unscaled time.
|
||||
*/
|
||||
vpiHandle vpip_sim_time(struct __vpiScope*scope, bool is_stime)
|
||||
vpiHandle vpip_sim_time(__vpiScope*scope, bool is_stime)
|
||||
{
|
||||
if (scope) {
|
||||
if (is_stime) {
|
||||
|
|
@ -367,7 +367,7 @@ vpiHandle vpip_sim_time(struct __vpiScope*scope, bool is_stime)
|
|||
}
|
||||
}
|
||||
|
||||
vpiHandle vpip_sim_realtime(struct __vpiScope*scope)
|
||||
vpiHandle vpip_sim_realtime(__vpiScope*scope)
|
||||
{
|
||||
scope->scoped_realtime.scope = scope;
|
||||
return &scope->scoped_realtime;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,14 @@
|
|||
|
||||
typedef struct vthread_s* vthread_t;
|
||||
typedef struct vvp_code_s*vvp_code_t;
|
||||
class __vpiScope;
|
||||
|
||||
/*
|
||||
* This creates a new simulation thread, with the given start
|
||||
* address. The generated thread is ready to run, but is not yet
|
||||
* scheduled.
|
||||
*/
|
||||
extern vthread_t vthread_new(vvp_code_t sa, struct __vpiScope*scope);
|
||||
extern vthread_t vthread_new(vvp_code_t sa, __vpiScope*scope);
|
||||
|
||||
/*
|
||||
* This function marks the thread as scheduled. It is used only by the
|
||||
|
|
@ -72,7 +73,7 @@ extern void vthread_run(vthread_t thr);
|
|||
*/
|
||||
extern void vthread_schedule_list(vthread_t thr);
|
||||
|
||||
extern struct __vpiScope*vthread_scope(vthread_t thr);
|
||||
extern __vpiScope*vthread_scope(vthread_t thr);
|
||||
|
||||
/*
|
||||
* This function returns a handle to the writable context of the currently
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ extern void PV_delete(class __vpiHandle *item);
|
|||
extern void class_delete(class __vpiHandle *item);
|
||||
extern void class_def_delete(class_type *item);
|
||||
extern void constant_delete(class __vpiHandle *item);
|
||||
extern void contexts_delete(struct __vpiScope *scope);
|
||||
extern void contexts_delete(__vpiScope *scope);
|
||||
extern void darray_delete(class __vpiHandle *item);
|
||||
extern void queue_delete(class __vpiHandle *item);
|
||||
extern void enum_delete(class __vpiHandle *item);
|
||||
|
|
@ -63,7 +63,7 @@ extern void thread_vthr_delete(class __vpiHandle *item);
|
|||
extern void thread_word_delete(class __vpiHandle *item);
|
||||
extern void vpi_call_delete(class __vpiHandle *item);
|
||||
extern void exec_ufunc_delete(vvp_code_t euf_code);
|
||||
extern void vthreads_delete(struct __vpiScope*scope);
|
||||
extern void vthreads_delete(__vpiScope*scope);
|
||||
extern void vvp_net_delete(vvp_net_t *item);
|
||||
|
||||
|
||||
|
|
|
|||
18
vvp/words.cc
18
vvp/words.cc
|
|
@ -262,7 +262,7 @@ vvp_net_t* create_constant_node(const char*val_str)
|
|||
class base_net_resolv : public resolv_list_s {
|
||||
public:
|
||||
explicit base_net_resolv(char*ref_label, vvp_array_t array,
|
||||
struct __vpiScope*scope,
|
||||
__vpiScope*scope,
|
||||
char*my_label, char*name,
|
||||
unsigned array_addr, bool local_flag)
|
||||
: resolv_list_s(ref_label)
|
||||
|
|
@ -278,7 +278,7 @@ class base_net_resolv : public resolv_list_s {
|
|||
char*my_label_;
|
||||
vvp_array_t array_;
|
||||
char*name_;
|
||||
struct __vpiScope*scope_;
|
||||
__vpiScope*scope_;
|
||||
unsigned array_addr_;
|
||||
bool local_flag_;
|
||||
};
|
||||
|
|
@ -287,7 +287,7 @@ class __compile_net_resolv : public base_net_resolv {
|
|||
|
||||
public:
|
||||
explicit __compile_net_resolv(char*ref_label, vvp_array_t array,
|
||||
struct __vpiScope*scope,
|
||||
__vpiScope*scope,
|
||||
char*my_label, char*name,
|
||||
int msb, int lsb, unsigned array_addr,
|
||||
int vpi_type_code, bool signed_flag, bool local_flag)
|
||||
|
|
@ -321,7 +321,7 @@ class __compile_net_resolv : public base_net_resolv {
|
|||
*/
|
||||
|
||||
static void do_compile_net(vvp_net_t*node, vvp_array_t array,
|
||||
struct __vpiScope*scope,
|
||||
__vpiScope*scope,
|
||||
char*my_label, char*name,
|
||||
int msb, int lsb, unsigned array_addr,
|
||||
int vpi_type_code, bool signed_flag, bool local_flag)
|
||||
|
|
@ -398,7 +398,7 @@ static void __compile_net(char*label,
|
|||
}
|
||||
#endif
|
||||
if (node == 0) {
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
__compile_net_resolv*res
|
||||
= new __compile_net_resolv(argv[0].text,
|
||||
array, scope, label, name,
|
||||
|
|
@ -410,7 +410,7 @@ static void __compile_net(char*label,
|
|||
}
|
||||
assert(node);
|
||||
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
do_compile_net(node, array, scope, label, name, msb, lsb, array_addr,
|
||||
vpi_type_code, signed_flag, local_flag);
|
||||
|
||||
|
|
@ -453,7 +453,7 @@ class __compile_real_net_resolv : public base_net_resolv {
|
|||
|
||||
public:
|
||||
explicit __compile_real_net_resolv(char*ref_label, vvp_array_t array,
|
||||
struct __vpiScope*scope,
|
||||
__vpiScope*scope,
|
||||
char*my_label, char*name,
|
||||
unsigned array_addr, bool local_flag)
|
||||
: base_net_resolv(ref_label, array, scope, my_label, name, array_addr, local_flag)
|
||||
|
|
@ -468,7 +468,7 @@ class __compile_real_net_resolv : public base_net_resolv {
|
|||
};
|
||||
|
||||
static void __compile_real_net2(vvp_net_t*node, vvp_array_t array,
|
||||
struct __vpiScope*scope,
|
||||
__vpiScope*scope,
|
||||
char*my_label, char*name,
|
||||
unsigned array_addr, bool local_flag)
|
||||
{
|
||||
|
|
@ -522,7 +522,7 @@ static void __compile_real(char*label, char*name,
|
|||
bufz node that can carry the constant value. */
|
||||
node = create_constant_node(argv[0].text);
|
||||
}
|
||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||
__vpiScope*scope = vpip_peek_current_scope();
|
||||
if (node == 0) {
|
||||
__compile_real_net_resolv*res
|
||||
= new __compile_real_net_resolv(argv[0].text, array,
|
||||
|
|
|
|||
Loading…
Reference in New Issue