Fix handling of null delay statements.

This commit is contained in:
steve 1999-05-05 03:04:46 +00:00
parent 9e82ed240c
commit b44ef063a8
3 changed files with 30 additions and 7 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: design_dump.cc,v 1.20 1999/05/01 20:43:55 steve Exp $" #ident "$Id: design_dump.cc,v 1.21 1999/05/05 03:04:46 steve Exp $"
#endif #endif
/* /*
@ -356,7 +356,12 @@ void NetCondit::dump(ostream&o, unsigned ind) const
void NetPDelay::dump(ostream&o, unsigned ind) const void NetPDelay::dump(ostream&o, unsigned ind) const
{ {
o << setw(ind) << "" << "#" << delay_ << endl; o << setw(ind) << "" << "#" << delay_ << endl;
statement_->dump(o, ind+2); if (statement_) {
o << endl;
statement_->dump(o, ind+2);
} else {
o << " /* noop */;" << endl;
}
} }
void NetPEvent::dump(ostream&o, unsigned ind) const void NetPEvent::dump(ostream&o, unsigned ind) const
@ -563,6 +568,9 @@ void Design::dump(ostream&o) const
/* /*
* $Log: design_dump.cc,v $ * $Log: design_dump.cc,v $
* Revision 1.21 1999/05/05 03:04:46 steve
* Fix handling of null delay statements.
*
* Revision 1.20 1999/05/01 20:43:55 steve * Revision 1.20 1999/05/01 20:43:55 steve
* Handle wide events, such as @(a) where a has * Handle wide events, such as @(a) where a has
* many bits in it. * many bits in it.

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: elaborate.cc,v 1.23 1999/05/01 20:43:55 steve Exp $" #ident "$Id: elaborate.cc,v 1.24 1999/05/05 03:04:46 steve Exp $"
#endif #endif
/* /*
@ -860,7 +860,10 @@ NetProc* PDelayStatement::elaborate(Design*des, const string&path) const
assert(num); assert(num);
unsigned long val = num->as_ulong(); unsigned long val = num->as_ulong();
return new NetPDelay(val, statement_->elaborate(des, path)); if (statement_)
return new NetPDelay(val, statement_->elaborate(des, path));
else
return new NetPDelay(val, 0);
} }
/* /*
@ -1057,6 +1060,9 @@ Design* elaborate(const map<string,Module*>&modules,
/* /*
* $Log: elaborate.cc,v $ * $Log: elaborate.cc,v $
* Revision 1.24 1999/05/05 03:04:46 steve
* Fix handling of null delay statements.
*
* Revision 1.23 1999/05/01 20:43:55 steve * Revision 1.23 1999/05/01 20:43:55 steve
* Handle wide events, such as @(a) where a has * Handle wide events, such as @(a) where a has
* many bits in it. * many bits in it.

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if !defined(WINNT) #if !defined(WINNT)
#ident "$Id: pform_dump.cc,v 1.14 1999/05/01 02:57:53 steve Exp $" #ident "$Id: pform_dump.cc,v 1.15 1999/05/05 03:04:46 steve Exp $"
#endif #endif
/* /*
@ -298,8 +298,14 @@ void PCondit::dump(ostream&out, unsigned ind) const
void PDelayStatement::dump(ostream&out, unsigned ind) const void PDelayStatement::dump(ostream&out, unsigned ind) const
{ {
out << setw(ind) << "" << "#" << *delay_ << endl; out << setw(ind) << "" << "#" << *delay_ << " /* " <<
statement_->dump(out, ind+2); get_line() << " */";
if (statement_) {
out << endl;
statement_->dump(out, ind+2);
} else {
out << " /* noop */;" << endl;
}
} }
void PEventStatement::dump(ostream&out, unsigned ind) const void PEventStatement::dump(ostream&out, unsigned ind) const
@ -434,6 +440,9 @@ void PUdp::dump(ostream&out) const
/* /*
* $Log: pform_dump.cc,v $ * $Log: pform_dump.cc,v $
* Revision 1.15 1999/05/05 03:04:46 steve
* Fix handling of null delay statements.
*
* Revision 1.14 1999/05/01 02:57:53 steve * Revision 1.14 1999/05/01 02:57:53 steve
* Handle much more complex event expressions. * Handle much more complex event expressions.
* *