Permalink
Browse files

Redo synth to use match_proc_t scanner.

  • Loading branch information...
1 parent 998c039 commit b30b695ff054e3c99b842ebec4d4c349b6e507c2 steve committed Dec 1, 1999
Showing with 170 additions and 141 deletions.
  1. +43 −1 functor.cc
  2. +13 −1 functor.h
  3. +11 −1 netlist.h
  4. +103 −138 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.4 1999/11/18 03:52:19 steve Exp $"
+#ident "$Id: functor.cc,v 1.5 1999/12/01 06:06:16 steve Exp $"
#endif
# include "functor.h"
@@ -80,8 +80,50 @@ void NetFF::functor_node(Design*des, functor_t*fun)
fun->lpm_ff(des, this);
}
+proc_match_t::~proc_match_t()
+{
+}
+
+int NetProc::match_proc(proc_match_t*that)
+{
+ return 0;
+}
+
+int proc_match_t::assign(NetAssign*)
+{
+ return 0;
+}
+
+int NetAssign::match_proc(proc_match_t*that)
+{
+ return that->assign(this);
+}
+
+int proc_match_t::condit(NetCondit*)
+{
+ return 0;
+}
+
+int NetCondit::match_proc(proc_match_t*that)
+{
+ return that->condit(this);
+}
+
+int proc_match_t::pevent(NetPEvent*)
+{
+ return 0;
+}
+
+int NetPEvent::match_proc(proc_match_t*that)
+{
+ return that->pevent(this);
+}
+
/*
* $Log: functor.cc,v $
+ * Revision 1.5 1999/12/01 06:06:16 steve
+ * Redo synth to use match_proc_t scanner.
+ *
* Revision 1.4 1999/11/18 03:52:19 steve
* Turn NetTmp objects into normal local NetNet objects,
* and add the nodangle functor to clean up the local
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.2 1999/11/01 02:07:40 steve Exp $"
+#ident "$Id: functor.h,v 1.3 1999/12/01 06:06:16 steve Exp $"
#endif
/*
@@ -46,8 +46,20 @@ struct functor_t {
virtual void lpm_ff(class Design*des, class NetFF*);
};
+struct proc_match_t {
+ virtual ~proc_match_t();
+
+ virtual int assign(class NetAssign*);
+ virtual int condit(class NetCondit*);
+ virtual int pevent(class NetPEvent*);
+};
+
+
/*
* $Log: functor.h,v $
+ * Revision 1.3 1999/12/01 06:06:16 steve
+ * Redo synth to use match_proc_t scanner.
+ *
* Revision 1.2 1999/11/01 02:07:40 steve
* Add the synth functor to do generic synthesis
* and add the LPM_FF device to handle rows of
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.96 1999/11/28 23:42:02 steve Exp $"
+#ident "$Id: netlist.h,v 1.97 1999/12/01 06:06:16 steve Exp $"
#endif
/*
@@ -863,6 +863,10 @@ class NetProc : public LineInfo {
// target. The target returns true if OK, false for errors.
virtual bool emit_proc(ostream&, struct target_t*) const;
+ // This method is called by functors that want to scan a
+ // process in search of matchable patterns.
+ virtual int match_proc(struct proc_match_t*);
+
virtual void dump(ostream&, unsigned ind) const;
private:
@@ -918,6 +922,7 @@ class NetAssign : public NetAssign_ {
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual void emit_node(ostream&, struct target_t*) const;
+ virtual int match_proc(struct proc_match_t*);
virtual void dump(ostream&, unsigned ind) const;
virtual void dump_node(ostream&, unsigned ind) const;
@@ -1080,6 +1085,7 @@ class NetCondit : public NetProc {
void emit_recurse_else(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:
@@ -1173,6 +1179,7 @@ class NetPEvent : public NetProc, public sref_back<NetPEvent,NetNEvent> {
NetProc* statement();
const NetProc* statement() const;
+ virtual int match_proc(struct proc_match_t*);
virtual bool emit_proc(ostream&, struct target_t*) const;
virtual void dump(ostream&, unsigned ind) const;
@@ -2044,6 +2051,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
+ * Revision 1.97 1999/12/01 06:06:16 steve
+ * Redo synth to use match_proc_t scanner.
+ *
* Revision 1.96 1999/11/28 23:42:02 steve
* NetESignal object no longer need to be NetNode
* objects. Let them keep a pointer to NetNet objects.
Oops, something went wrong.

0 comments on commit b30b695

Please sign in to comment.