Add file and line information to processes.
This patch adds file and line information to processes (initial and always).
This commit is contained in:
parent
296f1bacc1
commit
61930c3b6e
2
ivl.def
2
ivl.def
|
|
@ -191,6 +191,8 @@ ivl_path_source
|
||||||
|
|
||||||
ivl_process_attr_cnt
|
ivl_process_attr_cnt
|
||||||
ivl_process_attr_val
|
ivl_process_attr_val
|
||||||
|
ivl_process_file
|
||||||
|
ivl_process_lineno
|
||||||
ivl_process_scope
|
ivl_process_scope
|
||||||
ivl_process_stmt
|
ivl_process_stmt
|
||||||
ivl_process_type
|
ivl_process_type
|
||||||
|
|
|
||||||
|
|
@ -1695,6 +1695,9 @@ extern ivl_statement_t ivl_process_stmt(ivl_process_t net);
|
||||||
extern unsigned ivl_process_attr_cnt(ivl_process_t net);
|
extern unsigned ivl_process_attr_cnt(ivl_process_t net);
|
||||||
extern ivl_attribute_t ivl_process_attr_val(ivl_process_t net, unsigned idx);
|
extern ivl_attribute_t ivl_process_attr_val(ivl_process_t net, unsigned idx);
|
||||||
|
|
||||||
|
extern const char* ivl_process_file(ivl_process_t net);
|
||||||
|
extern unsigned ivl_process_lineno(ivl_process_t net);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These functions manage statements of various type. This includes
|
* These functions manage statements of various type. This includes
|
||||||
* all the different kinds of statements (as enumerated in
|
* all the different kinds of statements (as enumerated in
|
||||||
|
|
|
||||||
12
t-dll-api.cc
12
t-dll-api.cc
|
|
@ -1438,6 +1438,18 @@ extern int ivl_path_source_negedge(ivl_delaypath_t net)
|
||||||
return net->negedge ? 1 : 0;
|
return net->negedge ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" const char*ivl_process_file(ivl_process_t net)
|
||||||
|
{
|
||||||
|
assert(net);
|
||||||
|
return net->file.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" unsigned ivl_process_lineno(ivl_process_t net)
|
||||||
|
{
|
||||||
|
assert(net);
|
||||||
|
return net->lineno;
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" ivl_process_type_t ivl_process_type(ivl_process_t net)
|
extern "C" ivl_process_type_t ivl_process_type(ivl_process_t net)
|
||||||
{
|
{
|
||||||
return net->type_;
|
return net->type_;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000 Stephen Williams (steve@icarus.com)
|
* Copyright (c) 2000-2008 Stephen Williams (steve@icarus.com)
|
||||||
*
|
*
|
||||||
* This source code is free software; you can redistribute it
|
* This source code is free software; you can redistribute it
|
||||||
* and/or modify it in source code form under the terms of the GNU
|
* and/or modify it in source code form under the terms of the GNU
|
||||||
|
|
@ -17,9 +17,6 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_CVS_IDENT
|
|
||||||
#ident "$Id: $"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
||||||
|
|
@ -50,6 +47,7 @@ bool dll_target::process(const NetProcTop*net)
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
FILE_NAME(obj, net);
|
||||||
|
|
||||||
/* Save the scope of the process. */
|
/* Save the scope of the process. */
|
||||||
obj->scope_ = lookup_scope_(net->scope());
|
obj->scope_ = lookup_scope_(net->scope());
|
||||||
|
|
@ -745,4 +743,3 @@ void dll_target::proc_while(const NetWhile*net)
|
||||||
net->emit_proc_recurse(this);
|
net->emit_proc_recurse(this);
|
||||||
stmt_cur_ = save_cur_;
|
stmt_cur_ = save_cur_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
10
t-dll.h
10
t-dll.h
|
|
@ -539,7 +539,7 @@ struct ivl_parameter_s {
|
||||||
unsigned lineno;
|
unsigned lineno;
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* All we know about a process it its type (initial or always) and the
|
* All we know about a process is its type (initial or always) and the
|
||||||
* single statement that is it. A process also has a scope, although
|
* single statement that is it. A process also has a scope, although
|
||||||
* that generally only matters for VPI calls.
|
* that generally only matters for VPI calls.
|
||||||
*/
|
*/
|
||||||
|
|
@ -547,6 +547,8 @@ struct ivl_process_s {
|
||||||
ivl_process_type_t type_;
|
ivl_process_type_t type_;
|
||||||
ivl_scope_t scope_;
|
ivl_scope_t scope_;
|
||||||
ivl_statement_t stmt_;
|
ivl_statement_t stmt_;
|
||||||
|
perm_string file;
|
||||||
|
unsigned lineno;
|
||||||
|
|
||||||
struct ivl_attribute_s*attr;
|
struct ivl_attribute_s*attr;
|
||||||
unsigned nattr;
|
unsigned nattr;
|
||||||
|
|
@ -763,4 +765,10 @@ static inline void FILE_NAME(ivl_switch_t net, const LineInfo*info)
|
||||||
net->lineno = info->get_lineno();
|
net->lineno = info->get_lineno();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void FILE_NAME(ivl_process_t net, const LineInfo*info)
|
||||||
|
{
|
||||||
|
net->file = info->get_file();
|
||||||
|
net->lineno = info->get_lineno();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue