Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 104 lines (80 sloc) 3.775 kb
9754507 Add the functor interface for functor transforms.
steve authored
1 #ifndef __functor_H
2 #define __functor_H
3 /*
5e8a1bd @caryr Add power operator (**) for real values in a continuous assignment.
caryr authored
4 * Copyright (c) 1999-2008 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 */
21
22 /*
23 * The functor is an object that can be applied to a design to
24 * transform it. This is different from the target_t, which can only
25 * scan the design but not transform it in any way.
741b172 Handle some edge cases during node scans.
steve authored
26 *
27 * When a functor it scanning a process, signal or node, the functor
28 * is free to manipulate the list by deleting items, including the
29 * node being scanned. The Design class scanner knows how to handle
30 * the situation. However, if objects are added to the netlist, there
31 * is no guarantee that object will be scanned unless the functor is
32 * rerun.
9754507 Add the functor interface for functor transforms.
steve authored
33 */
34
35 class Design;
36 class NetNet;
37 class NetProcTop;
38
39 struct functor_t {
40 virtual ~functor_t();
41
74c4303 Clean up unneeded NetEvent objects.
steve authored
42 /* Events are scanned here. */
43 virtual void event(class Design*des, class NetEvent*);
44
45 /* This is called once for each signal in the design. */
9754507 Add the functor interface for functor transforms.
steve authored
46 virtual void signal(class Design*des, class NetNet*);
47
48 /* This method is called for each process in the design. */
49 virtual void process(class Design*des, class NetProcTop*);
50
e91243e @steveicarus Elaborate abs() is continuous assign expressions.
authored
51 /* This method is called for each structural abs(). */
52 virtual void lpm_abs(class Design*des, class NetAbs*);
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
75ad905 Generalize signals to carry types.
steve authored
66 /* Constant literals. */
67 virtual void lpm_literal(class Design*des, class NetLiteral*);
68
89d7176 Add support for modulus (Eric Aardoom)
steve authored
69 /* This method is called for each structural constant. */
70 virtual void lpm_modulo(class Design*des, class NetModulo*);
71
89881ad Add the synth functor to do generic synthesis
steve authored
72 /* This method is called for each FF in the design. */
73 virtual void lpm_ff(class Design*des, class NetFF*);
4de8ba4 Rewrite the cprop functor to use the functor_t interface.
steve authored
74
75 /* Handle LPM combinational logic devices. */
76 virtual void lpm_logic(class Design*des, class NetLogic*);
aa8908c Multiplication all the way to simulation.
steve authored
77
78 /* This method is called for each multiplier. */
79 virtual void lpm_mult(class Design*des, class NetMult*);
2a08824 Detect muxing Vz as a bufufN.
steve authored
80
81 /* This method is called for each MUX. */
82 virtual void lpm_mux(class Design*des, class NetMux*);
97f83ff laborate reduction gates into LPM_RED_ nodes.
steve authored
83
5e8a1bd @caryr Add power operator (**) for real values in a continuous assignment.
caryr authored
84 /* This method is called for each power. */
85 virtual void lpm_pow(class Design*des, class NetPow*);
86
97f83ff laborate reduction gates into LPM_RED_ nodes.
steve authored
87 /* This method is called for each unary reduction gate. */
88 virtual void lpm_ureduce(class Design*des, class NetUReduce*);
739a183 Do sign extension of structuran nets.
steve authored
89
90 virtual void sign_extend(class Design*des, class NetSignExtend*);
9754507 Add the functor interface for functor transforms.
steve authored
91 };
92
b30b695 Redo synth to use match_proc_t scanner.
steve authored
93 struct proc_match_t {
94 virtual ~proc_match_t();
95
96 virtual int assign(class NetAssign*);
d677f22 Support <= in synthesis of DFF and ram devices.
steve authored
97 virtual int assign_nb(class NetAssignNB*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
98 virtual int condit(class NetCondit*);
4493e96 Finally remove the NetNEvent and NetPEvent classes,
steve authored
99 virtual int event_wait(class NetEvWait*);
e77bcf6 Include some block matching from Larry.
steve authored
100 virtual int block(class NetBlock*);
b30b695 Redo synth to use match_proc_t scanner.
steve authored
101 };
102
9754507 Add the functor interface for functor transforms.
steve authored
103 #endif
Something went wrong with that request. Please try again.