Empty conditionals (pmonta@imedia.com)

This commit is contained in:
steve 1999-09-08 02:24:39 +00:00
parent 006a2cce83
commit 9d82d19d07
3 changed files with 21 additions and 7 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: elaborate.cc,v 1.78 1999/09/04 19:11:46 steve Exp $"
#ident "$Id: elaborate.cc,v 1.79 1999/09/08 02:24:39 steve Exp $"
#endif
/*
@ -1639,7 +1639,7 @@ NetProc* PCondit::elaborate(Design*des, const string&path) const
// Well, I actually need to generate code to handle the
// conditional, so elaborate.
NetProc*i = if_->elaborate(des, path);
NetProc*i = if_? if_->elaborate(des, path) : 0;
NetProc*e = else_? else_->elaborate(des, path) : 0;
NetCondit*res = new NetCondit(expr, i, e);
@ -2186,6 +2186,9 @@ Design* elaborate(const map<string,Module*>&modules,
/*
* $Log: elaborate.cc,v $
* Revision 1.79 1999/09/08 02:24:39 steve
* Empty conditionals (pmonta@imedia.com)
*
* Revision 1.78 1999/09/04 19:11:46 steve
* Add support for delayed non-blocking assignments.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: pform_dump.cc,v 1.37 1999/09/04 19:11:46 steve Exp $"
#ident "$Id: pform_dump.cc,v 1.38 1999/09/08 02:24:39 steve Exp $"
#endif
/*
@ -393,7 +393,10 @@ void PCase::dump(ostream&out, unsigned ind) const
void PCondit::dump(ostream&out, unsigned ind) const
{
out << setw(ind) << "" << "if (" << *expr_ << ")" << endl;
if_->dump(out, ind+3);
if (if_)
if_->dump(out, ind+3);
else
out << setw(ind) << ";" << endl;
if (else_) {
out << setw(ind) << "" << "else" << endl;
else_->dump(out, ind+3);
@ -636,6 +639,9 @@ void PUdp::dump(ostream&out) const
/*
* $Log: pform_dump.cc,v $
* Revision 1.38 1999/09/08 02:24:39 steve
* Empty conditionals (pmonta@imedia.com)
*
* Revision 1.37 1999/09/04 19:11:46 steve
* Add support for delayed non-blocking assignments.
*

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#if !defined(WINNT)
#ident "$Id: t-vvm.cc,v 1.39 1999/09/04 19:11:46 steve Exp $"
#ident "$Id: t-vvm.cc,v 1.40 1999/09/08 02:24:39 steve Exp $"
#endif
# include <iostream>
@ -1107,7 +1107,8 @@ void target_vvm::proc_case(ostream&os, const NetCase*net)
sc << " bool step_" << thread_step_ << "_()" << endl;
sc << " {" << endl;
net->stat(idx)->emit_proc(sc, this);
if (net->stat(idx))
net->stat(idx)->emit_proc(sc, this);
sc << " step_ = &step_" << exit_step << "_;" << endl;
sc << " return true;" << endl;
sc << " }" << endl;
@ -1121,7 +1122,8 @@ void target_vvm::proc_case(ostream&os, const NetCase*net)
sc << " bool step_" << thread_step_ << "_()" << endl;
sc << " {" << endl;
net->stat(default_idx)->emit_proc(sc, this);
if (net->stat(default_idx))
net->stat(default_idx)->emit_proc(sc, this);
sc << " step_ = &step_" << exit_step << "_;" << endl;
sc << " return true;" << endl;
sc << " }" << endl;
@ -1416,6 +1418,9 @@ extern const struct target tgt_vvm = {
};
/*
* $Log: t-vvm.cc,v $
* Revision 1.40 1999/09/08 02:24:39 steve
* Empty conditionals (pmonta@imedia.com)
*
* Revision 1.39 1999/09/04 19:11:46 steve
* Add support for delayed non-blocking assignments.
*