Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 80 lines (66 sloc) 2.376 kb
91aad30 Parse UDP primitives all the way to pform.
steve authored
1 #ifndef __PUdp_H
2 #define __PUdp_H
3 /*
427aef8 @caryr Add more file/line and scope information to the ivl interface, etc.
caryr authored
4 * Copyright (c) 1998-2011 Stephen Williams (steve@picturel.com)
91aad30 Parse UDP primitives all the way to pform.
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
f5aafc3 @arunpersaud updated FSF-address
arunpersaud authored
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
91aad30 Parse UDP primitives all the way to pform.
steve authored
20 */
21
e097c99 Elaborate UDP devices,
steve authored
22 # include <map>
427aef8 @caryr Add more file/line and scope information to the ivl interface, etc.
caryr authored
23 # include "LineInfo.h"
27af95d Use perm_strings for named langiage items.
steve authored
24 # include "StringHeap.h"
d0afc9a Get rid of the STL vector template.
steve authored
25 # include "svector.h"
91aad30 Parse UDP primitives all the way to pform.
steve authored
26 # include "verinum.h"
27
e6c0629 Add language support for Verilog-2001 attribute
steve authored
28 class PExpr;
29
91aad30 Parse UDP primitives all the way to pform.
steve authored
30 /*
31 * This class represents a parsed UDP. This is a much simpler object
e9fda22 @ldoolitt Spelling fixes
ldoolitt authored
32 * than a module or macromodule.
91aad30 Parse UDP primitives all the way to pform.
steve authored
33 *
cadf4cf Spelling fixes.
steve authored
34 * - all ports are scalar,
91aad30 Parse UDP primitives all the way to pform.
steve authored
35 * - pin 0 (the first port) is always output,
36 * and the remaining pins are input.
37 *
38 * Thus, the ports can be represented as an ordered list of pin names.
39 * If the output port is declared as a register in the Verilog source,
40 * then this is a sequential UDP and the sequential flag is set to true.
41 *
42 * STATE TABLE
43 * Each entry in the state table is given as a string with the same
44 * number of characters as inputs. If the UDP is sequential, a
45 * character is also included at the end of the string to represent
46 * the current output.
47 *
48 * If the UDP is sequential, the "initial" member is taken to be the
e941e7e Spelling fixes.
steve authored
49 * initial value assigned in the source, or 'x' if none is given.
91aad30 Parse UDP primitives all the way to pform.
steve authored
50 */
427aef8 @caryr Add more file/line and scope information to the ivl interface, etc.
caryr authored
51 class PUdp : public LineInfo {
91aad30 Parse UDP primitives all the way to pform.
steve authored
52
53 public:
27af95d Use perm_strings for named langiage items.
steve authored
54 explicit PUdp(perm_string n, unsigned nports);
91aad30 Parse UDP primitives all the way to pform.
steve authored
55
d0afc9a Get rid of the STL vector template.
steve authored
56 svector<string>ports;
c6453a0 primitive ports can bind bi name.
steve authored
57 unsigned find_port(const char*name);
58
91aad30 Parse UDP primitives all the way to pform.
steve authored
59 bool sequential;
60
d0afc9a Get rid of the STL vector template.
steve authored
61 svector<string>tinput;
62 svector<char> tcurrent;
63 svector<char> toutput;
91aad30 Parse UDP primitives all the way to pform.
steve authored
64
65 verinum::V initial;
66
e6c0629 Add language support for Verilog-2001 attribute
steve authored
67 map<string,PExpr*> attributes;
e097c99 Elaborate UDP devices,
steve authored
68
91aad30 Parse UDP primitives all the way to pform.
steve authored
69 void dump(ostream&out) const;
70
27af95d Use perm_strings for named langiage items.
steve authored
71 perm_string name_;
66cf3ec More UDP consolidation from Stephan Boettcher.
steve authored
72 private:
91aad30 Parse UDP primitives all the way to pform.
steve authored
73
74 private: // Not implemented
75 PUdp(const PUdp&);
76 PUdp& operator= (const PUdp&);
77 };
78
79 #endif
Something went wrong with that request. Please try again.