Skip to content
Newer
Older
100644 442 lines (371 sloc) 14.5 KB
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
1 #ifndef __pform_H
2 #define __pform_H
3 /*
eb81d2f @caryr Fix some bugs in task integer/real arguments.
caryr authored Jan 26, 2011
4 * Copyright (c) 1998-2011 Stephen Williams (steve@icarus.com)
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
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 "netlist.h"
ab6c8cb Parser and pform use hierarchical names as hname_t
steve authored Dec 3, 2001
23 # include "HName.h"
2de887c Support named parameter override lists.
steve authored Jan 9, 2000
24 # include "named.h"
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
25 # include "Module.h"
26 # include "Statement.h"
03e306c @steveicarus Infrastructure for parsing analog process statements.
steveicarus authored Jul 27, 2008
27 # include "AStatement.h"
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
28 # include "PGate.h"
29 # include "PExpr.h"
3ff6912 Elaborate user defined tasks.
steve authored Jul 3, 1999
30 # include "PTask.h"
91aad30 Parse UDP primitives all the way to pform.
steve authored Nov 25, 1998
31 # include "PUdp.h"
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
32 # include "PWire.h"
33 # include "verinum.h"
7166aea @steveicarus Attach natures to disciplines
steveicarus authored May 11, 2008
34 # include "discipline.h"
28e0616 Use standard name for iostream.
steve authored Jun 6, 2002
35 # include <iostream>
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
36 # include <string>
37 # include <list>
eb4ed82 @steveicarus Finish up parser code for enum types
steveicarus authored Oct 24, 2010
38 # include <memory>
1993bf6 @caryr Remove malloc.h support and for C++ files use <c...> include files.
caryr authored May 31, 2010
39 # include <cstdio>
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
40
41 /*
42 * These classes implement the parsed form (P-form for short) of the
d9ac146 @ldoolitt Spelling fixes
ldoolitt authored Jan 29, 2008
43 * original Verilog source. the parser generates the pform for the
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
44 * convenience of later processing steps.
45 */
46
47
48 /*
49 * Wire objects represent the named wires (of various flavor) declared
50 * in the source.
51 *
52 * Gate objects are the functional modules that are connected together
53 * by wires.
54 *
55 * Wires and gates, connected by joints, represent a netlist. The
56 * netlist is therefore a representation of the desired circuit.
57 */
58 class PGate;
59 class PExpr;
0edb5a7 Basic support for specify timing.
steve authored Sep 23, 2006
60 class PSpecPath;
f3a91a1 Line information with nets.
steve authored Jun 2, 1999
61 struct vlltype;
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
62
63 /*
30a8173 Introduce min:typ:max support.
steve authored Jul 29, 2000
64 * The min:typ:max expression s selected at parse time using the
e941e7e Spelling fixes.
steve authored Jan 30, 2003
65 * enumeration. When the compiler makes a choice, it also prints a
30a8173 Introduce min:typ:max support.
steve authored Jul 29, 2000
66 * warning if min_typ_max_warn > 0.
67 */
68 extern enum MIN_TYP_MAX { MIN, TYP, MAX } min_typ_max_flag;
69 extern unsigned min_typ_max_warn;
70 PExpr* pform_select_mtm_expr(PExpr*min, PExpr*typ, PExpr*max);
71
72 /*
f9c1c02 Add support for -v flag in command file.
steve authored Apr 19, 2007
73 * This flag is true if the lexor thinks we are in a library source
74 * file.
75 */
76 extern bool pform_library_flag;
77
78 /*
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
79 * These type are lexical types -- that is, types that are used as
80 * lexical values to decorate the parse tree during parsing. They are
81 * not in any way preserved once parsing is done.
82 */
83
3589391 module parameter bind by name.
steve authored May 29, 1999
84 /* This is information about port name information for named port
85 connections. */
2de887c Support named parameter override lists.
steve authored Jan 9, 2000
86
87
88 struct parmvalue_t {
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 25, 2010
89 list<PExpr*>*by_order;
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 12, 2010
90 list<named_pexpr_t>*by_name;
3589391 module parameter bind by name.
steve authored May 29, 1999
91 };
92
79f8b8f @steveicarus Remove Link::strength_t and PGate::strength_t types.
steveicarus authored Mar 16, 2010
93 struct str_pair_t { ivl_drive_t str0, str1; };
ca2fd41 Carry assignment strength to pform.
steve authored May 6, 2000
94
eb4ed82 @steveicarus Finish up parser code for enum types
steveicarus authored Oct 24, 2010
95
65f835f Properly parse net_decl assignments with delays.
steve authored Nov 29, 2001
96 struct net_decl_assign_t {
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 24, 2008
97 perm_string name;
65f835f Properly parse net_decl assignments with delays.
steve authored Nov 29, 2001
98 PExpr*expr;
99 struct net_decl_assign_t*next;
100 };
101
3589391 module parameter bind by name.
steve authored May 29, 1999
102 /* The lgate is gate instantiation information. */
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
103 struct lgate {
a568e52 Get rid of list<lgate> types.
steve authored May 6, 1999
104 lgate(int =0)
86653dd @caryr Remove some cppcheck warnings.
caryr authored Jul 23, 2010
105 : parms(0), parms_by_name(0), file(NULL), lineno(0)
e5f5f41 Elaborate gate ranges.
steve authored Feb 15, 1999
106 { range[0] = 0;
107 range[1] = 0;
108 }
fb439c7 Add the LineInfo class to carry the source file
steve authored Jan 25, 1999
109
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
110 string name;
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
111 list<PExpr*>*parms;
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
112 list<named_pexpr_t>*parms_by_name;
fb439c7 Add the LineInfo class to carry the source file
steve authored Jan 25, 1999
113
e5f5f41 Elaborate gate ranges.
steve authored Feb 15, 1999
114 PExpr*range[2];
115
ef49fc1 Change LineInfo to store const C strings.
steve authored Nov 30, 2000
116 const char* file;
fb439c7 Add the LineInfo class to carry the source file
steve authored Jan 25, 1999
117 unsigned lineno;
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
118 };
119
6f00293 @steveicarus Parse attributes on statements within event statements.
steveicarus authored Sep 4, 2008
120 /* Use this function to transform the parted form of the attribute
121 list to the attribute map that is used later. */
122 extern void pform_bind_attributes(map<perm_string,PExpr*>&attributes,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
123 list<named_pexpr_t>*attr,
124 bool keep_attr =false);
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
125
9949040 Add support for the default_nettype directive.
steve authored Jun 13, 2004
126 /* The lexor calls this function to change the default nettype. */
127 extern void pform_set_default_nettype(NetNet::Type net,
128 const char*file,
129 unsigned lineno);
130
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
131 /*
93b400c @steveicarus Attach disciplines to wires
steveicarus authored May 11, 2008
132 * Look for the given wire in the current lexical scope. If the wire
133 * (including variables of any type) cannot be found in the current
134 * scope, then return 0.
135 */
136 extern PWire* pform_get_wire_in_scope(perm_string name);
137
138 /*
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
139 * The parser uses startmodule and endmodule together to build up a
140 * module as it parses it. The startmodule tells the pform code that a
141 * module has been noticed in the source file and the following events
142 * are to apply to the scope of that module. The endmodule causes the
143 * pform to close up and finish the named module.
144 */
ccf4d4d Module attributes from the parser
steve authored Jun 20, 2003
145 extern void pform_startmodule(const char*, const char*file, unsigned lineno,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
146 list<named_pexpr_t>*attr);
9dce649 @caryr Fix up original SV timeunit/timeprecision patch.
caryr authored Jul 10, 2009
147 extern void pform_check_timeunit_prec();
ddb2c60 @steveicarus Remove svector class from Module.h
steveicarus authored Nov 2, 2008
148 extern void pform_module_set_ports(vector<Module::port_t*>*);
74c219f Add ranges and signed to port list declarations.
steve authored May 20, 2002
149
150 /* This function is used to support the port definition in a
151 port_definition_list. In this case, we have everything needed to
152 define the port, all in one place. */
153 extern void pform_module_define_port(const struct vlltype&li,
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
154 perm_string name,
74c219f Add ranges and signed to port list declarations.
steve authored May 20, 2002
155 NetNet::PortType,
156 NetNet::Type type,
70fc742 @steveicarus Add support for primitive types of ports.
steveicarus authored Mar 11, 2010
157 ivl_variable_type_t data_type,
74c219f Add ranges and signed to port list declarations.
steve authored May 20, 2002
158 bool signed_flag,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
159 list<PExpr*>*range,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
160 list<named_pexpr_t>*attr);
74c219f Add ranges and signed to port list declarations.
steve authored May 20, 2002
161
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
162 extern Module::port_t* pform_module_port_reference(perm_string name,
bf10c57 Parse port_declaration_lists from the 2001 Standard.
steve authored May 19, 2002
163 const char*file,
164 unsigned lineno);
b7264d2 @caryr Fix some definition/implementation name differences.
caryr authored Jun 1, 2010
165 extern void pform_endmodule(const char*, bool inside_celldefine,
166 Module::UCDriveType uc_drive_def);
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
167
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
168 extern void pform_make_udp(perm_string name, list<perm_string>*parms,
29da349 parse more verilog.
steve authored Jun 12, 1999
169 svector<PWire*>*decl, list<string>*table,
467ecf5 Error messages for missing UDP port declarations.
steve authored Oct 21, 2001
170 Statement*init,
171 const char*file, unsigned lineno);
91aad30 Parse UDP primitives all the way to pform.
steve authored Nov 25, 1998
172
413932e Verilog2001 new style port declartions for primitives.
steve authored Mar 8, 2004
173 extern void pform_make_udp(perm_string name,
174 bool sync_flag, perm_string out_name,
175 PExpr*sync_init,
176 list<perm_string>*parms,
177 list<string>*table,
178 const char*file, unsigned lineno);
179
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
180 /*
ab6c8cb Parser and pform use hierarchical names as hname_t
steve authored Dec 3, 2001
181 * Enter/exit name scopes. The push_scope function pushes the scope
182 * name string onto the scope hierarchy. The pop pulls it off and
183 * deletes it. Thus, the string pushed must be allocated.
11b2b17 Handle expression widths for EEE and NEE operators,
steve authored Jun 24, 1999
184 */
185 extern void pform_pop_scope();
186
192522b @caryr Check for name space collisions.
caryr authored Apr 24, 2009
187 extern PTask*pform_push_task_scope(const struct vlltype&loc, char*name,
188 bool is_auto);
189 extern PFunction*pform_push_function_scope(const struct vlltype&loc, char*name,
190 bool is_auto);
b0e4a68 @steveicarus Objects of lexical scope use PScope base class.
steveicarus authored Feb 15, 2008
191 extern PBlock*pform_push_block_scope(char*name, PBlock::BL_TYPE tt);
192
03e306c @steveicarus Infrastructure for parsing analog process statements.
steveicarus authored Jul 27, 2008
193 extern void pform_put_behavior_in_scope(AProcess*proc);
561a268 Break sized constants into a size token
steve authored Apr 14, 2003
194
195 extern verinum* pform_verinum_with_size(verinum*s, verinum*val,
4f8b91e @caryr Add file and line information for parameters, etc.
caryr authored May 5, 2008
196 const char*file, unsigned lineno);
561a268 Break sized constants into a size token
steve authored Apr 14, 2003
197
11b2b17 Handle expression widths for EEE and NEE operators,
steve authored Jun 24, 1999
198 /*
f001d00 Add support for generate loops w/ wires and gates.
steve authored Apr 10, 2006
199 * This function takes the list of names as new genvars to declare in
da010db @martinwhitaker Fix for pr2842185 and for genvar scopes.
martinwhitaker authored Aug 22, 2009
200 * the current module or generate scope.
f001d00 Add support for generate loops w/ wires and gates.
steve authored Apr 10, 2006
201 */
4f8b91e @caryr Add file and line information for parameters, etc.
caryr authored May 6, 2008
202 extern void pform_genvars(const struct vlltype&li, list<perm_string>*names);
f001d00 Add support for generate loops w/ wires and gates.
steve authored Apr 10, 2006
203
204 extern void pform_start_generate_for(const struct vlltype&li,
205 char*ident1,
206 PExpr*init,
207 PExpr*test,
208 char*ident2,
209 PExpr*next);
396ffd1 @steveicarus Add support for conditional generate. In the process, fix bugs
steveicarus authored Jun 21, 2007
210 extern void pform_start_generate_if(const struct vlltype&li, PExpr*test);
211 extern void pform_start_generate_else(const struct vlltype&li);
bc1d3eb @steveicarus Add support for generate case
steveicarus authored Feb 9, 2008
212 extern void pform_start_generate_case(const struct vlltype&lp, PExpr*test);
407ce5e @caryr Add support for the 1364-2001 generate of a named block.
caryr authored Nov 14, 2008
213 extern void pform_start_generate_nblock(const struct vlltype&lp, char*name);
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
214 extern void pform_generate_case_item(const struct vlltype&lp, list<PExpr*>*test);
f001d00 Add support for generate loops w/ wires and gates.
steve authored Apr 10, 2006
215 extern void pform_generate_block_name(char*name);
216 extern void pform_endgenerate();
217
47e68e2 @steveicarus Detect generate regions within generate schemes.
steveicarus authored Mar 11, 2010
218 /*
219 * This function returns the lexically containing generate scheme, if
220 * there is one. The parser may use this to check if we are within a
221 * generate scheme.
222 */
223 extern PGenerate* pform_parent_generate(void);
f001d00 Add support for generate loops w/ wires and gates.
steve authored Apr 10, 2006
224
225 /*
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
226 * The makewire functions announce to the pform code new wires. These
227 * go into a module that is currently opened.
228 */
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
229 extern void pform_makewire(const struct vlltype&li, perm_string name,
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
230 NetNet::Type type,
231 NetNet::PortType pt,
232 ivl_variable_type_t,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
233 list<named_pexpr_t>*attr);
74c219f Add ranges and signed to port list declarations.
steve authored May 20, 2002
234
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
235 /* This form handles simple declarations */
88c8547 Remove C++ string from variable lists.
steve authored Oct 31, 2000
236 extern void pform_makewire(const struct vlltype&li,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
237 list<PExpr*>*range,
9adbdcb Add support for signed ports and nets.
steve authored Feb 2, 2003
238 bool signed_flag,
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
239 list<perm_string>*names,
700887d Verilog 2001 attriubtes on nets/wires.
steve authored May 24, 2002
240 NetNet::Type type,
cb0a9b2 More 2001 port declaration support.
steve authored Apr 28, 2003
241 NetNet::PortType,
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
242 ivl_variable_type_t,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
243 list<named_pexpr_t>*attr,
b69c4c9 @caryr Fix range handling/checking and add a flag to allow deprecated port s…
caryr authored Aug 21, 2007
244 PWSRType rt = SR_NET);
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
245
246 /* This form handles assignment declarations. */
65f835f Properly parse net_decl assignments with delays.
steve authored Nov 29, 2001
247 extern void pform_makewire(const struct vlltype&li,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
248 list<PExpr*>*range,
9adbdcb Add support for signed ports and nets.
steve authored Feb 2, 2003
249 bool signed_flag,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
250 list<PExpr*>*delay,
361d4f2 Drive strengths for continuous assignments.
steve authored Jan 12, 2002
251 str_pair_t str,
65f835f Properly parse net_decl assignments with delays.
steve authored Nov 29, 2001
252 net_decl_assign_t*assign_list,
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
253 NetNet::Type type,
254 ivl_variable_type_t);
255
6d0edcf Support reg initial assignment syntax.
steve authored Dec 30, 1999
256 extern void pform_make_reginit(const struct vlltype&li,
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
257 perm_string name, PExpr*expr);
bf10c57 Parse port_declaration_lists from the 2001 Standard.
steve authored May 19, 2002
258
259 /* Look up the names of the wires, and set the port type,
260 i.e. input, output or inout. If the wire does not exist, create
261 it. The second form takes a single name. */
4d0b840 Coerse input to inout when assigned to.
steve authored Nov 10, 2001
262 extern void pform_set_port_type(const struct vlltype&li,
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
263 list<perm_string>*names,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
264 list<PExpr*>*range,
9adbdcb Add support for signed ports and nets.
steve authored Feb 2, 2003
265 bool signed_flag,
88c8547 Remove C++ string from variable lists.
steve authored Oct 31, 2000
266 NetNet::PortType);
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
267 extern void pform_set_port_type(perm_string nm, NetNet::PortType pt,
bf10c57 Parse port_declaration_lists from the 2001 Standard.
steve authored May 19, 2002
268 const char*file, unsigned lineno);
269
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
270 extern void pform_set_net_range(list<perm_string>*names,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
271 list<PExpr*>*,
75ad905 Generalize signals to carry types.
steve authored Jul 7, 2005
272 bool signed_flag,
b69c4c9 @caryr Fix range handling/checking and add a flag to allow deprecated port s…
caryr authored Aug 22, 2007
273 ivl_variable_type_t,
274 PWSRType rt = SR_NET);
8e704cb @steveicarus Rework handling of lexical scope
steveicarus authored Feb 25, 2008
275 extern void pform_set_reg_idx(perm_string name, PExpr*l, PExpr*r);
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
276 extern void pform_set_reg_integer(list<perm_string>*names);
277 extern void pform_set_reg_time(list<perm_string>*names);
e6c0629 Add language support for Verilog-2001 attribute
steve authored May 23, 2002
278
e03ff76 @steveicarus Parse support for SystemVerilog atom2 types.
steveicarus authored Oct 2, 2010
279 extern void pform_set_integer_2atom(uint64_t width, bool signed_flag, list<perm_string>*names);
280
eb4ed82 @steveicarus Finish up parser code for enum types
steveicarus authored Oct 24, 2010
281 extern void pform_set_enum(const struct vlltype&li, enum_type_t*enum_type, list<perm_string>*names);
282
e6c0629 Add language support for Verilog-2001 attribute
steve authored May 23, 2002
283 /* pform_set_attrib and pform_set_type_attrib exist to support the
284 $attribute syntax, which can only set string values to
285 attributes. The functions keep the value strings that are
286 passed in. */
177b6ff Addtrbute keys are perm_strings.
steve authored Feb 20, 2004
287 extern void pform_set_attrib(perm_string name, perm_string key,
e6c0629 Add language support for Verilog-2001 attribute
steve authored May 23, 2002
288 char*value);
27af95d Use perm_strings for named langiage items.
steve authored Feb 18, 2004
289 extern void pform_set_type_attrib(perm_string name, const string&key,
e6c0629 Add language support for Verilog-2001 attribute
steve authored May 23, 2002
290 char*value);
291
a4973c2 Support parameter, localparam, and event declarations in any scope.
Martin Whitaker authored Sep 17, 2008
292 extern LexicalScope::range_t* pform_parameter_value_range(bool exclude_flag,
2172c8a @steveicarus Parse parameter value ranges into pform.
steveicarus authored May 12, 2008
293 bool low_open, PExpr*low_expr,
294 bool hig_open, PExpr*hig_expr);
295
296 extern void pform_set_parameter(const struct vlltype&loc,
297 perm_string name,
c76e88c @steveicarus Add support for explicit parameter types, including real.
steveicarus authored May 17, 2008
298 ivl_variable_type_t type,
7e1e44e Properly cast signedness of parameters with ranges.
steve authored Sep 1, 2002
299 bool signed_flag,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
300 list<PExpr*>*range,
a4973c2 Support parameter, localparam, and event declarations in any scope.
Martin Whitaker authored Sep 17, 2008
301 PExpr*expr, LexicalScope::range_t*value_range);
2172c8a @steveicarus Parse parameter value ranges into pform.
steveicarus authored May 13, 2008
302 extern void pform_set_localparam(const struct vlltype&loc,
303 perm_string name,
c76e88c @steveicarus Add support for explicit parameter types, including real.
steveicarus authored May 17, 2008
304 ivl_variable_type_t type,
4f8b91e @caryr Add file and line information for parameters, etc.
caryr authored May 6, 2008
305 bool signed_flag,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
306 list<PExpr*>*range,
2172c8a @steveicarus Parse parameter value ranges into pform.
steveicarus authored May 13, 2008
307 PExpr*expr);
ddd36ec Rework the heirarchical identifier parse syntax and pform
steve authored May 24, 2007
308 extern void pform_set_defparam(const pform_name_t&name, PExpr*expr);
bfad382 Carry Verilog 2001 attributes with processes,
steve authored May 26, 2002
309
310 /*
e580304 specparams as far as pform.
steve authored Feb 27, 2003
311 * Functions related to specify blocks.
312 */
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
313 extern void pform_set_specparam(perm_string name, PExpr*expr);
0edb5a7 Basic support for specify timing.
steve authored Sep 23, 2006
314
315 extern PSpecPath*pform_make_specify_path(const struct vlltype&li,
316 list<perm_string>*src, char pol,
317 bool full_flag, list<perm_string>*dst);
c1c2381 Parse all specify paths to pform.
steve authored Feb 12, 2007
318 extern PSpecPath*pform_make_specify_edge_path(const struct vlltype&li,
f621448 Parse edge sensitive paths without edge specifier.
steve authored Apr 13, 2007
319 int edge_flag, /*posedge==true */
c1c2381 Parse all specify paths to pform.
steve authored Feb 12, 2007
320 list<perm_string>*src, char pol,
321 bool full_flag, list<perm_string>*dst,
322 PExpr*data_source_expression);
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
323 extern PSpecPath*pform_assign_path_delay(PSpecPath*obj, list<PExpr*>*delays);
c1c2381 Parse all specify paths to pform.
steve authored Feb 12, 2007
324
0edb5a7 Basic support for specify timing.
steve authored Sep 23, 2006
325 extern void pform_module_specify_path(PSpecPath*obj);
e580304 specparams as far as pform.
steve authored Feb 27, 2003
326
327 /*
bfad382 Carry Verilog 2001 attributes with processes,
steve authored May 26, 2002
328 * pform_make_behavior creates processes that are declared with always
329 * or initial items.
330 */
5aa810d @steveicarus Infrastructure for elaborating analog statements.
steveicarus authored Oct 21, 2008
331 extern PProcess* pform_make_behavior(ivl_process_type_t, Statement*,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
332 list<named_pexpr_t>*attr);
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
333
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
334 extern svector<PWire*>* pform_make_udp_input_ports(list<perm_string>*);
91aad30 Parse UDP primitives all the way to pform.
steve authored Nov 25, 1998
335
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
336 extern void pform_make_events(list<perm_string>*names,
ef49fc1 Change LineInfo to store const C strings.
steve authored Nov 30, 2000
337 const char*file, unsigned lineno);
46253ed Rework expression parsing and elaboration to
steve authored Jan 26, 2003
338 /*
339 * Make real datum objects.
340 */
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
341 extern void pform_make_reals(list<perm_string>*names,
46253ed Rework expression parsing and elaboration to
steve authored Jan 26, 2003
342 const char*file, unsigned lineno);
2dd010d Named events as far as the pform.
steve authored Apr 1, 2000
343
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
344 /*
345 * The makegate function creates a new gate (which need not have a
346 * name) and connects it to the specified wires.
347 */
348 extern void pform_makegates(PGBuiltin::Type type,
de1a7a0 Deliver gate output strengths to the netlist.
steve authored May 8, 2000
349 struct str_pair_t str,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
350 list<PExpr*>*delay,
e6c0629 Add language support for Verilog-2001 attribute
steve authored May 23, 2002
351 svector<lgate>*gates,
27dfdf9 @steveicarus Enumeration element values can be expressions
steveicarus authored Nov 13, 2010
352 list<named_pexpr_t>*attr);
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
353
27af95d Use perm_strings for named langiage items.
steve authored Feb 18, 2004
354 extern void pform_make_modgates(perm_string type,
2de887c Support named parameter override lists.
steve authored Jan 9, 2000
355 struct parmvalue_t*overrides,
9eae940 Parameter overrides support from Peter Monta
steve authored Aug 23, 1999
356 svector<lgate>*gates);
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
357
358 /* Make a continuous assignment node, with optional bit- or part- select. */
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
359 extern void pform_make_pgassign_list(list<PExpr*>*alist,
360 list<PExpr*>*del,
ca2fd41 Carry assignment strength to pform.
steve authored May 6, 2000
361 struct str_pair_t str,
ef49fc1 Change LineInfo to store const C strings.
steve authored Nov 30, 2000
362 const char* fn, unsigned lineno);
93a77a2 Elaborate task input ports.
steve authored Jul 24, 1999
363
364 /* Given a port type and a list of names, make a list of wires that
365 can be used as task port information. */
366 extern svector<PWire*>*pform_make_task_ports(NetNet::PortType pt,
77a0d7f task/function ports can have types.
steve authored Mar 30, 2006
367 ivl_variable_type_t vtype,
dc90f0d Task/functions can have signed ports.
steve authored Jun 13, 2003
368 bool signed_flag,
cced1e7 @steveicarus Remove some uses of the svector template.
steveicarus authored Oct 26, 2010
369 list<PExpr*>*range,
e7fa569 More identifier lists use perm_strings.
steve authored May 25, 2004
370 list<perm_string>*names,
ef49fc1 Change LineInfo to store const C strings.
steve authored Nov 30, 2000
371 const char* file,
eb81d2f @caryr Fix some bugs in task integer/real arguments.
caryr authored Jan 27, 2011
372 unsigned lineno,
373 bool isint = false);
93a77a2 Elaborate task input ports.
steve authored Jul 24, 1999
374
375
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
376 /*
377 * These are functions that the outside-the-parser code uses the do
d9ac146 @ldoolitt Spelling fixes
ldoolitt authored Jan 29, 2008
378 * interesting things to the Verilog. The parse function reads and
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
379 * parses the source file and places all the modules it finds into the
380 * mod list. The dump function dumps a module to the output stream.
381 */
382 extern void pform_dump(ostream&out, Module*mod);
383
384 /*
ca92463 @caryr [PATCH] Better error message when an endmodule is missing (nested mod…
caryr authored Aug 17, 2007
385 * Used to report the original module location when a nested module
386 * (missing endmodule) is found by the parser.
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
387 */
ca92463 @caryr [PATCH] Better error message when an endmodule is missing (nested mod…
caryr authored Aug 17, 2007
388 extern void pform_error_nested_modules();
389
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
390 /* ** pform_discipline.cc
391 * Functions for handling the parse of natures and disciplines. These
392 * functions are in pform_disciplines.cc
393 */
394
7166aea @steveicarus Attach natures to disciplines
steveicarus authored May 12, 2008
395 extern void pform_start_nature(const char*name);
396 extern void pform_end_nature(const struct vlltype&loc);
397
398 extern void pform_nature_access(const struct vlltype&loc, const char*name);
399
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
400 extern void pform_start_discipline(const char*name);
401 extern void pform_end_discipline(const struct vlltype&loc);
402
f468775 @steveicarus Bring signal discipline all the way to the ivl_target API.
steveicarus authored Nov 2, 2008
403 extern void pform_discipline_domain(const struct vlltype&loc, ivl_dis_domain_t use_domain);
7166aea @steveicarus Attach natures to disciplines
steveicarus authored May 12, 2008
404 extern void pform_discipline_potential(const struct vlltype&loc, const char*name);
405 extern void pform_discipline_flow(const struct vlltype&loc, const char*name);
406
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
407 extern void pform_attach_discipline(const struct vlltype&loc,
f468775 @steveicarus Bring signal discipline all the way to the ivl_target API.
steveicarus authored Nov 2, 2008
408 ivl_discipline_t discipline, list<perm_string>*names);
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
409
eb240dd @steveicarus Bring discipline natures all the way to the ivl_target API.
steveicarus authored Nov 3, 2008
410 extern void pform_dump(ostream&out, const ivl_nature_s*);
f468775 @steveicarus Bring signal discipline all the way to the ivl_target API.
steveicarus authored Nov 2, 2008
411 extern void pform_dump(ostream&out, const ivl_discipline_s*);
5b27317 @steveicarus Parse disciplines and contribution statements
steveicarus authored May 11, 2008
412
03e306c @steveicarus Infrastructure for parsing analog process statements.
steveicarus authored Jul 27, 2008
413 /* ** pform_analog.cc
414 */
415 extern void pform_make_analog_behavior(const struct vlltype&loc,
68fbb94 @steveicarus Basic elaboration of analog contribution statements.
steveicarus authored Oct 22, 2008
416 ivl_process_type_t type, Statement*st);
03e306c @steveicarus Infrastructure for parsing analog process statements.
steveicarus authored Jul 27, 2008
417
68fbb94 @steveicarus Basic elaboration of analog contribution statements.
steveicarus authored Oct 23, 2008
418 extern AContrib*pform_contribution_statement(const struct vlltype&loc,
419 PExpr*lval, PExpr*rval);
03e306c @steveicarus Infrastructure for parsing analog process statements.
steveicarus authored Jul 27, 2008
420
25a27f9 @steveicarus Parse contribution statements as far as pform.
steveicarus authored Jul 27, 2008
421 extern PExpr* pform_make_branch_probe_expression(const struct vlltype&loc,
422 char*name, char*n1, char*n2);
423
424 extern PExpr* pform_make_branch_probe_expression(const struct vlltype&loc,
425 char*name, char*branch);
7b102b1 @steveicarus Add function to define parameter from command line
steveicarus authored Aug 6, 2009
426
ec49f10 @steveicarus Revert bad merge from vhdl branch
steveicarus authored Oct 2, 2010
427 /*
7b102b1 @steveicarus Add function to define parameter from command line
steveicarus authored Aug 6, 2009
428 * Parse configuration file with format <key>=<value>, where key
429 * is the hierarchical name of a valid parameter name and value
430 * is the value user wants to assign to. The value should be constant.
431 */
432 extern void parm_to_defparam_list(const string&param);
433
c2feeb0 @radioninja System Verilog timeunit and timeprecision addition
radioninja authored Jun 20, 2009
434 /*
9dce649 @caryr Fix up original SV timeunit/timeprecision patch.
caryr authored Jul 11, 2009
435 * Tasks to set the timeunit or timeprecision for SystemVerilog.
c2feeb0 @radioninja System Verilog timeunit and timeprecision addition
radioninja authored Jun 20, 2009
436 */
9dce649 @caryr Fix up original SV timeunit/timeprecision patch.
caryr authored Jul 11, 2009
437 extern void pform_set_timeunit(const char*txt, bool in_module, bool only_check);
438 extern void pform_set_timeprecision(const char*txt, bool in_module,
439 bool only_check);
c2feeb0 @radioninja System Verilog timeunit and timeprecision addition
radioninja authored Jun 20, 2009
440
3fb7a05 Introduce verilog to CVS.
steve authored Nov 3, 1998
441 #endif
Something went wrong with that request. Please try again.