Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 725 lines (575 sloc) 24.24 kb
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
1 #ifndef __PExpr_H
2 #define __PExpr_H
3 /*
312b4da4 »
2011-02-26 Expression width rework.
4 * Copyright (c) 1998-2011 Stephen Williams <steve@icarus.com>
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
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 # include <string>
d434dd72 »
2006-02-02 Allow part selects of memory words in l-values.
23 # include <vector>
7ec86757 »
2008-11-18 Elaborate concatenation expression put tested widths to use.
24 # include <valarray>
ce497084 »
1999-04-29 Parse OR of event expressions.
25 # include "netlist.h"
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
26 # include "verinum.h"
5895d3c9 »
1999-04-19 Add memories to the parse and elaboration phases.
27 # include "LineInfo.h"
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
28 # include "pform_types.h"
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
29
30 class Design;
10ffaeda »
1999-05-16 Redo constant expression detection to happen
31 class Module;
f9559371 »
2010-01-12 Fix for pr2924354.
32 class LexicalScope;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
33 class NetNet;
34 class NetExpr;
e7efc270 »
2000-03-08 Redesign the implementation of scopes and parameters.
35 class NetScope;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
36
37 /*
38 * The PExpr class hierarchy supports the description of
39 * expressions. The parser can generate expression objects from the
40 * source, possibly reducing things that it knows how to reduce.
41 */
42
5895d3c9 »
1999-04-19 Add memories to the parse and elaboration phases.
43 class PExpr : public LineInfo {
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
44
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
45 public:
312b4da4 »
2011-02-26 Expression width rework.
46 enum width_mode_t { SIZED, EXPAND, LOSSLESS, UNSIZED };
47
93067149 »
2011-03-27 Rework of constant expression error reporting.
48 // Flag values that can be passed to elaborate_expr.
49 static const unsigned NO_FLAGS = 0x0;
50 static const unsigned NEED_CONST = 0x1;
51 static const unsigned SYS_TASK_ARG = 0x2;
52
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
53 PExpr();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
54 virtual ~PExpr();
55
56 virtual void dump(ostream&) const;
31bdb87c »
1999-09-15 separate assign lval elaboration for error checking.
57
f9559371 »
2010-01-12 Fix for pr2924354.
58 // This method tests whether the expression contains any identifiers
59 // that have not been previously declared in the specified scope or
60 // in any containing scope. Any such identifiers are added to the
61 // specified scope as scalar nets of the specified type.
62 //
63 // This operation must be performed by the parser, to ensure that
64 // subsequent declarations do not affect the decision to create an
65 // implicit net.
66 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
67
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
68 // This method tests whether the expression contains any
69 // references to automatically allocated variables.
70 virtual bool has_aa_term(Design*des, NetScope*scope) const;
71
312b4da4 »
2011-02-26 Expression width rework.
72 // This method tests the type and width that the expression wants
73 // to be. It should be called before elaborating an expression to
74 // figure out the type and width of the expression. It also figures
75 // out the minimum width that can be used to evaluate the expression
76 // without changing the result. This allows the expression width to
77 // be pruned when not all bits of the result are used.
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
78 //
312b4da4 »
2011-02-26 Expression width rework.
79 // Normally mode should be initialised to SIZED before starting to
80 // test the width of an expression. In SIZED mode the expression
81 // width will be calculated strictly according to the IEEE standard
82 // rules for expression width.
83 // If the expression contains an unsized literal, mode will be
84 // changed to LOSSLESS. In LOSSLESS mode the expression width will
85 // be calculated as the minimum width necessary to avoid arithmetic
86 // overflow or underflow.
87 // If the expression both contains an unsized literal and contains
88 // an operation that coerces a vector operand to a different type
89 // (signed <-> unsigned), mode is changed to UNSIZED. UNSIZED mode
90 // is the same as LOSSLESS, except that the final expression width
91 // will be forced to be at least integer_width. This is necessary
92 // to ensure compatibility with the IEEE standard, which requires
93 // unsized literals to be treated as having the same width as an
94 // integer. The lossless width calculation is inadequate in this
95 // case because coercing an operand to a different type means that
96 // the expression no longer obeys the normal rules of arithmetic.
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
97 //
312b4da4 »
2011-02-26 Expression width rework.
98 // If mode is initialised to EXPAND instead of SIZED, the expression
99 // width will be calculated as the minimum width necessary to avoid
100 // arithmetic overflow or underflow, even if it contains no unsized
101 // literals. mode will be changed LOSSLESS or UNSIZED as described
102 // above. This supports a non-standard mode of expression width
103 // calculation.
3296b1de »
2008-09-26 Include a calculation of the expression type in test_width methods.
104 //
312b4da4 »
2011-02-26 Expression width rework.
105 // When the final value of mode is UNSIZED, the width returned by
106 // this method is the calculated lossless width, but the width
107 // returned by a subsequent call to the expr_width method will be
108 // the final expression width.
2a0d3360 »
2011-03-02 Fix spacing problems.
109 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
110 width_mode_t&mode);
c85eff93 »
2008-10-10 The test_width methods scan and mark expressions with type and size.
111
112 // After the test_width method is complete, these methods
113 // return valid results.
114 ivl_variable_type_t expr_type() const { return expr_type_; }
115 unsigned expr_width() const { return expr_width_; }
312b4da4 »
2011-02-26 Expression width rework.
116 unsigned min_width() const { return min_width_; }
117 bool has_sign() const { return signed_flag_; }
118
119 // This method allows the expression type (signed/unsigned)
120 // to be propagated down to any context-dependant operands.
121 void cast_signed(bool flag) { signed_flag_ = flag; }
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
122
71faebd6 »
2006-06-02 Make elaborate_expr methods aware of the width that the context
123 // Procedural elaboration of the expression. The expr_width is
312b4da4 »
2011-02-26 Expression width rework.
124 // the required width of the expression.
845e74c3 »
2007-06-27 Evaluate parameter expressions losslessly
125 //
126 // The sys_task_arg flag is true if expressions are allowed to
127 // be incomplete.
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
128 virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
129 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
130 unsigned flags) const;
e7efc270 »
2000-03-08 Redesign the implementation of scopes and parameters.
131
31bdb87c »
1999-09-15 separate assign lval elaboration for error checking.
132 // This method elaborates the expression as gates, but
133 // restricted for use as l-values of continuous assignments.
d26ae866 »
2008-03-18 Move implicit net creation from elaboration to elaborate_sig
134 virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
135
4a8be3db »
2005-08-06 Implement bi-directional part selects.
136 // This is similar to elaborate_lnet, except that the
137 // expression is evaluated to be bi-directional. This is
138 // useful for arguments to inout ports of module instances and
139 // ports of tran primitives.
140 virtual NetNet* elaborate_bi_net(Design*des, NetScope*scope) const;
141
b6ce313e »
2000-09-09 move lval elaboration to PExpr virtual methods.
142 // Expressions that can be in the l-value of procedural
8f2d679c »
2004-12-29 Unify elaboration of l-values for all proceedural assignments,
143 // assignments can be elaborated with this method. If the
144 // is_force flag is true, then the set of valid l-value types
47d65034 »
2008-01-25 Spelling fixes
145 // is slightly modified to accommodate the Verilog force
8f2d679c »
2004-12-29 Unify elaboration of l-values for all proceedural assignments,
146 // statement
147 virtual NetAssign_* elaborate_lval(Design*des,
148 NetScope*scope,
149 bool is_force) const;
b6ce313e »
2000-09-09 move lval elaboration to PExpr virtual methods.
150
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
151 // This attempts to evaluate a constant expression, and return
152 // a verinum as a result. If the expression cannot be
153 // evaluated, return 0.
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
154 virtual verinum* eval_const(Design*des, NetScope*sc) const;
d27f260b »
1998-11-11 Check net ranges in declarations.
155
e01358ba »
2011-03-13 Fix for pr3194155.
156 // This method returns true if the expression represents a
157 // structural net that can have multiple drivers. This is
158 // used to test whether an input port connection can be
159 // collapsed to a single wire.
160 virtual bool is_collapsible_net(Design*des, NetScope*scope) const;
161
d27f260b »
1998-11-11 Check net ranges in declarations.
162 // This method returns true if that expression is the same as
163 // this expression. This method is used for comparing
164 // expressions that must be structurally "identical".
165 virtual bool is_the_same(const PExpr*that) const;
10ffaeda »
1999-05-16 Redo constant expression detection to happen
166
c85eff93 »
2008-10-10 The test_width methods scan and mark expressions with type and size.
167 protected:
312b4da4 »
2011-02-26 Expression width rework.
168 unsigned fix_width_(width_mode_t mode);
169
c85eff93 »
2008-10-10 The test_width methods scan and mark expressions with type and size.
170 // The derived class test_width methods should fill these in.
171 ivl_variable_type_t expr_type_;
172 unsigned expr_width_;
312b4da4 »
2011-02-26 Expression width rework.
173 unsigned min_width_;
174 bool signed_flag_;
c85eff93 »
2008-10-10 The test_width methods scan and mark expressions with type and size.
175
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
176 private: // not implemented
177 PExpr(const PExpr&);
178 PExpr& operator= (const PExpr&);
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
179 };
180
181 ostream& operator << (ostream&, const PExpr&);
182
5de9b7c9 »
1999-05-10 Parse and elaborate the concatenate operator
183 class PEConcat : public PExpr {
184
185 public:
cced1e77 »
2010-10-25 Remove some uses of the svector template.
186 PEConcat(const list<PExpr*>&p, PExpr*r =0);
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
187 ~PEConcat();
5de9b7c9 »
1999-05-10 Parse and elaborate the concatenate operator
188
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
189 virtual verinum* eval_const(Design*des, NetScope*sc) const;
5de9b7c9 »
1999-05-10 Parse and elaborate the concatenate operator
190 virtual void dump(ostream&) const;
f6507cba »
2000-12-06 Check lvalue of procedural continuous assign (PR#29)
191
f9559371 »
2010-01-12 Fix for pr2924354.
192 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
193
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
194 virtual bool has_aa_term(Design*des, NetScope*scope) const;
195
a654bdc1 »
2008-10-18 Clean up some handling of test_width for ternary expressions.
196 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
197 width_mode_t&mode);
a654bdc1 »
2008-10-18 Clean up some handling of test_width for ternary expressions.
198
d26ae866 »
2008-03-18 Move implicit net creation from elaboration to elaborate_sig
199 virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
a2c036d5 »
2006-04-28 Allow concatenations as arguments to inout ports.
200 virtual NetNet* elaborate_bi_net(Design*des, NetScope*scope) const;
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
201 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
202 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
203 unsigned flags) const;
8f2d679c »
2004-12-29 Unify elaboration of l-values for all proceedural assignments,
204 virtual NetAssign_* elaborate_lval(Design*des,
205 NetScope*scope,
206 bool is_force) const;
e01358ba »
2011-03-13 Fix for pr3194155.
207 virtual bool is_collapsible_net(Design*des, NetScope*scope) const;
5de9b7c9 »
1999-05-10 Parse and elaborate the concatenate operator
208 private:
a2c036d5 »
2006-04-28 Allow concatenations as arguments to inout ports.
209 NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
210 bool bidirectional_flag) const;
211 private:
cced1e77 »
2010-10-25 Remove some uses of the svector template.
212 vector<PExpr*>parms_;
312b4da4 »
2011-02-26 Expression width rework.
213 std::valarray<width_mode_t>width_modes_;
7ec86757 »
2008-11-18 Elaborate concatenation expression put tested widths to use.
214
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
215 PExpr*repeat_;
312b4da4 »
2011-02-26 Expression width rework.
216 NetScope*tested_scope_;
217 unsigned repeat_count_;
5de9b7c9 »
1999-05-10 Parse and elaborate the concatenate operator
218 };
219
2dd010dc »
2000-04-01 Named events as far as the pform.
220 /*
221 * Event expressions are expressions that can be combined with the
222 * event "or" operator. These include "posedge foo" and similar, and
223 * also include named events. "edge" events are associated with an
224 * expression, whereas named events simply have a name, which
225 * represents an event variable.
226 */
ce497084 »
1999-04-29 Parse OR of event expressions.
227 class PEEvent : public PExpr {
228
229 public:
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
230 enum edge_t {ANYEDGE, POSEDGE, NEGEDGE, POSITIVE};
231
2dd010dc »
2000-04-01 Named events as far as the pform.
232 // Use this constructor to create events based on edges or levels.
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
233 PEEvent(edge_t t, PExpr*e);
2dd010dc »
2000-04-01 Named events as far as the pform.
234
235 ~PEEvent();
ce497084 »
1999-04-29 Parse OR of event expressions.
236
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
237 edge_t type() const;
238 PExpr* expr() const;
e4ae8321 »
2004-10-04 Clean up spurious trailing white space.
239
ce497084 »
1999-04-29 Parse OR of event expressions.
240 virtual void dump(ostream&) const;
241
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
242 virtual bool has_aa_term(Design*des, NetScope*scope) const;
243
ce497084 »
1999-04-29 Parse OR of event expressions.
244 private:
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
245 edge_t type_;
246 PExpr *expr_;
ce497084 »
1999-04-29 Parse OR of event expressions.
247 };
248
084a464c »
2000-12-10 Support decimal constants in behavioral delays.
249 /*
250 * This holds a floating point constant in the source.
251 */
252 class PEFNumber : public PExpr {
253
254 public:
255 explicit PEFNumber(verireal*vp);
256 ~PEFNumber();
257
258 const verireal& value() const;
259
260 /* The eval_const method as applied to a floating point number
261 gets the *integer* value of the number. This accounts for
262 any rounding that is needed to get the value. */
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
263 virtual verinum* eval_const(Design*des, NetScope*sc) const;
084a464c »
2000-12-10 Support decimal constants in behavioral delays.
264
d3f17f27 »
2008-09-25 Handle widths of real value arguments to user functions.
265 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
266 width_mode_t&mode);
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
267 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
268 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
269 unsigned flags) const;
219df169 »
2001-01-14 Generalize the evaluation of floating point delays, and
270
084a464c »
2000-12-10 Support decimal constants in behavioral delays.
271 virtual void dump(ostream&) const;
272
273 private:
274 verireal*value_;
275 };
276
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
277 class PEIdent : public PExpr {
278
279 public:
be671991 »
2009-11-25 Allow connecting module instance using implicit named port connections.
280 explicit PEIdent(perm_string, bool no_implicit_sig=false);
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
281 explicit PEIdent(const pform_name_t&);
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
282 ~PEIdent();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
283
47d65034 »
2008-01-25 Spelling fixes
284 // Add another name to the string of hierarchy that is the
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
285 // current identifier.
286 void append_name(perm_string);
287
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
288 virtual void dump(ostream&) const;
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
289
f9559371 »
2010-01-12 Fix for pr2924354.
290 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
291
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
292 virtual bool has_aa_term(Design*des, NetScope*scope) const;
293
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
294 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
295 width_mode_t&mode);
31bdb87c »
1999-09-15 separate assign lval elaboration for error checking.
296
297 // Identifiers are allowed (with restrictions) is assign l-values.
d26ae866 »
2008-03-18 Move implicit net creation from elaboration to elaborate_sig
298 virtual NetNet* elaborate_lnet(Design*des, NetScope*scope) const;
31bdb87c »
1999-09-15 separate assign lval elaboration for error checking.
299
4a8be3db »
2005-08-06 Implement bi-directional part selects.
300 virtual NetNet* elaborate_bi_net(Design*des, NetScope*scope) const;
301
b6ce313e »
2000-09-09 move lval elaboration to PExpr virtual methods.
302 // Identifiers are also allowed as procedural assignment l-values.
8f2d679c »
2004-12-29 Unify elaboration of l-values for all proceedural assignments,
303 virtual NetAssign_* elaborate_lval(Design*des,
304 NetScope*scope,
305 bool is_force) const;
b6ce313e »
2000-09-09 move lval elaboration to PExpr virtual methods.
306
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
307 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
308 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
309 unsigned flags) const;
31bdb87c »
1999-09-15 separate assign lval elaboration for error checking.
310
3676d664 »
2000-05-16 Module ports are really special PEIdent
311 // Elaborate the PEIdent as a port to a module. This method
312 // only applies to Ident expressions.
313 NetNet* elaborate_port(Design*des, NetScope*sc) const;
314
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
315 verinum* eval_const(Design*des, NetScope*sc) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
316
e01358ba »
2011-03-13 Fix for pr3194155.
317 virtual bool is_collapsible_net(Design*des, NetScope*scope) const;
318
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
319 const pform_name_t& path() const { return path_; }
320
321 private:
322 pform_name_t path_;
be671991 »
2009-11-25 Allow connecting module instance using implicit named port connections.
323 bool no_implicit_sig_;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
324
325 private:
b45834f0 »
2009-01-01 Handle part selects with bad (xz) bits.
326 // Common functions to calculate parts of part/bit
327 // selects. These methods return true if the expressions
328 // elaborate/calculate, or false if there is some sort of
329 // source error.
330
331 // The calculate_parts_ method calculates the range
332 // expressions of a part select for the current object. The
333 // part select expressions are elaborated and evaluated, and
334 // the values written to the msb/lsb arguments. If there are
335 // invalid bits (xz) in either expression, then the defined
336 // flag is set to *false*.
337 bool calculate_parts_(Design*, NetScope*, long&msb, long&lsb, bool&defined) const;
93067149 »
2011-03-27 Rework of constant expression error reporting.
338 NetExpr* calculate_up_do_base_(Design*, NetScope*, bool need_const) const;
7aebff2a »
2008-06-08 Fix up parameter name part select
339 bool calculate_param_range_(Design*, NetScope*,
340 const NetExpr*msb_ex, long&msb,
5a0363eb »
2010-01-09 Fix some constant bit/part select bugs and add warnings.
341 const NetExpr*lsb_ex, long&lsb,
342 long length) const;
7aebff2a »
2008-06-08 Fix up parameter name part select
343
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
344 bool calculate_up_do_width_(Design*, NetScope*, unsigned long&wid) const;
345
346 private:
91d84e7d »
2007-01-16 Major rework of array handling. Memories are replaced with the
347 NetAssign_*elaborate_lval_net_word_(Design*, NetScope*, NetNet*) const;
30d42e28 »
2008-06-14 Allow l-value part select to be out of bounds.
348 bool elaborate_lval_net_bit_(Design*, NetScope*, NetAssign_*) const;
91d84e7d »
2007-01-16 Major rework of array handling. Memories are replaced with the
349 bool elaborate_lval_net_part_(Design*, NetScope*, NetAssign_*) const;
e26b9e72 »
2007-11-07 More array fixes and down indexed part selects can be a lval.
350 bool elaborate_lval_net_idx_(Design*, NetScope*, NetAssign_*,
351 index_component_t::ctype_t) const;
707af782 »
2006-04-16 Fix part selects in l-values.
352
353 private:
6e12c1f2 »
2008-09-20 Elaborate of PGAssign always passes calculated width.
354 NetExpr*elaborate_expr_param_(Design*des,
355 NetScope*scope,
356 const NetExpr*par,
357 NetScope*found,
358 const NetExpr*par_msb,
359 const NetExpr*par_lsb,
93067149 »
2011-03-27 Rework of constant expression error reporting.
360 unsigned expr_wid,
361 unsigned flags) const;
7aebff2a »
2008-06-08 Fix up parameter name part select
362 NetExpr*elaborate_expr_param_part_(Design*des,
363 NetScope*scope,
364 const NetExpr*par,
365 NetScope*found,
366 const NetExpr*par_msb,
312b4da4 »
2011-02-26 Expression width rework.
367 const NetExpr*par_lsb,
368 unsigned expr_wid) const;
6a1235ac »
2008-06-08 Rework parameter indexed part select up.
369 NetExpr*elaborate_expr_param_idx_up_(Design*des,
370 NetScope*scope,
371 const NetExpr*par,
372 NetScope*found,
373 const NetExpr*par_msb,
93067149 »
2011-03-27 Rework of constant expression error reporting.
374 const NetExpr*par_lsb,
375 bool need_const) const;
2b17366a »
2009-08-28 Major rewrite of indexed part selects.
376 NetExpr*elaborate_expr_param_idx_do_(Design*des,
377 NetScope*scope,
378 const NetExpr*par,
379 NetScope*found,
380 const NetExpr*par_msb,
93067149 »
2011-03-27 Rework of constant expression error reporting.
381 const NetExpr*par_lsb,
382 bool need_const) const;
c02b3b8a »
2005-11-10 Reorganize signal part select handling, and add support for
383 NetExpr*elaborate_expr_net(Design*des,
91d84e7d »
2007-01-16 Major rework of array handling. Memories are replaced with the
384 NetScope*scope,
385 NetNet*net,
386 NetScope*found,
312b4da4 »
2011-02-26 Expression width rework.
387 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
388 unsigned flags) const;
91d84e7d »
2007-01-16 Major rework of array handling. Memories are replaced with the
389 NetExpr*elaborate_expr_net_word_(Design*des,
390 NetScope*scope,
391 NetNet*net,
392 NetScope*found,
312b4da4 »
2011-02-26 Expression width rework.
393 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
394 unsigned flags) const;
c02b3b8a »
2005-11-10 Reorganize signal part select handling, and add support for
395 NetExpr*elaborate_expr_net_part_(Design*des,
312b4da4 »
2011-02-26 Expression width rework.
396 NetScope*scope,
397 NetESignal*net,
398 NetScope*found,
399 unsigned expr_wid) const;
c02b3b8a »
2005-11-10 Reorganize signal part select handling, and add support for
400 NetExpr*elaborate_expr_net_idx_up_(Design*des,
312b4da4 »
2011-02-26 Expression width rework.
401 NetScope*scope,
402 NetESignal*net,
93067149 »
2011-03-27 Rework of constant expression error reporting.
403 NetScope*found,
404 bool need_const) const;
c02b3b8a »
2005-11-10 Reorganize signal part select handling, and add support for
405 NetExpr*elaborate_expr_net_idx_do_(Design*des,
312b4da4 »
2011-02-26 Expression width rework.
406 NetScope*scope,
407 NetESignal*net,
93067149 »
2011-03-27 Rework of constant expression error reporting.
408 NetScope*found,
409 bool need_const) const;
c02b3b8a »
2005-11-10 Reorganize signal part select handling, and add support for
410 NetExpr*elaborate_expr_net_bit_(Design*des,
312b4da4 »
2011-02-26 Expression width rework.
411 NetScope*scope,
412 NetESignal*net,
93067149 »
2011-03-27 Rework of constant expression error reporting.
413 NetScope*found,
414 bool need_const) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
415
91a755d0 »
2002-06-04 Add support for memory words in l-value of
416 private:
4a8be3db »
2005-08-06 Implement bi-directional part selects.
417 NetNet* elaborate_lnet_common_(Design*des, NetScope*scope,
418 bool bidirectional_flag) const;
419
9e94afe3 »
2005-01-09 Use PartSelect/PV and VP to handle part selects through ports.
420 bool eval_part_select_(Design*des, NetScope*scope, NetNet*sig,
dfb7bf52 »
2008-05-09 Handle part selects of nets that fall of the ends of the identifier.
421 long&midx, long&lidx) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
422 };
423
424 class PENumber : public PExpr {
425
426 public:
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
427 explicit PENumber(verinum*vp);
428 ~PENumber();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
429
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
430 const verinum& value() const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
431
432 virtual void dump(ostream&) const;
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
433 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
434 width_mode_t&mode);
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
435
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
436 virtual NetEConst*elaborate_expr(Design*des, NetScope*,
93067149 »
2011-03-27 Rework of constant expression error reporting.
437 unsigned expr_wid, unsigned) const;
8f2d679c »
2004-12-29 Unify elaboration of l-values for all proceedural assignments,
438 virtual NetAssign_* elaborate_lval(Design*des,
439 NetScope*scope,
440 bool is_force) const;
3d646aa9 »
2002-03-09 Constant expressions are not l-values for task ports.
441
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
442 virtual verinum* eval_const(Design*des, NetScope*sc) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
443
d27f260b »
1998-11-11 Check net ranges in declarations.
444 virtual bool is_the_same(const PExpr*that) const;
445
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
446 private:
447 verinum*const value_;
448 };
449
03aebd75 »
2001-12-30 Support elaborate_net for PEString objects.
450 /*
451 * This represents a string constant in an expression.
452 *
453 * The s parameter to the PEString constructor is a C string that this
454 * class instance will take for its own. The caller should not delete
455 * the string, the destructor will do it.
456 */
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
457 class PEString : public PExpr {
458
459 public:
03aebd75 »
2001-12-30 Support elaborate_net for PEString objects.
460 explicit PEString(char*s);
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
461 ~PEString();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
462
b1fd927a »
2000-04-12 Named events really should be expressed with PEIdent
463 string value() const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
464 virtual void dump(ostream&) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
465
34b5a31f »
2006-11-10 Add test_width methods for PETernary and PEString.
466 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
467 width_mode_t&mode);
34b5a31f »
2006-11-10 Add test_width methods for PETernary and PEString.
468
6733f762 »
2002-04-13 Detect missing indices to memories (PR#421)
469 virtual NetEConst*elaborate_expr(Design*des, NetScope*,
93067149 »
2011-03-27 Rework of constant expression error reporting.
470 unsigned expr_wid, unsigned) const;
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
471 verinum* eval_const(Design*, NetScope*) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
472
473 private:
03aebd75 »
2001-12-30 Support elaborate_net for PEString objects.
474 char*text_;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
475 };
476
477 class PEUnary : public PExpr {
478
479 public:
056a3f72 »
2000-06-30 Allow unary operators in constant expressions.
480 explicit PEUnary(char op, PExpr*ex);
481 ~PEUnary();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
482
483 virtual void dump(ostream&out) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
484
f9559371 »
2010-01-12 Fix for pr2924354.
485 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
486
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
487 virtual bool has_aa_term(Design*des, NetScope*scope) const;
488
30e6cfce »
2008-08-15 Real valued nets are signed, and pform unary expression have width.
489 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
490 width_mode_t&mode);
30e6cfce »
2008-08-15 Real valued nets are signed, and pform unary expression have width.
491
5cf7355c »
2002-04-14 Precalculate unary - if possible.
492 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
493 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
494 unsigned flags) const;
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
495 virtual verinum* eval_const(Design*des, NetScope*sc) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
496
497 private:
312b4da4 »
2011-02-26 Expression width rework.
498 NetExpr* elaborate_expr_bits_(NetExpr*operand, unsigned expr_wid) const;
55b8ff44 »
2008-10-12 Pad the subexpression of unary not.
499
500 private:
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
501 char op_;
502 PExpr*expr_;
503 };
504
505 class PEBinary : public PExpr {
506
507 public:
9572ddd7 »
2001-11-06 Support more real arithmetic in delay constants.
508 explicit PEBinary(char op, PExpr*l, PExpr*r);
509 ~PEBinary();
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
510
511 virtual void dump(ostream&out) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
512
f9559371 »
2010-01-12 Fix for pr2924354.
513 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
514
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
515 virtual bool has_aa_term(Design*des, NetScope*scope) const;
516
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
517 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
518 width_mode_t&mode);
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
519
a12a6d92 »
2008-04-22 Fix left shift of unsized constants in sef-determined context.
520 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
521 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
522 unsigned flags) const;
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
523 virtual verinum* eval_const(Design*des, NetScope*sc) const;
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
524
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
525 protected:
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
526 char op_;
527 PExpr*left_;
528 PExpr*right_;
e1bbbe56 »
1999-10-31 Include subtraction in LPM_ADD_SUB device.
529
d1ce6d25 »
2008-12-18 Fix the signed-ness calculations of +- in parameter expressions.
530 NetExpr*elaborate_expr_base_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
531 unsigned expr_wid) const;
d1ce6d25 »
2008-12-18 Fix the signed-ness calculations of +- in parameter expressions.
532 NetExpr*elaborate_eval_expr_base_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
533 unsigned expr_wid) const;
71a506a2 »
2000-03-12 Binary and unary operators in parameter expressions.
534
b89ab1f2 »
2010-12-05 Cleanup after parameter expression rework.
535 NetExpr*elaborate_expr_base_bits_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
536 unsigned expr_wid) const;
d1ce6d25 »
2008-12-18 Fix the signed-ness calculations of +- in parameter expressions.
537 NetExpr*elaborate_expr_base_div_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
538 unsigned expr_wid) const;
d1ce6d25 »
2008-12-18 Fix the signed-ness calculations of +- in parameter expressions.
539 NetExpr*elaborate_expr_base_mult_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
540 unsigned expr_wid) const;
d1ce6d25 »
2008-12-18 Fix the signed-ness calculations of +- in parameter expressions.
541 NetExpr*elaborate_expr_base_add_(Design*, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
542 unsigned expr_wid) const;
e18eb32d »
2008-08-20 Process shift by constant amounts early in expression elaboration.
543
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
544 };
545
546 /*
47d65034 »
2008-01-25 Spelling fixes
547 * Here are a few specialized classes for handling specific binary
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
548 * operators.
549 */
550 class PEBComp : public PEBinary {
551
552 public:
553 explicit PEBComp(char op, PExpr*l, PExpr*r);
554 ~PEBComp();
555
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
556 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
557 width_mode_t&mode);
ea057a75 »
2008-10-29 Elaborate logical and/or to account for special properties.
558
559 NetExpr* elaborate_expr(Design*des, NetScope*scope,
93067149 »
2011-03-27 Rework of constant expression error reporting.
560 unsigned expr_wid, unsigned flags) const;
c4098cff »
2010-04-27 Account for unsized arguments to comparisons.
561
562 private:
312b4da4 »
2011-02-26 Expression width rework.
563 unsigned l_width_;
564 unsigned r_width_;
ea057a75 »
2008-10-29 Elaborate logical and/or to account for special properties.
565 };
566
567 /*
568 * This derived class is for handling logical expressions: && and ||.
569 */
570 class PEBLogic : public PEBinary {
571
572 public:
573 explicit PEBLogic(char op, PExpr*l, PExpr*r);
574 ~PEBLogic();
575
576 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
577 width_mode_t&mode);
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
578
a12a6d92 »
2008-04-22 Fix left shift of unsized constants in sef-determined context.
579 NetExpr* elaborate_expr(Design*des, NetScope*scope,
93067149 »
2011-03-27 Rework of constant expression error reporting.
580 unsigned expr_wid, unsigned flags) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
581 };
582
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
583 /*
584 * A couple of the binary operands have a special sub-expression rule
585 * where the expression width is carried entirely by the left
586 * expression, and the right operand is self-determined.
587 */
588 class PEBLeftWidth : public PEBinary {
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
589
590 public:
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
591 explicit PEBLeftWidth(char op, PExpr*l, PExpr*r);
592 ~PEBLeftWidth() =0;
593
594 virtual NetExpr*elaborate_expr_leaf(Design*des, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
595 unsigned expr_wid) const =0;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
596
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
597 protected:
c339dc4b »
2006-11-04 Remove last bits of relax_width methods, and use test_width
598 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
599 width_mode_t&mode);
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
600
601 virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
602 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
603 unsigned flags) const;
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
604 };
605
606 class PEBPower : public PEBLeftWidth {
607
608 public:
609 explicit PEBPower(char op, PExpr*l, PExpr*r);
610 ~PEBPower();
611
612 NetExpr*elaborate_expr_leaf(Design*des, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
613 unsigned expr_wid) const;
82143edf »
2008-11-28 Rework shift and power PExpr nodes for their special needs.
614 };
615
616 class PEBShift : public PEBLeftWidth {
617
618 public:
619 explicit PEBShift(char op, PExpr*l, PExpr*r);
620 ~PEBShift();
621
622 NetExpr*elaborate_expr_leaf(Design*des, NetExpr*lp, NetExpr*rp,
312b4da4 »
2011-02-26 Expression width rework.
623 unsigned expr_wid) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
624 };
625
626 /*
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
627 * This class supports the ternary (?:) operator. The operator takes
628 * three expressions, the test, the true result and the false result.
629 */
630 class PETernary : public PExpr {
631
632 public:
a5921cea »
1999-07-17 netlist support for ternary operator.
633 explicit PETernary(PExpr*e, PExpr*t, PExpr*f);
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
634 ~PETernary();
635
a5921cea »
1999-07-17 netlist support for ternary operator.
636 virtual void dump(ostream&out) const;
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
637
f9559371 »
2010-01-12 Fix for pr2924354.
638 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
639
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
640 virtual bool has_aa_term(Design*des, NetScope*scope) const;
641
34b5a31f »
2006-11-10 Add test_width methods for PETernary and PEString.
642 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
643 width_mode_t&mode);
34b5a31f »
2006-11-10 Add test_width methods for PETernary and PEString.
644
65c3bc91 »
2008-08-23 Short-circuit elaboration of ternary expressions.
645 virtual NetExpr*elaborate_expr(Design*des, NetScope*,
312b4da4 »
2011-02-26 Expression width rework.
646 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
647 unsigned flags) const;
8fd42fbf »
2007-06-04 Build errors in picky GCC compilers.
648 virtual verinum* eval_const(Design*des, NetScope*sc) const;
a5921cea »
1999-07-17 netlist support for ternary operator.
649
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
650 private:
707a3ebe »
2009-01-05 Handle ternary expressions with mixed argument types.
651 NetExpr* elab_and_eval_alternative_(Design*des, NetScope*scope,
93067149 »
2011-03-27 Rework of constant expression error reporting.
652 PExpr*expr, unsigned expr_wid,
653 unsigned flags) const;
707a3ebe »
2009-01-05 Handle ternary expressions with mixed argument types.
654
655 private:
7c2cf8b2 »
1999-06-10 Add support for the Ternary operator,
656 PExpr*expr_;
657 PExpr*tru_;
658 PExpr*fal_;
659 };
660
bb386536 »
1999-09-25 Parse system function calls.
661 /*
fbe475ef »
2000-05-04 Add infrastructure for system functions, move
662 * This class represents a parsed call to a function, including calls
b7c2bd4f »
2002-03-09 Add the NetUserFunc netlist node.
663 * to system functions. The parameters in the parms list are the
664 * expressions that are passed as input to the ports of the function.
bb386536 »
1999-09-25 Parse system function calls.
665 */
e0a988bf »
1999-07-31 Add functions up to elaboration (Ed Carter)
666 class PECallFunction : public PExpr {
bb386536 »
1999-09-25 Parse system function calls.
667 public:
25a27f9d »
2008-07-27 Parse contribution statements as far as pform.
668 explicit PECallFunction(const pform_name_t&n, const vector<PExpr *> &parms);
47d65034 »
2008-01-25 Spelling fixes
669 // Call of system function (name is not hierarchical)
25a27f9d »
2008-07-27 Parse contribution statements as far as pform.
670 explicit PECallFunction(perm_string n, const vector<PExpr *> &parms);
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
671 explicit PECallFunction(perm_string n);
25a27f9d »
2008-07-27 Parse contribution statements as far as pform.
672
673 // svector versions. Should be removed!
cced1e77 »
2010-10-25 Remove some uses of the svector template.
674 explicit PECallFunction(const pform_name_t&n, const list<PExpr *> &parms);
675 explicit PECallFunction(perm_string n, const list<PExpr *> &parms);
25a27f9d »
2008-07-27 Parse contribution statements as far as pform.
676
bb386536 »
1999-09-25 Parse system function calls.
677 ~PECallFunction();
e0a988bf »
1999-07-31 Add functions up to elaboration (Ed Carter)
678
679 virtual void dump(ostream &) const;
23026932 »
2006-10-30 Expression widths with unsized literals are pseudo-infinite width.
680
f9559371 »
2010-01-12 Fix for pr2924354.
681 virtual void declare_implicit_nets(LexicalScope*scope, NetNet::Type type);
682
04377151 »
2008-11-09 Checks for illegal use of automatically allocated variables.
683 virtual bool has_aa_term(Design*des, NetScope*scope) const;
684
685 virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
686 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
687 unsigned flags) const;
e0a988bf »
1999-07-31 Add functions up to elaboration (Ed Carter)
688
d5874992 »
2007-10-01 test_width method for functions in expressions
689 virtual unsigned test_width(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
690 width_mode_t&mode);
d5874992 »
2007-10-01 test_width method for functions in expressions
691
bb386536 »
1999-09-25 Parse system function calls.
692 private:
ddd36ecb »
2007-05-24 Rework the heirarchical identifier parse syntax and pform
693 pform_name_t path_;
25a27f9d »
2008-07-27 Parse contribution statements as far as pform.
694 vector<PExpr *> parms_;
bb386536 »
1999-09-25 Parse system function calls.
695
b7c2bd4f »
2002-03-09 Add the NetUserFunc netlist node.
696 bool check_call_matches_definition_(Design*des, NetScope*dscope) const;
697
312b4da4 »
2011-02-26 Expression width rework.
698 NetExpr* cast_to_width_(NetExpr*expr, unsigned wid) const;
14b2037c »
2010-01-17 Fix for pr2922063.
699
312b4da4 »
2011-02-26 Expression width rework.
700 NetExpr* elaborate_sfunc_(Design*des, NetScope*scope,
93067149 »
2011-03-27 Rework of constant expression error reporting.
701 unsigned expr_wid,
702 unsigned flags) const;
312b4da4 »
2011-02-26 Expression width rework.
703 NetExpr* elaborate_access_func_(Design*des, NetScope*scope, ivl_nature_t,
704 unsigned expr_wid) const;
d5874992 »
2007-10-01 test_width method for functions in expressions
705 unsigned test_width_sfunc_(Design*des, NetScope*scope,
312b4da4 »
2011-02-26 Expression width rework.
706 width_mode_t&mode);
707 };
708
709 /*
710 * This class is used for error recovery. All methods do nothing and return
711 * null or default values.
712 */
713 class PEVoid : public PExpr {
714
715 public:
716 explicit PEVoid();
717 ~PEVoid();
718
719 virtual NetExpr*elaborate_expr(Design*des, NetScope*scope,
720 unsigned expr_wid,
93067149 »
2011-03-27 Rework of constant expression error reporting.
721 unsigned flags) const;
e0a988bf »
1999-07-31 Add functions up to elaboration (Ed Carter)
722 };
723
3fb7a053 »
1998-11-03 Introduce verilog to CVS.
724 #endif
Something went wrong with that request. Please try again.