synthesize the rvalue of <= statements.
This commit is contained in:
parent
4ca0bffc7f
commit
92424eea10
|
|
@ -19,7 +19,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) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: syn-rules.y,v 1.10 2000/11/11 00:03:36 steve Exp $"
|
#ident "$Id: syn-rules.y,v 1.11 2000/11/22 21:18:42 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -133,10 +133,17 @@ start
|
||||||
static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk,
|
static void make_DFF_CE(Design*des, NetProcTop*top, NetEvWait*wclk,
|
||||||
NetEvent*eclk, NetExpr*cexp, NetAssignBase*asn)
|
NetEvent*eclk, NetExpr*cexp, NetAssignBase*asn)
|
||||||
{
|
{
|
||||||
|
assert(asn);
|
||||||
|
|
||||||
NetEvProbe*pclk = eclk->probe(0);
|
NetEvProbe*pclk = eclk->probe(0);
|
||||||
NetESignal*d = dynamic_cast<NetESignal*> (asn->rval());
|
NetESignal*d = dynamic_cast<NetESignal*> (asn->rval());
|
||||||
NetNet*ce = cexp? cexp->synthesize(des) : 0;
|
NetNet*ce = cexp? cexp->synthesize(des) : 0;
|
||||||
|
|
||||||
|
if (d == 0) {
|
||||||
|
cerr << asn->get_line() << ": internal error: "
|
||||||
|
<< " not a simple signal? " << *asn->rval() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
assert(d);
|
assert(d);
|
||||||
|
|
||||||
NetFF*ff = new NetFF(top->scope(), asn->l_val(0)->name(),
|
NetFF*ff = new NetFF(top->scope(), asn->l_val(0)->name(),
|
||||||
|
|
|
||||||
21
synth.cc
21
synth.cc
|
|
@ -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) && !defined(macintosh)
|
#if !defined(WINNT) && !defined(macintosh)
|
||||||
#ident "$Id: synth.cc,v 1.10 2000/05/13 20:55:47 steve Exp $"
|
#ident "$Id: synth.cc,v 1.11 2000/11/22 21:18:42 steve Exp $"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# include "functor.h"
|
# include "functor.h"
|
||||||
|
|
@ -42,6 +42,7 @@ class do_expr : public proc_match_t {
|
||||||
Design*des_;
|
Design*des_;
|
||||||
|
|
||||||
virtual int assign(NetAssign*);
|
virtual int assign(NetAssign*);
|
||||||
|
virtual int assign_nb(NetAssignNB*);
|
||||||
virtual int event_wait(NetEvWait*);
|
virtual int event_wait(NetEvWait*);
|
||||||
//virtual int assign_mem(NetAssignMem*);
|
//virtual int assign_mem(NetAssignMem*);
|
||||||
virtual int condit(NetCondit*);
|
virtual int condit(NetCondit*);
|
||||||
|
|
@ -63,6 +64,21 @@ int do_expr::assign(NetAssign*stmt)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int do_expr::assign_nb(NetAssignNB*stmt)
|
||||||
|
{
|
||||||
|
if (dynamic_cast<NetESignal*>(stmt->rval()))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
NetNet*tmp = stmt->rval()->synthesize(des_);
|
||||||
|
if (tmp == 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
NetESignal*tmpe = new NetESignal(tmp);
|
||||||
|
stmt->set_rval(tmpe);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int do_expr::condit(NetCondit*stmt)
|
int do_expr::condit(NetCondit*stmt)
|
||||||
{
|
{
|
||||||
/* synthesize the condition expression, if necessary. */
|
/* synthesize the condition expression, if necessary. */
|
||||||
|
|
@ -145,6 +161,9 @@ void synth(Design*des)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: synth.cc,v $
|
* $Log: synth.cc,v $
|
||||||
|
* Revision 1.11 2000/11/22 21:18:42 steve
|
||||||
|
* synthesize the rvalue of <= statements.
|
||||||
|
*
|
||||||
* Revision 1.10 2000/05/13 20:55:47 steve
|
* Revision 1.10 2000/05/13 20:55:47 steve
|
||||||
* Use yacc based synthesizer.
|
* Use yacc based synthesizer.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue