Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 113 lines (95 sloc) 3.787 kb
9754507 Add the functor interface for functor transforms.
steve authored
1 #ifndef __functor_H
2 #define __functor_H
3 /*
b734ecf Macintosh compilers do not support ident.
steve authored
4 * Copyright (c) 1999-2000 Stephen Williams (steve@icarus.com)
9754507 Add the functor interface for functor transforms.
steve authored
5 *
6 * This source code is free software; you can redistribute it
7 * and/or modify it in source code form under the terms of the GNU
8 * General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20 */
b734ecf Macintosh compilers do not support ident.
steve authored
21 #if !defined(WINNT) && !defined(macintosh)
2094a2f Catch some simple identity compareoptimizations.
steve authored
22 #ident "$Id: functor.h,v 1.13 2000/04/20 00:28:03 steve Exp $"
9754507 Add the functor interface for functor transforms.
steve authored
23 #endif
24
25 /*
26 * The functor is an object that can be applied to a design to
27 * transform it. This is different from the target_t, which can only
28 * scan the design but not transform it in any way.
29 */
30
31 class Design;
32 class NetNet;
33 class NetProcTop;
34
35 struct functor_t {
36 virtual ~functor_t();
37
74c4303 Clean up unneeded NetEvent objects.
steve authored
38 /* Events are scanned here. */
39 virtual void event(class Design*des, class NetEvent*);
40
41 /* This is called once for each signal in the design. */
9754507 Add the functor interface for functor transforms.
steve authored
42 virtual void signal(class Design*des, class NetNet*);
43
44 /* This method is called for each process in the design. */
45 virtual void process(class Design*des, class NetProcTop*);
46
b6d1bb1 Propogate constant 0 in low bits of adders.
steve authored
47 /* This method is called for each structural adder. */
48 virtual void lpm_add_sub(class Design*des, class NetAddSub*);
49
2094a2f Catch some simple identity compareoptimizations.
steve authored
50 /* This method is called for each structural comparator. */
51 virtual void lpm_compare(class Design*des, class NetCompare*);
52
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
53 /* This method is called for each structural constant. */
54 virtual void lpm_const(class Design*des, class NetConst*);
55
694ff93 Add support for integer division.
steve authored
56 /* This method is called for each structural constant. */
57 virtual void lpm_divide(class Design*des, class NetDivide*);
58
89881ad Add the synth functor to do generic synthesis
steve authored
59 /* This method is called for each FF in the design. */
60 virtual void lpm_ff(class Design*des, class NetFF*);
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
61
62 /* Handle LPM combinational logic devices. */
63 virtual void lpm_logic(class Design*des, class NetLogic*);
aa8908c Multiplication all the way to simulation.
steve authored
64
65 /* This method is called for each multiplier. */
66 virtual void lpm_mult(class Design*des, class NetMult*);
9754507 Add the functor interface for functor transforms.
steve authored
67 };
68
b30b695 Redo synth to use match_proc_t scanner.
steve authored
69 struct proc_match_t {
70 virtual ~proc_match_t();
71
72 virtual int assign(class NetAssign*);
3e2bb85 Synthesize LPM_RAM_DQ for writes into memories.
steve authored
73 virtual int assign_mem(class NetAssignMem*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
74 virtual int condit(class NetCondit*);
4493e96 Finally remove the NetNEvent and NetPEvent classes,
steve authored
75 virtual int event_wait(class NetEvWait*);
e77bcf6 Include some block matching from Larry.
steve authored
76 virtual int block(class NetBlock*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
77 };
78
79
9754507 Add the functor interface for functor transforms.
steve authored
80 /*
81 * $Log: functor.h,v $
2094a2f Catch some simple identity compareoptimizations.
steve authored
82 * Revision 1.13 2000/04/20 00:28:03 steve
83 * Catch some simple identity compareoptimizations.
84 *
74c4303 Clean up unneeded NetEvent objects.
steve authored
85 * Revision 1.12 2000/04/18 04:50:19 steve
86 * Clean up unneeded NetEvent objects.
87 *
4493e96 Finally remove the NetNEvent and NetPEvent classes,
steve authored
88 * Revision 1.11 2000/04/12 20:02:53 steve
89 * Finally remove the NetNEvent and NetPEvent classes,
90 * Get synthesis working with the NetEvWait class,
91 * and get started supporting multiple events in a
92 * wait in vvm.
93 *
694ff93 Add support for integer division.
steve authored
94 * Revision 1.10 2000/04/01 21:40:22 steve
95 * Add support for integer division.
96 *
b734ecf Macintosh compilers do not support ident.
steve authored
97 * Revision 1.9 2000/02/23 02:56:54 steve
98 * Macintosh compilers do not support ident.
99 *
e77bcf6 Include some block matching from Larry.
steve authored
100 * Revision 1.8 2000/02/13 04:35:43 steve
101 * Include some block matching from Larry.
102 *
aa8908c Multiplication all the way to simulation.
steve authored
103 * Revision 1.7 2000/01/13 03:35:35 steve
104 * Multiplication all the way to simulation.
105 *
b6d1bb1 Propogate constant 0 in low bits of adders.
steve authored
106 * Revision 1.6 1999/12/30 04:19:12 steve
107 * Propogate constant 0 in low bits of adders.
108 *
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
109 * Revision 1.5 1999/12/17 06:18:16 steve
110 * Rewrite the cprop functor to use the functor_t interface.
9754507 Add the functor interface for functor transforms.
steve authored
111 */
112 #endif
Something went wrong with that request. Please try again.