diff --git a/functor.cc b/functor.cc index 1465091ad..8eb8a16fc 100644 --- a/functor.cc +++ b/functor.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: functor.cc,v 1.10 2000/01/13 03:35:35 steve Exp $" +#ident "$Id: functor.cc,v 1.11 2000/02/13 04:35:43 steve Exp $" #endif # include "functor.h" @@ -145,6 +145,18 @@ int NetAssignMem::match_proc(proc_match_t*that) return that->assign_mem(this); } +int proc_match_t::block(NetBlock*) +{ + cerr << "default (failing) match for block" << endl; + return 0; +} + +int NetBlock::match_proc(proc_match_t*that) +{ + cerr << "NetBlock::match_proc" << endl; + return that->block(this); +} + int proc_match_t::condit(NetCondit*) { return 0; @@ -152,6 +164,7 @@ int proc_match_t::condit(NetCondit*) int NetCondit::match_proc(proc_match_t*that) { + cerr << "NetCondit::match_proc" << endl; return that->condit(this); } @@ -167,6 +180,9 @@ int NetPEvent::match_proc(proc_match_t*that) /* * $Log: functor.cc,v $ + * Revision 1.11 2000/02/13 04:35:43 steve + * Include some block matching from Larry. + * * Revision 1.10 2000/01/13 03:35:35 steve * Multiplication all the way to simulation. * diff --git a/functor.h b/functor.h index ed93b2c5b..22f30baf9 100644 --- a/functor.h +++ b/functor.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: functor.h,v 1.7 2000/01/13 03:35:35 steve Exp $" +#ident "$Id: functor.h,v 1.8 2000/02/13 04:35:43 steve Exp $" #endif /* @@ -65,11 +65,15 @@ struct proc_match_t { virtual int assign_mem(class NetAssignMem*); virtual int condit(class NetCondit*); virtual int pevent(class NetPEvent*); + virtual int block(class NetBlock*); }; /* * $Log: functor.h,v $ + * Revision 1.8 2000/02/13 04:35:43 steve + * Include some block matching from Larry. + * * Revision 1.7 2000/01/13 03:35:35 steve * Multiplication all the way to simulation. * diff --git a/netlist.h b/netlist.h index bea4907f8..758b17813 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) -#ident "$Id: netlist.h,v 1.108 2000/01/13 03:35:35 steve Exp $" +#ident "$Id: netlist.h,v 1.109 2000/02/13 04:35:43 steve Exp $" #endif /* @@ -1072,7 +1072,7 @@ class NetAssignMemNB : public NetAssignMem_ { private: }; -/* A block is stuff line begin-end blocks, that contain and ordered +/* A block is stuff like begin-end blocks, that contain an ordered list of NetProc statements. NOTE: The emit method calls the target->proc_block function but @@ -1092,6 +1092,7 @@ class NetBlock : public NetProc { void emit_recurse(ostream&, struct target_t*) const; virtual bool emit_proc(ostream&, struct target_t*) const; + virtual int match_proc(struct proc_match_t*); virtual void dump(ostream&, unsigned ind) const; private: @@ -2151,6 +2152,9 @@ extern ostream& operator << (ostream&, NetNet::Type); /* * $Log: netlist.h,v $ + * Revision 1.109 2000/02/13 04:35:43 steve + * Include some block matching from Larry. + * * Revision 1.108 2000/01/13 03:35:35 steve * Multiplication all the way to simulation. * diff --git a/synth.cc b/synth.cc index b899f8b7b..69bf040b2 100644 --- a/synth.cc +++ b/synth.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) -#ident "$Id: synth.cc,v 1.4 1999/12/05 02:24:09 steve Exp $" +#ident "$Id: synth.cc,v 1.5 2000/02/13 04:35:43 steve Exp $" #endif /* @@ -205,6 +205,21 @@ void match_dff::make_ram_() des_->add_node(ram); } +class match_block : public proc_match_t { + + public: + match_block(Design*d, NetProcTop*t) + : des_(d), top_(t) + { } + + ~match_block() { } + + private: + + Design*des_; + NetProcTop*top_; +}; + class synth_f : public functor_t { public: @@ -242,6 +257,11 @@ void synth_f::proc_always_(class Design*des) des->delete_process(top_); return; } + + match_block block_pat(des, top_); + if (top_->statement()->match_proc(&block_pat)) { + cerr << "XXXX: recurse and return here" << endl; + } } @@ -253,6 +273,9 @@ void synth(Design*des) /* * $Log: synth.cc,v $ + * Revision 1.5 2000/02/13 04:35:43 steve + * Include some block matching from Larry. + * * Revision 1.4 1999/12/05 02:24:09 steve * Synthesize LPM_RAM_DQ for writes into memories. *