Clarify the use of ivl_scope_def for not-functions.

This commit is contained in:
steve 2007-01-29 01:52:51 +00:00
parent 2de8bafb5c
commit d175eb17f1
3 changed files with 33 additions and 4 deletions

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: ivl_target.h,v 1.174 2007/01/17 05:00:12 steve Exp $"
#ident "$Id: ivl_target.h,v 1.175 2007/01/29 01:52:51 steve Exp $"
#endif
# include <stdint.h>
@ -1330,7 +1330,9 @@ extern ivl_expr_t ivl_parameter_expr(ivl_parameter_t net);
*
* ivl_scope_def
* Task definition scopes carry a task definition, in the form of
* a statement. This method accesses that definition.
* a statement. This method accesses that definition. The
* ivl_scope_def function must return a statment for scopes that
* are type FUNCTION or TASK, and most return nil otherwise.
*
* ivl_scope_event
* ivl_scope_events
@ -1754,6 +1756,9 @@ _END_DECL
/*
* $Log: ivl_target.h,v $
* Revision 1.175 2007/01/29 01:52:51 steve
* Clarify the use of ivl_scope_def for not-functions.
*
* Revision 1.174 2007/01/17 05:00:12 steve
* Dead code for memories in scopes.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll.cc,v 1.163 2007/01/17 05:00:12 steve Exp $"
#ident "$Id: t-dll.cc,v 1.164 2007/01/29 01:52:51 steve Exp $"
#endif
# include "config.h"
@ -486,6 +486,7 @@ void dll_target::add_root(ivl_design_s &des_, const NetScope *s)
root_->event_ = 0;
root_->nlpm_ = 0;
root_->lpm_ = 0;
root_->def = 0;
make_scope_parameters(root_, s);
root_->type_ = IVL_SCT_MODULE;
root_->tname_ = root_->name_;
@ -1939,6 +1940,7 @@ void dll_target::scope(const NetScope*net)
scope->event_ = 0;
scope->nlpm_ = 0;
scope->lpm_ = 0;
scope->def = 0;
make_scope_parameters(scope, net);
scope->time_units = net->time_unit();
scope->nattr = net->attr_cnt();
@ -2187,6 +2189,9 @@ extern const struct target tgt_dll = { "dll", &dll_target_obj };
/*
* $Log: t-dll.cc,v $
* Revision 1.164 2007/01/29 01:52:51 steve
* Clarify the use of ivl_scope_def for not-functions.
*
* Revision 1.163 2007/01/17 05:00:12 steve
* Dead code for memories in scopes.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: stub.c,v 1.144 2007/01/17 05:00:12 steve Exp $"
#ident "$Id: stub.c,v 1.145 2007/01/29 01:52:51 steve Exp $"
#endif
/*
@ -1387,6 +1387,22 @@ static int show_scope(ivl_scope_t net, void*x)
for (idx = 0 ; idx < ivl_scope_lpms(net) ; idx += 1)
show_lpm(ivl_scope_lpm(net, idx));
switch (ivl_scope_type(net)) {
case IVL_SCT_FUNCTION:
case IVL_SCT_TASK:
fprintf(out, " scope function/task definition\n");
show_statement(ivl_scope_def(net), 6);
break;
default:
if (ivl_scope_def(net)) {
fprintf(out, " ERROR: scope has an attached task definition:\n");
show_statement(ivl_scope_def(net), 6);
stub_errors += 1;
}
break;
}
fprintf(out, "end scope %s\n", ivl_scope_name(net));
return ivl_scope_children(net, show_scope, 0);
}
@ -1469,6 +1485,9 @@ int target_design(ivl_design_t des)
/*
* $Log: stub.c,v $
* Revision 1.145 2007/01/29 01:52:51 steve
* Clarify the use of ivl_scope_def for not-functions.
*
* Revision 1.144 2007/01/17 05:00:12 steve
* Dead code for memories in scopes.
*