Skip to content
Newer
Older
100644 77 lines (67 sloc) 2.4 KB
0edb5a7 Basic support for specify timing.
steve authored
1 #ifndef __PSpec_H
2 #define __PSpec_H
3 /*
4 * Copyright (c) 2006 Stephen Williams <steve@icarus.com>
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 "LineInfo.h"
23 # include "StringHeap.h"
24 # include <vector>
25
c1c2381 Parse all specify paths to pform.
steve authored
26 class PExpr;
27
28 /*
29 * The PSpecPath is the parse of a specify path, which is in its most
30 * general form <path> = <delays>. The <delays> are collected into the
31 * "delays" vector in all cases, and the variety is in the other
32 * members.
33 *
34 * All paths also have a list of source names in the src vector, and a
35 * list of destination names in the dst vector. These pairs are the
36 * actual paths.
37 *
38 * If the path is a simple path, then:
39 * condition == nil
40 * edge == 0
41 * data_source_expression == nil
42 *
43 * If the path is conditional, then conditional == true and condition
44 * is the condition expression. If the condition expression is nil,
45 * then this is an ifnone conditional path.
46 *
f621448 Parse edge sensitive paths without edge specifier.
steve authored
47 * If data_source_expression != nil, then the path is edge sensitive
48 * and the edge might not be 0.
c1c2381 Parse all specify paths to pform.
steve authored
49 */
0edb5a7 Basic support for specify timing.
steve authored
50 class PSpecPath : public LineInfo {
51
52 public:
53 PSpecPath(unsigned src_cnt, unsigned dst_cnt);
54 ~PSpecPath();
55
56 void elaborate(class Design*des, class NetScope*scope) const;
57
58 void dump(std::ostream&out, unsigned ind) const;
59
60 public:
c1c2381 Parse all specify paths to pform.
steve authored
61 // Condition expression, if present.
62 bool conditional;
63 class PExpr* condition;
64 // Edge specification (-1==negedge, 0 = no edge, 1==posedge)
65 int edge;
0edb5a7 Basic support for specify timing.
steve authored
66 // Ordered set of source nodes of a path
67 std::vector<perm_string> src;
68 // Ordered set of destination nodes of a path
69 std::vector<perm_string> dst;
c1c2381 Parse all specify paths to pform.
steve authored
70 // Data source expression
71 class PExpr* data_source_expression;
0edb5a7 Basic support for specify timing.
steve authored
72
73 std::vector<class PExpr*>delays;
74 };
75
76 #endif
Something went wrong with that request. Please try again.