@@ -60,16 +60,17 @@ class NETLISTDB_PUBLIC SensitivityInfo {
60
60
* @ivar parent parent instance of HdlStatement or nullptr
61
61
* @ivar _inputs OrderedSet of input signals for this statement
62
62
* @ivar _outputs OrderedSet of output signals for this statement
63
-
64
- * @ivar rank sum of numbers of used branches in statement, used as prefilter
63
+ *
64
+ * @ivar rank sum of numbers of used branches in statement, used as pre-filter
65
65
* for statement comparing
66
+ * @ivar sens the container for informations about sensitivity to nets
67
+ * @ivar __doc__ documentation string which will be added as a comment to target HDL
66
68
*
67
69
* @attention the sensitivity has to be discovered explicitly
68
70
*/
69
71
class NETLISTDB_PUBLIC Statement: public OperationNode {
70
72
public:
71
73
Statement * parent;
72
-
73
74
// IO of this statement
74
75
utils::OrderedSet<Net*> _inputs;
75
76
utils::OrderedSet<Net*> _outputs;
@@ -78,6 +79,9 @@ class NETLISTDB_PUBLIC Statement: public OperationNode {
78
79
79
80
size_t rank;
80
81
82
+ // __doc__ documentation string which will be added as a comment to target HDL
83
+ std::string __doc__;
84
+
81
85
Statement () :
82
86
parent (nullptr ), rank(0 ) {
83
87
}
@@ -95,7 +99,7 @@ class NETLISTDB_PUBLIC Statement: public OperationNode {
95
99
/*
96
100
* walk all direct child statements with specified function fn
97
101
*
98
- * @param fn callback which is called on each node, if the function returns true the iteration is stoped
102
+ * @param fn callback which is called on each node, if the function returns true the iteration is stopped
99
103
* and the visit_child_stm returns
100
104
* */
101
105
virtual void visit_child_stm (const std::function<bool (Statement &)> & fn) = 0;
@@ -165,11 +169,11 @@ class NETLISTDB_PUBLIC ComponentMap: public OperationNode {
165
169
* There are multiple types of node in this directed graph
166
170
* The signal, statement and FunctionCall (which represents also the operator usage)
167
171
*
168
- * Each node has own list of neighbors . This is the case because the graph
172
+ * Each node has own list of neighbours . This is the case because the graph
169
173
* is expected to change frequently and be larger than 10k nodes this representation
170
174
* by linked list or connection matrix would not be efficient.
171
175
*
172
- * Also for some nodes the order of neighbors does matter for some does not.
176
+ * Also for some nodes the order of neighbours does matter for some does not.
173
177
* For example order of Signal endpoints does not matter. The order of Signals
174
178
* in FunctionCall does.
175
179
*
@@ -182,6 +186,8 @@ class NETLISTDB_PUBLIC Netlist {
182
186
std::vector<Net*> nets;
183
187
// all nets, statements, operators, etc.
184
188
std::vector<iNode*> nodes;
189
+ // __doc__ documentation string which will be added as a comment to target HDL
190
+ std::string __doc__;
185
191
186
192
Netlist (const Netlist & other) = delete ;
187
193
Netlist (const std::string & name);
@@ -221,7 +227,7 @@ class NETLISTDB_PUBLIC Netlist {
221
227
~Netlist ();
222
228
};
223
229
224
- /* * The net in Netlist instance also the hyperedge which connects
230
+ /* * The net in Netlist instance also the hyper-edge which connects
225
231
* the statements, expressions, etc.
226
232
*
227
233
* @note The overloaded operators are building the expression in the netlist
@@ -256,6 +262,9 @@ class NETLISTDB_PUBLIC Net: public iNode {
256
262
// index used for last priority ordering
257
263
// represent the sequential number of the signal generated in parent context
258
264
265
+ // documentation string which will be added as a comment to target HDL
266
+ std::string __doc__;
267
+
259
268
Net (const Net & other) = delete ;
260
269
// use methods from Netlist
261
270
Net (Netlist & ctx, hw_type::iHwType & t, const std::string & name,
@@ -374,9 +383,4 @@ class NETLISTDB_PUBLIC Net: public iNode {
374
383
Net & wrap_val_to_const_net (unsigned val);
375
384
};
376
385
377
-
378
-
379
-
380
-
381
386
}
382
-
0 commit comments