Permalink
Browse files

Include some block matching from Larry.

  • Loading branch information...
steve
steve committed Feb 13, 2000
1 parent 2bc8f79 commit e77bcf69101d2ff87a596cd3fdaff352a731d03c
Showing with 52 additions and 5 deletions.
  1. +17 −1 functor.cc
  2. +5 −1 functor.h
  3. +6 −2 netlist.h
  4. +24 −1 synth.cc
View
@@ -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,13 +145,26 @@ 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;
}
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.
*
View
@@ -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.
*
View
@@ -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.
*
View
@@ -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.
*

0 comments on commit e77bcf6

Please sign in to comment.