Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 140 lines (120 sloc) 4.847 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)
89d7176 Add support for modulus (Eric Aardoom)
steve authored
22 #ident "$Id: functor.h,v 1.17 2000/09/17 21:26:15 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.
741b172 Handle some edge cases during node scans.
steve authored
29 *
30 * When a functor it scanning a process, signal or node, the functor
31 * is free to manipulate the list by deleting items, including the
32 * node being scanned. The Design class scanner knows how to handle
33 * the situation. However, if objects are added to the netlist, there
34 * is no guarantee that object will be scanned unless the functor is
35 * rerun.
9754507 Add the functor interface for functor transforms.
steve authored
36 */
37
38 class Design;
39 class NetNet;
40 class NetProcTop;
41
42 struct functor_t {
43 virtual ~functor_t();
44
74c4303 Clean up unneeded NetEvent objects.
steve authored
45 /* Events are scanned here. */
46 virtual void event(class Design*des, class NetEvent*);
47
48 /* This is called once for each signal in the design. */
9754507 Add the functor interface for functor transforms.
steve authored
49 virtual void signal(class Design*des, class NetNet*);
50
51 /* This method is called for each process in the design. */
52 virtual void process(class Design*des, class NetProcTop*);
53
b6d1bb1 Propogate constant 0 in low bits of adders.
steve authored
54 /* This method is called for each structural adder. */
55 virtual void lpm_add_sub(class Design*des, class NetAddSub*);
56
2094a2f Catch some simple identity compareoptimizations.
steve authored
57 /* This method is called for each structural comparator. */
58 virtual void lpm_compare(class Design*des, class NetCompare*);
59
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
60 /* This method is called for each structural constant. */
61 virtual void lpm_const(class Design*des, class NetConst*);
62
694ff93 Add support for integer division.
steve authored
63 /* This method is called for each structural constant. */
64 virtual void lpm_divide(class Design*des, class NetDivide*);
65
89d7176 Add support for modulus (Eric Aardoom)
steve authored
66 /* This method is called for each structural constant. */
67 virtual void lpm_modulo(class Design*des, class NetModulo*);
68
89881ad Add the synth functor to do generic synthesis
steve authored
69 /* This method is called for each FF in the design. */
70 virtual void lpm_ff(class Design*des, class NetFF*);
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
71
72 /* Handle LPM combinational logic devices. */
73 virtual void lpm_logic(class Design*des, class NetLogic*);
aa8908c Multiplication all the way to simulation.
steve authored
74
75 /* This method is called for each multiplier. */
76 virtual void lpm_mult(class Design*des, class NetMult*);
2a08824 Detect muxing Vz as a bufufN.
steve authored
77
78 /* This method is called for each MUX. */
79 virtual void lpm_mux(class Design*des, class NetMux*);
9754507 Add the functor interface for functor transforms.
steve authored
80 };
81
b30b695 Redo synth to use match_proc_t scanner.
steve authored
82 struct proc_match_t {
83 virtual ~proc_match_t();
84
85 virtual int assign(class NetAssign*);
3e2bb85 Synthesize LPM_RAM_DQ for writes into memories.
steve authored
86 virtual int assign_mem(class NetAssignMem*);
d677f22 Support <= in synthesis of DFF and ram devices.
steve authored
87 virtual int assign_nb(class NetAssignNB*);
88 virtual int assign_mem_nb(class NetAssignMemNB*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
89 virtual int condit(class NetCondit*);
4493e96 Finally remove the NetNEvent and NetPEvent classes,
steve authored
90 virtual int event_wait(class NetEvWait*);
e77bcf6 Include some block matching from Larry.
steve authored
91 virtual int block(class NetBlock*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
92 };
93
94
9754507 Add the functor interface for functor transforms.
steve authored
95 /*
96 * $Log: functor.h,v $
89d7176 Add support for modulus (Eric Aardoom)
steve authored
97 * Revision 1.17 2000/09/17 21:26:15 steve
98 * Add support for modulus (Eric Aardoom)
99 *
d677f22 Support <= in synthesis of DFF and ram devices.
steve authored
100 * Revision 1.16 2000/08/01 02:48:42 steve
101 * Support <= in synthesis of DFF and ram devices.
102 *
741b172 Handle some edge cases during node scans.
steve authored
103 * Revision 1.15 2000/07/16 04:56:07 steve
104 * Handle some edge cases during node scans.
105 *
2a08824 Detect muxing Vz as a bufufN.
steve authored
106 * Revision 1.14 2000/07/15 05:13:44 steve
107 * Detect muxing Vz as a bufufN.
108 *
2094a2f Catch some simple identity compareoptimizations.
steve authored
109 * Revision 1.13 2000/04/20 00:28:03 steve
110 * Catch some simple identity compareoptimizations.
111 *
74c4303 Clean up unneeded NetEvent objects.
steve authored
112 * Revision 1.12 2000/04/18 04:50:19 steve
113 * Clean up unneeded NetEvent objects.
114 *
4493e96 Finally remove the NetNEvent and NetPEvent classes,
steve authored
115 * Revision 1.11 2000/04/12 20:02:53 steve
116 * Finally remove the NetNEvent and NetPEvent classes,
117 * Get synthesis working with the NetEvWait class,
118 * and get started supporting multiple events in a
119 * wait in vvm.
120 *
694ff93 Add support for integer division.
steve authored
121 * Revision 1.10 2000/04/01 21:40:22 steve
122 * Add support for integer division.
123 *
b734ecf Macintosh compilers do not support ident.
steve authored
124 * Revision 1.9 2000/02/23 02:56:54 steve
125 * Macintosh compilers do not support ident.
126 *
e77bcf6 Include some block matching from Larry.
steve authored
127 * Revision 1.8 2000/02/13 04:35:43 steve
128 * Include some block matching from Larry.
129 *
aa8908c Multiplication all the way to simulation.
steve authored
130 * Revision 1.7 2000/01/13 03:35:35 steve
131 * Multiplication all the way to simulation.
132 *
b6d1bb1 Propogate constant 0 in low bits of adders.
steve authored
133 * Revision 1.6 1999/12/30 04:19:12 steve
134 * Propogate constant 0 in low bits of adders.
135 *
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
136 * Revision 1.5 1999/12/17 06:18:16 steve
137 * Rewrite the cprop functor to use the functor_t interface.
9754507 Add the functor interface for functor transforms.
steve authored
138 */
139 #endif
Something went wrong with that request. Please try again.