Push file and line information for scopes to the runtime.
This patch adds code to push the file and line information for scope objects (modules, functions, tasks, etc.) to the runtime. For modules, this includes the definition fields.
This commit is contained in:
parent
2a5948d704
commit
86a4025b58
|
|
@ -240,6 +240,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
}
|
||||
NetScope*task_scope = new NetScope(scope, use_name,
|
||||
NetScope::TASK);
|
||||
task_scope->set_line((*cur).second);
|
||||
(*cur).second->elaborate_scope(des, task_scope);
|
||||
}
|
||||
|
||||
|
|
@ -263,6 +264,7 @@ bool Module::elaborate_scope(Design*des, NetScope*scope,
|
|||
}
|
||||
NetScope*func_scope = new NetScope(scope, use_name,
|
||||
NetScope::FUNC);
|
||||
func_scope->set_line((*cur).second);
|
||||
(*cur).second->elaborate_scope(des, func_scope);
|
||||
}
|
||||
|
||||
|
|
@ -383,6 +385,7 @@ bool PGenerate::generate_scope_loop_(Design*des, NetScope*container)
|
|||
|
||||
NetScope*scope = new NetScope(container, use_name,
|
||||
NetScope::GENBLOCK);
|
||||
scope->set_line(get_file(), get_lineno());
|
||||
|
||||
// Set in the scope a localparam for the value of the
|
||||
// genvar within this instance of the generate
|
||||
|
|
@ -463,6 +466,7 @@ bool PGenerate::generate_scope_condit_(Design*des, NetScope*container, bool else
|
|||
|
||||
NetScope*scope = new NetScope(container, use_name,
|
||||
NetScope::GENBLOCK);
|
||||
scope->set_line(get_file(), get_lineno());
|
||||
|
||||
elaborate_subscope_(des, scope);
|
||||
|
||||
|
|
@ -529,6 +533,7 @@ bool PGenerate::generate_scope_case_(Design*des, NetScope*container)
|
|||
|
||||
NetScope*scope = new NetScope(container, use_name,
|
||||
NetScope::GENBLOCK);
|
||||
scope->set_line(get_file(), get_lineno());
|
||||
item->elaborate_subscope_(des, scope);
|
||||
|
||||
return true;
|
||||
|
|
@ -661,6 +666,8 @@ void PGModule::elaborate_scope_mod_(Design*des, Module*mod, NetScope*sc) const
|
|||
|
||||
// Create the new scope as a MODULE with my name.
|
||||
NetScope*my_scope = new NetScope(sc, use_name, NetScope::MODULE);
|
||||
my_scope->set_line(get_file(), mod->get_file(),
|
||||
get_lineno(), mod->get_lineno());
|
||||
my_scope->set_module_name(mod->mod_name());
|
||||
my_scope->default_nettype(mod->default_nettype);
|
||||
|
||||
|
|
@ -811,6 +818,7 @@ void PBlock::elaborate_scope(Design*des, NetScope*scope) const
|
|||
my_scope = new NetScope(scope, use_name, bl_type_==BL_PAR
|
||||
? NetScope::FORK_JOIN
|
||||
: NetScope::BEGIN_END);
|
||||
my_scope->set_line(get_file(), get_lineno());
|
||||
}
|
||||
|
||||
for (unsigned idx = 0 ; idx < list_.count() ; idx += 1)
|
||||
|
|
|
|||
|
|
@ -3707,6 +3707,7 @@ Design* elaborate(list<perm_string>roots)
|
|||
|
||||
// Make the root scope.
|
||||
NetScope*scope = des->make_root_scope(*root);
|
||||
scope->set_line(rmod);
|
||||
scope->time_unit(rmod->time_unit);
|
||||
scope->time_precision(rmod->time_precision);
|
||||
scope->default_nettype(rmod->default_nettype);
|
||||
|
|
|
|||
4
ivl.def
4
ivl.def
|
|
@ -132,8 +132,12 @@ ivl_scope_attr_val
|
|||
ivl_scope_basename
|
||||
ivl_scope_children
|
||||
ivl_scope_def
|
||||
ivl_scope_def_file
|
||||
ivl_scope_def_lineno
|
||||
ivl_scope_event
|
||||
ivl_scope_events
|
||||
ivl_scope_file
|
||||
ivl_scope_lineno
|
||||
ivl_scope_logs
|
||||
ivl_scope_log
|
||||
ivl_scope_lpms
|
||||
|
|
|
|||
12
ivl_target.h
12
ivl_target.h
|
|
@ -1391,10 +1391,18 @@ extern ivl_expr_t ivl_parameter_expr(ivl_parameter_t net);
|
|||
* ivl_scope_def function must return a statement for scopes that
|
||||
* are type FUNCTION or TASK, and must return nil otherwise.
|
||||
*
|
||||
* ivl_scope_def_file
|
||||
* ivl_scope_def_lineno
|
||||
* Returns the file and line where this scope is defined.
|
||||
*
|
||||
* ivl_scope_event
|
||||
* ivl_scope_events
|
||||
* Scopes have 0 or more event objects in them.
|
||||
*
|
||||
* ivl_scope_file
|
||||
* ivl_scope_lineno
|
||||
* Returns the instantiation file and line for this scope.
|
||||
*
|
||||
* ivl_scope_var
|
||||
* ivl_scope_vars
|
||||
* REMOVED
|
||||
|
|
@ -1465,9 +1473,13 @@ extern int ivl_scope_children(ivl_scope_t net,
|
|||
ivl_scope_f func, void*cd);
|
||||
|
||||
extern ivl_statement_t ivl_scope_def(ivl_scope_t net);
|
||||
extern const char* ivl_scope_def_file(ivl_scope_t net);
|
||||
extern unsigned ivl_scope_def_lineno(ivl_scope_t net);
|
||||
|
||||
extern unsigned ivl_scope_events(ivl_scope_t net);
|
||||
extern ivl_event_t ivl_scope_event(ivl_scope_t net, unsigned idx);
|
||||
extern const char* ivl_scope_file(ivl_scope_t net);
|
||||
extern unsigned ivl_scope_lineno(ivl_scope_t net);
|
||||
extern unsigned ivl_scope_logs(ivl_scope_t net);
|
||||
extern ivl_net_logic_t ivl_scope_log(ivl_scope_t net, unsigned idx);
|
||||
extern unsigned ivl_scope_lpms(ivl_scope_t net);
|
||||
|
|
|
|||
25
net_scope.cc
25
net_scope.cc
|
|
@ -78,6 +78,31 @@ NetScope::~NetScope()
|
|||
/* name_ and module_name_ are perm-allocated. */
|
||||
}
|
||||
|
||||
void NetScope::set_line(const LineInfo*info)
|
||||
{
|
||||
file_ = info->get_file();
|
||||
def_file_ = file_;
|
||||
lineno_ = info->get_lineno();
|
||||
def_lineno_ = lineno_;
|
||||
}
|
||||
|
||||
void NetScope::set_line(perm_string file, unsigned lineno)
|
||||
{
|
||||
file_ = file;
|
||||
def_file_ = file;
|
||||
lineno_ = lineno;
|
||||
def_lineno_ = lineno;
|
||||
}
|
||||
|
||||
void NetScope::set_line(perm_string file, perm_string def_file,
|
||||
unsigned lineno, unsigned def_lineno)
|
||||
{
|
||||
file_ = file;
|
||||
def_file_ = def_file;
|
||||
lineno_ = lineno;
|
||||
def_lineno_ = def_lineno;
|
||||
}
|
||||
|
||||
NetExpr* NetScope::set_parameter(perm_string key, NetExpr*expr,
|
||||
NetExpr*msb, NetExpr*lsb, bool signed_flag)
|
||||
{
|
||||
|
|
|
|||
14
netlist.h
14
netlist.h
|
|
@ -3319,6 +3319,15 @@ class NetScope : public Attrib {
|
|||
NetTaskDef* task_def();
|
||||
NetFuncDef* func_def();
|
||||
|
||||
void set_line(perm_string file, perm_string def_file,
|
||||
unsigned lineno, unsigned def_lineno);
|
||||
void set_line(perm_string file, unsigned lineno);
|
||||
void set_line(const LineInfo *info);
|
||||
perm_string get_file() const { return file_; };
|
||||
perm_string get_def_file() const { return def_file_; };
|
||||
unsigned get_lineno() const { return lineno_; };
|
||||
unsigned get_def_lineno() const { return def_lineno_; };
|
||||
|
||||
bool in_func();
|
||||
|
||||
const NetTaskDef* task_def() const;
|
||||
|
|
@ -3409,6 +3418,11 @@ class NetScope : public Attrib {
|
|||
TYPE type_;
|
||||
hname_t name_;
|
||||
|
||||
perm_string file_;
|
||||
perm_string def_file_;
|
||||
unsigned lineno_;
|
||||
unsigned def_lineno_;
|
||||
|
||||
signed char time_unit_, time_prec_;
|
||||
NetNet::Type default_nettype_;
|
||||
|
||||
|
|
|
|||
24
t-dll-api.cc
24
t-dll-api.cc
|
|
@ -1456,6 +1456,18 @@ extern "C" ivl_statement_t ivl_scope_def(ivl_scope_t net)
|
|||
return net->def;
|
||||
}
|
||||
|
||||
extern "C" const char*ivl_scope_def_file(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->def_file.str();
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_scope_def_lineno(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->def_lineno;
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_scope_events(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
|
|
@ -1469,6 +1481,18 @@ extern "C" ivl_event_t ivl_scope_event(ivl_scope_t net, unsigned idx)
|
|||
return net->event_[idx];
|
||||
}
|
||||
|
||||
extern "C" const char*ivl_scope_file(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->file.str();
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_scope_lineno(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
return net->lineno;
|
||||
}
|
||||
|
||||
extern "C" unsigned ivl_scope_logs(ivl_scope_t net)
|
||||
{
|
||||
assert(net);
|
||||
|
|
|
|||
2
t-dll.cc
2
t-dll.cc
|
|
@ -525,6 +525,7 @@ void dll_target::add_root(ivl_design_s &des_, const NetScope *s)
|
|||
ivl_scope_t root_ = new struct ivl_scope_s;
|
||||
perm_string name = s->basename();
|
||||
root_->name_ = name;
|
||||
FILE_NAME(root_, s);
|
||||
root_->child_ = 0;
|
||||
root_->sibling_ = 0;
|
||||
root_->parent = 0;
|
||||
|
|
@ -2142,6 +2143,7 @@ void dll_target::scope(const NetScope*net)
|
|||
perm_string sname = make_scope_name(net->fullname());
|
||||
scope = new struct ivl_scope_s;
|
||||
scope->name_ = sname;
|
||||
FILE_NAME(scope, net);
|
||||
scope->child_ = 0;
|
||||
scope->sibling_ = 0;
|
||||
scope->parent = find_scope(des_, net->parent());
|
||||
|
|
|
|||
12
t-dll.h
12
t-dll.h
|
|
@ -537,6 +537,10 @@ struct ivl_scope_s {
|
|||
|
||||
perm_string name_;
|
||||
perm_string tname_;
|
||||
perm_string file;
|
||||
perm_string def_file;
|
||||
unsigned lineno;
|
||||
unsigned def_lineno;
|
||||
ivl_scope_type_t type_;
|
||||
|
||||
unsigned nsigs_;
|
||||
|
|
@ -713,4 +717,12 @@ static inline void FILE_NAME(ivl_lpm_t lpm, const LineInfo*info)
|
|||
lpm->lineno = info->get_lineno();
|
||||
}
|
||||
|
||||
static inline void FILE_NAME(ivl_scope_t scope, const NetScope*info)
|
||||
{
|
||||
scope->file = info->get_file();
|
||||
scope->def_file = info->get_def_file();
|
||||
scope->lineno = info->get_lineno();
|
||||
scope->def_lineno = info->get_def_lineno();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2444,12 +2444,15 @@ int draw_scope(ivl_scope_t net, ivl_scope_t parent)
|
|||
default: type = "?"; assert(0);
|
||||
}
|
||||
|
||||
fprintf(vvp_out, "S_%p .scope %s, \"%s\" \"%s\"",
|
||||
fprintf(vvp_out, "S_%p .scope %s, \"%s\" \"%s\" %d %d",
|
||||
net, type, vvp_mangle_name(ivl_scope_basename(net)),
|
||||
ivl_scope_tname(net));
|
||||
ivl_scope_tname(net), ivl_file_table_index(ivl_scope_file(net)),
|
||||
ivl_scope_lineno(net));
|
||||
|
||||
if (parent) {
|
||||
fprintf(vvp_out, ", S_%p;\n", parent);
|
||||
fprintf(vvp_out, ", %d %d, S_%p;\n",
|
||||
ivl_file_table_index(ivl_scope_def_file(net)),
|
||||
ivl_scope_def_lineno(net), parent);
|
||||
} else {
|
||||
|
||||
fprintf(vvp_out, ";\n");
|
||||
|
|
|
|||
|
|
@ -312,6 +312,8 @@ typedef struct t_vpi_delay {
|
|||
#define vpiDefName 9
|
||||
#define vpiTimeUnit 11
|
||||
#define vpiTimePrecision 12
|
||||
#define vpiDefFile 15
|
||||
#define vpiDefLineNo 16
|
||||
#define vpiNetType 22
|
||||
# define vpiWire 1
|
||||
#define vpiArray 28
|
||||
|
|
|
|||
|
|
@ -1781,7 +1781,7 @@ void compile_fork(char*label, struct symb_s dest, struct symb_s scope)
|
|||
}
|
||||
|
||||
void compile_vpi_call(char*label, char*name,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, vpiHandle*argv)
|
||||
{
|
||||
if (label)
|
||||
|
|
@ -1794,7 +1794,7 @@ void compile_vpi_call(char*label, char*name,
|
|||
/* Create a vpiHandle that bundles the call information, and
|
||||
store that handle in the instruction. */
|
||||
code->handle = vpip_build_vpi_call(name, 0, 0, 0, argc, argv,
|
||||
file_idx, line_no);
|
||||
file_idx, lineno);
|
||||
if (code->handle == 0)
|
||||
compile_errors += 1;
|
||||
|
||||
|
|
@ -1804,7 +1804,7 @@ void compile_vpi_call(char*label, char*name,
|
|||
|
||||
void compile_vpi_func_call(char*label, char*name,
|
||||
unsigned vbit, int vwid,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, vpiHandle*argv)
|
||||
{
|
||||
if (label)
|
||||
|
|
@ -1817,7 +1817,7 @@ void compile_vpi_func_call(char*label, char*name,
|
|||
/* Create a vpiHandle that bundles the call information, and
|
||||
store that handle in the instruction. */
|
||||
code->handle = vpip_build_vpi_call(name, vbit, vwid, 0, argc, argv,
|
||||
file_idx, line_no);
|
||||
file_idx, lineno);
|
||||
if (code->handle == 0)
|
||||
compile_errors += 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ extern void compile_reduce_xnor(char*label, struct symb_s arg);
|
|||
extern void compile_extend_signed(char*label, long width, struct symb_s arg);
|
||||
|
||||
extern void compile_sfunc(char*label, char*name, char*format_string,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, struct symb_s*argv);
|
||||
extern void compile_repeat(char*label, long width, long repeat,
|
||||
struct symb_s arg);
|
||||
|
|
@ -349,7 +349,7 @@ extern void compile_code(char*label, char*mnem, comp_operands_t opa);
|
|||
extern void compile_disable(char*label, struct symb_s symb);
|
||||
|
||||
extern void compile_vpi_call(char*label, char*name,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, vpiHandle*argv);
|
||||
|
||||
/* Compile a function call. The vbit and vwid encode the return
|
||||
|
|
@ -358,7 +358,7 @@ extern void compile_vpi_call(char*label, char*name,
|
|||
code that represents the function type. */
|
||||
extern void compile_vpi_func_call(char*label, char*name,
|
||||
unsigned vbit, int vwid,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, vpiHandle*argv);
|
||||
|
||||
extern void compile_fork(char*label, struct symb_s targ_s,
|
||||
|
|
@ -369,7 +369,9 @@ extern void compile_codelabel(char*label);
|
|||
* The parser uses these functions to compile .scope statements.
|
||||
* The implementations of these live in the vpi_scope.cc file.
|
||||
*/
|
||||
extern void compile_scope_decl(char*typ, char*lab, char*nam,const char*tnam,char*par);
|
||||
extern void compile_scope_decl(char*typ, char*lab, char*nam,const char*tnam,
|
||||
char*par, long file_idx, long lineno,
|
||||
long def_file_idx, long def_lineno);
|
||||
extern void compile_scope_recall(char*sym);
|
||||
|
||||
/*
|
||||
|
|
|
|||
13
vvp/parse.y
13
vvp/parse.y
|
|
@ -529,19 +529,20 @@ statement
|
|||
The final symbol is the label of the parent scope. If there is no
|
||||
parent scope, then this is a root scope. */
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING T_STRING ';'
|
||||
{ compile_scope_decl($1, $3, $5, $6, 0); }
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING T_STRING T_NUMBER T_NUMBER ';'
|
||||
{ compile_scope_decl($1, $3, $5, $6, 0, $7, $8, $7, $8); }
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING T_STRING ',' T_SYMBOL ';'
|
||||
{ compile_scope_decl($1, $3, $5, $6, $8); }
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING T_STRING T_NUMBER T_NUMBER ','
|
||||
T_NUMBER T_NUMBER ',' T_SYMBOL ';'
|
||||
{ compile_scope_decl($1, $3, $5, $6, $13, $7, $8, $10, $11); }
|
||||
|
||||
/* XXXX Legacy declaration has no type name. */
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING ';'
|
||||
{ compile_scope_decl($1, $3, $5, "", 0); }
|
||||
{ compile_scope_decl($1, $3, $5, "", 0, 0, 0, 0, 0); }
|
||||
|
||||
| T_LABEL K_SCOPE T_SYMBOL ',' T_STRING ',' T_SYMBOL ';'
|
||||
{ compile_scope_decl($1, $3, $5, "", $7); }
|
||||
{ compile_scope_decl($1, $3, $5, "", $7, 0, 0, 0, 0); }
|
||||
|
||||
/* Scope recall has no label of its own, but refers by label to a
|
||||
declared scope. */
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ static int make_vpi_argv(unsigned argc, vpiHandle*vpi_argv,
|
|||
|
||||
|
||||
void compile_sfunc(char*label, char*name, char*format_string,
|
||||
long file_idx, long line_no,
|
||||
long file_idx, long lineno,
|
||||
unsigned argc, struct symb_s*argv)
|
||||
{
|
||||
vpiHandle*vpi_argv = new vpiHandle[argc];
|
||||
|
|
@ -139,7 +139,7 @@ void compile_sfunc(char*label, char*name, char*format_string,
|
|||
vvp_net_t*ptr = new vvp_net_t;
|
||||
|
||||
vpiHandle sys = vpip_build_vpi_call(name, 0, width_code, ptr,
|
||||
argc, vpi_argv, file_idx, line_no);
|
||||
argc, vpi_argv, file_idx, lineno);
|
||||
assert(sys);
|
||||
|
||||
/* Create and connect the functor to the label. */
|
||||
|
|
@ -152,4 +152,3 @@ void compile_sfunc(char*label, char*name, char*format_string,
|
|||
wide_inputs_connect(score, argc, argv);
|
||||
free(argv);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,6 +165,10 @@ struct __vpiScope {
|
|||
/* The scope has a name. */
|
||||
const char*name;
|
||||
const char*tname;
|
||||
unsigned file_idx;
|
||||
unsigned lineno;
|
||||
unsigned def_file_idx;
|
||||
unsigned def_lineno;
|
||||
/* The scope has a system time of its own. */
|
||||
struct __vpiSystemTime scoped_time;
|
||||
struct __vpiSystemTime scoped_realtime;
|
||||
|
|
@ -366,7 +370,7 @@ struct __vpiSysTaskCall {
|
|||
signed vwid;
|
||||
class vvp_net_t*fnet;
|
||||
unsigned file_idx;
|
||||
unsigned line_no;
|
||||
unsigned lineno;
|
||||
};
|
||||
|
||||
extern struct __vpiSysTaskCall*vpip_cur_task;
|
||||
|
|
@ -462,7 +466,7 @@ extern vpiHandle vpip_build_vpi_call(const char*name,
|
|||
unsigned argc,
|
||||
vpiHandle*argv,
|
||||
long file_idx,
|
||||
long line_no);
|
||||
long lineno);
|
||||
|
||||
extern vthread_t vpip_current_vthread;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2001-2007 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 2001-2008 Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -61,8 +61,11 @@ static int scope_get(int code, vpiHandle obj)
|
|||
assert(handle_is_scope(obj));
|
||||
|
||||
switch (code) {
|
||||
case vpiDefLineNo:
|
||||
return ref->def_lineno;
|
||||
|
||||
case vpiLineNo:
|
||||
return 0; // Not implemented for now!
|
||||
return ref->lineno;
|
||||
|
||||
case vpiTimeUnit:
|
||||
return ref->time_units;
|
||||
|
|
@ -115,8 +118,12 @@ static char* scope_get_str(int code, vpiHandle obj)
|
|||
char buf[4096]; // XXX is a fixed buffer size really reliable?
|
||||
const char *p=0;
|
||||
switch (code) {
|
||||
case vpiDefFile:
|
||||
p = file_names[ref->def_file_idx];
|
||||
break;
|
||||
|
||||
case vpiFile:
|
||||
p = file_names[0]; // Not implemented for now!
|
||||
p = file_names[ref->file_idx];
|
||||
break;
|
||||
|
||||
case vpiFullName:
|
||||
|
|
@ -316,7 +323,9 @@ static void attach_to_scope_(struct __vpiScope*scope, vpiHandle obj)
|
|||
* symbol table and the name is used to construct the actual object.
|
||||
*/
|
||||
void
|
||||
compile_scope_decl(char*label, char*type, char*name, const char*tname, char*parent)
|
||||
compile_scope_decl(char*label, char*type, char*name, const char*tname,
|
||||
char*parent, long file_idx, long lineno,
|
||||
long def_file_idx, long def_lineno)
|
||||
{
|
||||
struct __vpiScope*scope = new struct __vpiScope;
|
||||
count_vpi_scopes += 1;
|
||||
|
|
@ -342,6 +351,10 @@ compile_scope_decl(char*label, char*type, char*name, const char*tname, char*pare
|
|||
|
||||
scope->name = vpip_name_string(name);
|
||||
scope->tname = vpip_name_string(tname);
|
||||
scope->file_idx = (unsigned) file_idx;
|
||||
scope->lineno = (unsigned) lineno;
|
||||
scope->def_file_idx = (unsigned) def_file_idx;
|
||||
scope->def_lineno = (unsigned) def_lineno;
|
||||
scope->intern = 0;
|
||||
scope->nintern = 0;
|
||||
scope->threads = 0;
|
||||
|
|
@ -414,4 +427,3 @@ void vpip_attach_to_current_scope(vpiHandle obj)
|
|||
{
|
||||
attach_to_scope_(current_scope, obj);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ static int systask_get(int type, vpiHandle ref)
|
|||
return rfp->scope->time_units;
|
||||
|
||||
case vpiLineNo:
|
||||
return rfp->line_no;
|
||||
return rfp->lineno;
|
||||
|
||||
default:
|
||||
return vpiUndefined;
|
||||
|
|
@ -98,7 +98,7 @@ static int sysfunc_get(int type, vpiHandle ref)
|
|||
return rfp->vwid;
|
||||
|
||||
case vpiLineNo:
|
||||
return rfp->line_no;
|
||||
return rfp->lineno;
|
||||
|
||||
default:
|
||||
return vpiUndefined;
|
||||
|
|
@ -495,7 +495,7 @@ struct __vpiUserSystf* vpip_find_systf(const char*name)
|
|||
vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
||||
class vvp_net_t*fnet,
|
||||
unsigned argc, vpiHandle*argv,
|
||||
long file_idx, long line_no)
|
||||
long file_idx, long lineno)
|
||||
{
|
||||
struct __vpiUserSystf*defn = vpip_find_systf(name);
|
||||
if (defn == 0) {
|
||||
|
|
@ -561,7 +561,7 @@ vpiHandle vpip_build_vpi_call(const char*name, unsigned vbit, int vwid,
|
|||
obj->vwid = vwid;
|
||||
obj->fnet = fnet;
|
||||
obj->file_idx = (unsigned) file_idx;
|
||||
obj->line_no = (unsigned) line_no;
|
||||
obj->lineno = (unsigned) lineno;
|
||||
obj->userdata = 0;
|
||||
|
||||
compile_compiletf(obj);
|
||||
|
|
@ -641,4 +641,3 @@ void* vpi_get_userdata(vpiHandle ref)
|
|||
|
||||
return rfp->userdata;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue