diff --git a/elaborate.cc b/elaborate.cc index d70dee178..c4f1b375d 100644 --- a/elaborate.cc +++ b/elaborate.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: elaborate.cc,v 1.158 2000/04/12 04:23:58 steve Exp $" +#ident "$Id: elaborate.cc,v 1.159 2000/04/18 01:02:53 steve Exp $" #endif /* @@ -745,6 +745,7 @@ NetProc* PAssign::assign_to_memory_(NetMemory*mem, PExpr*ix, assert(rv); rv->set_width(mem->width()); + assert(ix); NetNet*idx = ix->elaborate_net(des, path, 0, 0, 0, 0); assert(idx); @@ -2224,6 +2225,9 @@ Design* elaborate(const map&modules, /* * $Log: elaborate.cc,v $ + * Revision 1.159 2000/04/18 01:02:53 steve + * Minor cleanup of NetTaskDef. + * * Revision 1.158 2000/04/12 04:23:58 steve * Named events really should be expressed with PEIdent * objects in the pform, diff --git a/netlist.cc b/netlist.cc index 78ced48d8..3c16ee2d5 100644 --- a/netlist.cc +++ b/netlist.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: netlist.cc,v 1.115 2000/04/16 23:32:19 steve Exp $" +#ident "$Id: netlist.cc,v 1.116 2000/04/18 01:02:54 steve Exp $" #endif # include @@ -2313,12 +2313,27 @@ void NetTaskDef::set_proc(NetProc*p) proc_ = p; } +unsigned NetTaskDef::port_count() const +{ + return ports_.count(); +} + NetNet* NetTaskDef::port(unsigned idx) { assert(idx < ports_.count()); return ports_[idx]; } +const string& NetTaskDef::name() const +{ + return name_; +} + +const NetProc*NetTaskDef::proc() const +{ + return proc_; +} + /* * This method takes the input string, which contains exactly one * edge, and connects it to the correct output state. The output state @@ -2468,6 +2483,9 @@ bool NetUDP::sequ_glob_(string input, char output) /* * $Log: netlist.cc,v $ + * Revision 1.116 2000/04/18 01:02:54 steve + * Minor cleanup of NetTaskDef. + * * Revision 1.115 2000/04/16 23:32:19 steve * Synthesis of comparator in expressions. * diff --git a/netlist.h b/netlist.h index 1cfa59c28..36b9820dd 100644 --- a/netlist.h +++ b/netlist.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: netlist.h,v 1.123 2000/04/16 23:32:19 steve Exp $" +#ident "$Id: netlist.h,v 1.124 2000/04/18 01:02:54 steve Exp $" #endif /* @@ -1512,6 +1512,13 @@ class NetSTask : public NetProc { * This class represents an elaborated class definition. NetUTask * classes may refer to objects of this type to get the meaning of the * defined task. + * + * The task also introduces a scope, and the parameters are actually + * reg objects in the new scope. The task is called by the calling + * thread assigning (blocking assignment) to the in and inout + * paramters, then invoking the thread, and finally assigning out the + * output and inout variables. The variables accessable as ports are + * also elaborated and accessible as ordinary reg objects. */ class NetTaskDef { @@ -1521,10 +1528,10 @@ class NetTaskDef { void set_proc(NetProc*p); - const string& name() const { return name_; } - const NetProc*proc() const { return proc_; } + const string& name() const; + const NetProc*proc() const; - unsigned port_count() const { return ports_.count(); } + unsigned port_count() const; NetNet*port(unsigned idx); void dump(ostream&, unsigned) const; @@ -2374,6 +2381,9 @@ extern ostream& operator << (ostream&, NetNet::Type); /* * $Log: netlist.h,v $ + * Revision 1.124 2000/04/18 01:02:54 steve + * Minor cleanup of NetTaskDef. + * * Revision 1.123 2000/04/16 23:32:19 steve * Synthesis of comparator in expressions. *