HAL  v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
gate_type_components.cpp
Go to the documentation of this file.
11 
12 namespace hal
13 {
15  {
16  py::class_<GateTypeComponent, RawPtrWrapper<GateTypeComponent>> py_gate_type_component(m, "GateTypeComponent", R"(
17  A component defining additional functionality of a gate type.
18  )");
19 
20  py::enum_<GateTypeComponent::ComponentType>(py_gate_type_component, "ComponentType", R"(
21  The type of a gate type component.
22  )")
23  .value("lut", GateTypeComponent::ComponentType::lut, R"(LUT component type.)")
24  .value("ff", GateTypeComponent::ComponentType::ff, R"(Flip-flop component type.)")
25  .value("latch", GateTypeComponent::ComponentType::latch, R"(Latch component type.)")
26  .value("ram", GateTypeComponent::ComponentType::ram, R"(RAM component type.)")
27  .value("mac", GateTypeComponent::ComponentType::mac, R"(MAC component type.)")
28  .value("init", GateTypeComponent::ComponentType::init, R"(Initializiation component type.)")
29  .value("state", GateTypeComponent::ComponentType::state, R"(State component type.)")
30  .value("ram_port", GateTypeComponent::ComponentType::ram_port, R"(RAM port component type.)")
31  .export_values();
32 
33  py_gate_type_component.def_property_readonly("type", &GateTypeComponent::get_type, R"(
34  The type of the gate type component.
35 
36  :type: hal_py.GateTypeComponent.ComponentType
37  )");
38 
39  py_gate_type_component.def("get_type", &GateTypeComponent::get_type, R"(
40  Get the type of the gate type component.
41 
42  :returns: The type of the gate type component.
43  :rtype: hal_py.GateTypeComponent.ComponentType
44  )");
45 
46  py_gate_type_component.def_property_readonly("components", &GateTypeComponent::get_components, R"(
47  All components of the gate type component as a list.
48 
49  :type: list[hal_py.GateTypeComponent]
50  )");
51 
52  py_gate_type_component.def("get_components", &GateTypeComponent::get_components, py::arg("filter") = nullptr, R"(
53  Get all components matching the filter condition (if provided) as a list.
54  Returns an empty list if (i) the gate type does not contain any components or (ii) no component matches the filter condition.
55 
56  :param lambda filter: The filter applied to all candidate components, disabled by default.
57  :returns: The components.
58  :rtype: list[hal_py.GateTypeComponent]
59  )");
60 
61  py_gate_type_component.def("get_component", &GateTypeComponent::get_component, py::arg("filter") = nullptr, R"(
62  Get a single component matching the filter condition (if provided).
63  Returns ``None`` if (i) the gate type does not contain any components, (ii) multiple components match the filter condition, or (iii) no component matches the filter condition.
64 
65  :param lambda filter: The filter applied to all candidate components.
66  :returns: The component or ``None``.
67  :rtype: hal_py.GateTypeComponent or None
68  )");
69 
70  py::class_<LUTComponent, GateTypeComponent, RawPtrWrapper<LUTComponent>> py_lut_component(m, "LUTComponent", R"(
71  A LUT component specifying the LUT gate type's functionality.
72  )");
73 
74  py_lut_component.def_static("is_class_of", &LUTComponent::is_class_of, py::arg("component"), R"(
75  Check whether a component is a LUTComponent.
76 
77  :param hal_py.GateTypeComponent component: The component to check.
78  :returns: ``True`` if component is a LUTComponent, ``False`` otherwise.
79  :rtype: bool
80  )");
81 
82  py_lut_component.def_property("init_ascending", &LUTComponent::is_init_ascending, &LUTComponent::set_init_ascending, R"(
83  The bit-order of the initialization string.
84  ``True`` if ascending, ``False`` otherwise.
85 
86  :type: bool
87  )");
88 
89  py_lut_component.def("is_init_ascending", &LUTComponent::is_init_ascending, R"(
90  Get the bit-order of the initialization string.
91 
92  :returns: ``True`` if ascending bit-order, ``False`` otherwise.
93  :rtype: bool
94  )");
95 
96  py_lut_component.def("set_init_ascending", &LUTComponent::set_init_ascending, py::arg("init_ascending") = true, R"(
97  Set the bit-order of the initialization string.
98 
99  :param bool init_ascending: ``True`` if ascending bit-order, ``False`` otherwise.
100  )");
101 
102  py::class_<FFComponent, GateTypeComponent, RawPtrWrapper<FFComponent>> py_ff_component(m, "FFComponent", R"(
103  A FF component specifying the FF gate type's functionality.
104  )");
105 
106  py_ff_component.def_static("is_class_of", &FFComponent::is_class_of, py::arg("component"), R"(
107  Check whether a component is a FFComponent.
108 
109  :param hal_py.GateTypeComponent component: The component to check.
110  :returns: ``True`` if component is a FFComponent, ``False`` otherwise.
111  :rtype: bool
112  )");
113 
114  py_ff_component.def_property("next_state_function", &FFComponent::get_next_state_function, &FFComponent::set_next_state_function, R"(
115  The Boolean function describing the next internal state of the flip-flop.
116  )");
117 
118  py_ff_component.def("get_next_state_function", &FFComponent::get_next_state_function, R"(
119  Get the Boolean function describing the next internal state of the flip-flop.
120 
121  :returns: The function describing the internal state.
122  :rtype: hal_py.BooleanFunction
123  )");
124 
125  py_ff_component.def("set_next_state_function", &FFComponent::set_next_state_function, py::arg("next_state_bf"), R"(
126  Set the Boolean function describing the next internal state of the flip-flop.
127 
128  :param hal_py.BooleanFunction next_state_bf: The function describing the internal state.
129  )");
130 
131  py_ff_component.def_property("clock_function", &FFComponent::get_clock_function, &FFComponent::set_clock_function, R"(
132  The Boolean function describing the clock input of the flip-flop.
133  )");
134 
135  py_ff_component.def("get_clock_function", &FFComponent::get_clock_function, R"(
136  Get the Boolean function describing the clock input of the flip-flop.
137 
138  :returns: The function describing the clock input.
139  :rtype: hal_py.BooleanFunction
140  )");
141 
142  py_ff_component.def("set_clock_function", &FFComponent::set_clock_function, py::arg("clock_bf"), R"(
143  Set the Boolean function describing the clock input of the flip-flop.
144 
145  :param hal_py.BooleanFunction clock_bf: The function describing the clock input.
146  )");
147 
148  py_ff_component.def_property("async_reset_function", &FFComponent::get_async_reset_function, &FFComponent::set_async_reset_function, R"(
149  The Boolean function describing the asynchronous reset behavior of the flip-flop.
150  Is an empty function if asynchronous reset is not supported by the flip-flop.
151  )");
152 
153  py_ff_component.def("get_async_reset_function", &FFComponent::get_async_reset_function, R"(
154  Get the Boolean function describing the asynchronous reset behavior of the flip-flop.
155  Returns an empty function if asynchronous reset is not supported by the flip-flop.
156 
157  :returns: The function describing the asynchronous reset behavior.
158  :rtype: hal_py.BooleanFunction
159  )");
160 
161  py_ff_component.def("set_async_reset_function", &FFComponent::set_async_reset_function, py::arg("async_reset_bf"), R"(
162  Set the Boolean function describing the asynchronous reset behavior of the flip-flop.
163 
164  :param hal_py.BooleanFunction async_reset_bf: The function describing the asynchronous reset behavior.
165  )");
166 
167  py_ff_component.def_property("async_set_function", &FFComponent::get_async_set_function, &FFComponent::set_async_set_function, R"(
168  The Boolean function describing the asynchronous set behavior of the flip-flop.
169  Is an empty function if asynchronous set is not supported by the flip-flop.
170  )");
171 
172  py_ff_component.def("get_async_set_function", &FFComponent::get_async_set_function, R"(
173  Get the Boolean function describing the asynchronous set behavior of the flip-flop.
174  Returns an empty function if asynchronous set is not supported by the flip-flop.
175 
176  :returns: The function describing the asynchronous set behavior.
177  :rtype: hal_py.BooleanFunction
178  )");
179 
180  py_ff_component.def("set_async_set_function", &FFComponent::set_async_set_function, py::arg("async_set_bf"), R"(
181  Set the Boolean function describing the asynchronous set behavior of the flip-flop.
182 
183  :param hal_py.BooleanFunction async_set_bf: The function describing the asynchronous set behavior.
184  )");
185 
186  py_ff_component.def("get_async_set_reset_behavior", &FFComponent::get_async_set_reset_behavior, R"(
187  Get the behavior of the internal state and the negated internal state when both asynchronous set and reset are active at the same time.
188 
189  :returns: The values specifying the behavior for the internal and negated internal state.
190  :rtype: tuple(hal_py.AsyncSetResetBehavior, hal_py.AsyncSetResetBehavior)
191  )");
192 
193  py_ff_component.def("set_async_set_reset_behavior", &FFComponent::set_async_set_reset_behavior, py::arg("behav_state"), py::arg("behav_neg_state"), R"(
194  Set the behavior of the internal state and the negated internal state when both asynchronous set and reset are active at the same time.
195 
196  :param hal_py.AsyncSetResetBehavior behav_state: The behavior of the internal state.
197  :param hal_py.AsyncSetResetBehavior behav_neg_state: The behavior of the negated internal state.
198  )");
199 
200  py::class_<LatchComponent, GateTypeComponent, RawPtrWrapper<LatchComponent>> py_latch_component(m, "LatchComponent", R"(
201  A latch component specifying the latch gate type's functionality.
202  )");
203 
204  py_latch_component.def_static("is_class_of", &LatchComponent::is_class_of, py::arg("component"), R"(
205  Check whether a component is a LatchComponent.
206 
207  :param hal_py.GateTypeComponent component: The component to check.
208  :returns: ``True`` if component is a LatchComponent, ``False`` otherwise.
209  :rtype: bool
210  )");
211 
212  py_latch_component.def_property("data_in_function", &LatchComponent::get_data_in_function, &LatchComponent::set_data_in_function, R"(
213  The Boolean function describing the data input of the latch.
214  )");
215 
216  py_latch_component.def("get_data_in_function", &LatchComponent::get_data_in_function, R"(
217  Get the Boolean function describing the data input of the latch.
218 
219  :returns: The function describing the data input.
220  :rtype: hal_py.BooleanFunction
221  )");
222 
223  py_latch_component.def("set_data_in_function", &LatchComponent::set_data_in_function, py::arg("data_in_bf"), R"(
224  Set the Boolean function describing the data input of the latch.
225 
226  :param hal_py.BooleanFunction data_in_bf: The function describing the data input.
227  )");
228 
229  py_latch_component.def_property("enable_function", &LatchComponent::get_enable_function, &LatchComponent::set_enable_function, R"(
230  The Boolean function describing the enable behavior of the latch.
231  )");
232 
233  py_latch_component.def("get_enable_function", &LatchComponent::get_enable_function, R"(
234  Get the Boolean function describing the enable behavior of the latch.
235 
236  :returns: The function describing the enable behavior.
237  :rtype: hal_py.BooleanFunction
238  )");
239 
240  py_latch_component.def("set_enable_function", &LatchComponent::set_enable_function, py::arg("enable_bf"), R"(
241  Set the Boolean function describing the enable behavior of the latch.
242 
243  :param hal_py.BooleanFunction enable_bf: The function describing the enable behavior.
244  )");
245 
246  py_latch_component.def_property("async_reset_function", &LatchComponent::get_async_reset_function, &LatchComponent::set_async_reset_function, R"(
247  The Boolean function describing the asynchronous reset behavior of the latch.
248  Is an empty function if asynchronous reset is not supported by the latch.
249  )");
250 
251  py_latch_component.def("get_async_reset_function", &LatchComponent::get_async_reset_function, R"(
252  Get the Boolean function describing the asynchronous reset behavior of the latch.
253  Returns an empty function if asynchronous reset is not supported by the latch.
254 
255  :returns: The function describing the asynchronous reset behavior.
256  :rtype: hal_py.BooleanFunction
257  )");
258 
259  py_latch_component.def("set_async_reset_function", &LatchComponent::set_async_reset_function, py::arg("async_reset_bf"), R"(
260  Set the Boolean function describing the asynchronous reset behavior of the latch.
261 
262  :param hal_py.BooleanFunction async_reset_bf: The function describing the asynchronous reset behavior.
263  )");
264 
265  py_latch_component.def_property("async_set_function", &LatchComponent::get_async_set_function, &LatchComponent::set_async_set_function, R"(
266  The Boolean function describing the asynchronous set behavior of the latch.
267  Is an empty function if asynchronous set is not supported by the latch.
268  )");
269 
270  py_latch_component.def("get_async_set_function", &LatchComponent::get_async_set_function, R"(
271  Get the Boolean function describing the asynchronous set behavior of the latch.
272  Returns an empty function if asynchronous set is not supported by the latch.
273 
274  :returns: The function describing the asynchronous set behavior.
275  :rtype: hal_py.BooleanFunction
276  )");
277 
278  py_latch_component.def("set_async_set_function", &LatchComponent::set_async_set_function, py::arg("async_set_bf"), R"(
279  Set the Boolean function describing the asynchronous set behavior of the latch.
280 
281  :param hal_py.BooleanFunction async_set_bf: The function describing the asynchronous set behavior.
282  )");
283 
284  py_latch_component.def("get_async_set_reset_behavior", &LatchComponent::get_async_set_reset_behavior, R"(
285  Get the behavior of the internal state and the negated internal state when both asynchronous set and reset are active at the same time.
286 
287  :returns: The values specifying the behavior for the internal and negated internal state.
288  :rtype: tuple(hal_py.AsyncSetResetBehavior, hal_py.AsyncSetResetBehavior)
289  )");
290 
291  py_latch_component.def("set_async_set_reset_behavior", &LatchComponent::set_async_set_reset_behavior, py::arg("behav_state"), py::arg("behav_neg_state"), R"(
292  Set the behavior of the internal state and the negated internal state when both asynchronous set and reset are active at the same time.
293 
294  :param hal_py.AsyncSetResetBehavior behav_state: The behavior of the internal state.
295  :param hal_py.AsyncSetResetBehavior behav_neg_state: The behavior of the negated internal state.
296  )");
297 
298  py::class_<RAMComponent, GateTypeComponent, RawPtrWrapper<RAMComponent>> py_ram_component(m, "RAMComponent", R"(
299  A RAM component specifying the RAM gate type's functionality.
300  )");
301 
302  py_ram_component.def_static("is_class_of", &RAMComponent::is_class_of, py::arg("component"), R"(
303  Check whether a component is a RAMComponent.
304 
305  :param hal_py.GateTypeComponent component: The component to check.
306  :returns: ``True`` if component is a RAMComponent, ``False`` otherwise.
307  :rtype: bool
308  )");
309 
310  py_ram_component.def_property("bit_size", &RAMComponent::get_bit_size, &RAMComponent::set_bit_size, R"(
311  The size of the RAM in bits.
312 
313  :type: int
314  )");
315 
316  py_ram_component.def("get_bit_size", &RAMComponent::get_bit_size, R"(
317  Get the size of the RAM in bits.
318 
319  :returns: The size of the RAM in bits.
320  :rtype: int
321  )");
322 
323  py_ram_component.def("set_bit_size", &RAMComponent::set_bit_size, py::arg("bit_size"), R"(
324  Set the size of the RAM in bits.
325 
326  :param int bit_size: The size of the RAM in bits.
327  )");
328 
329  py::class_<MACComponent, GateTypeComponent, RawPtrWrapper<MACComponent>> py_mac_component(m, "MACComponent", R"(
330  A MAC component specifying the MAC gate type's functionality.
331  )");
332 
333  py_mac_component.def_static("is_class_of", &MACComponent::is_class_of, py::arg("component"), R"(
334  Check whether a component is a MACComponent.
335 
336  :param hal_py.GateTypeComponent component: The component to check.
337  :returns: ``True`` if component is a MACComponent, ``False`` otherwise.
338  :rtype: bool
339  )");
340 
341  py::class_<InitComponent, GateTypeComponent, RawPtrWrapper<InitComponent>> py_init_component(m, "InitComponent", R"(
342  An initialization component specifying the initialization behavior of a gate type.
343  )");
344 
345  py_init_component.def_static("is_class_of", &InitComponent::is_class_of, py::arg("component"), R"(
346  Check whether a component is an InitComponent.
347 
348  :param hal_py.GateTypeComponent component: The component to check.
349  :returns: ``True`` if component is an InitComponent, ``False`` otherwise.
350  :rtype: bool
351  )");
352 
353  py_init_component.def_property("init_category", &InitComponent::get_init_category, &InitComponent::set_init_category, R"(
354  The category in which to find the initialization data.
355 
356  :type: str
357  )");
358 
359  py_init_component.def("get_init_category", &InitComponent::get_init_category, R"(
360  Get the category in which to find the initialization data.
361 
362  :returns: The data category.
363  :rtype: str
364  )");
365 
366  py_init_component.def("set_init_category", &InitComponent::set_init_category, py::arg("init_category"), R"(
367  Set the category in which to find the initialization data.
368 
369  :param str init_category: The data category.
370  )");
371 
372  py_init_component.def_property("init_identifiers", &InitComponent::get_init_identifiers, &InitComponent::set_init_identifiers, R"(
373  The list of identifiers at which to find initialization data.
374 
375  :type: str
376  )");
377 
378  py_init_component.def("get_init_identifier", &InitComponent::get_init_identifiers, R"(
379  Get the list of identifiers at which to find the initialization data.
380 
381  :returns: The data identifiers.
382  :rtype: list[str]
383  )");
384 
385  py_init_component.def("set_init_identifier", &InitComponent::set_init_identifiers, py::arg("init_identifiers"), R"(
386  Set the list of identifiers at which to find the initialization data.
387 
388  :param list[str] init_identifiers: The data identifiers.
389  )");
390 
391  py::class_<StateComponent, GateTypeComponent, RawPtrWrapper<StateComponent>> py_state_component(m, "StateComponent", R"(
392  A StateComponent with given child component and the internal state identifiers.
393  )");
394 
395  py_state_component.def_static("is_class_of", &StateComponent::is_class_of, py::arg("component"), R"(
396  Check whether a component is a StateComponent.
397 
398  :param hal_py.GateTypeComponent component: The component to check.
399  :returns: ``True`` if component is a StateComponent, ``False`` otherwise.
400  :rtype: bool
401  )");
402 
403  py_state_component.def_property("state_identifier", &StateComponent::get_state_identifier, &StateComponent::set_state_identifier, R"(
404  The identifier of the internal state.
405 
406  :type: str
407  )");
408 
409  py_state_component.def("get_state_identifier", &StateComponent::get_state_identifier, R"(
410  Get the identifier of the internal state.
411 
412  :returns: The identifier of the internal state.
413  :rtype: str
414  )");
415 
416  py_state_component.def("set_state_identifier", &StateComponent::set_state_identifier, py::arg("state_identifier"), R"(
417  Set the identifier of the internal state.
418 
419  :param str state_identifier: The identifier of the internal state.
420  )");
421 
422  py_state_component.def_property("neg_state_identifier", &StateComponent::get_neg_state_identifier, &StateComponent::set_neg_state_identifier, R"(
423  The identifier of the negated internal state.
424 
425  :type: str
426  )");
427 
428  py_state_component.def("get_neg_state_identifier", &StateComponent::get_neg_state_identifier, R"(
429  Get the identifier of the negated internal state.
430 
431  :returns: The identifier of the negated internal state.
432  :rtype: str
433  )");
434 
435  py_state_component.def("set_neg_state_identifier", &StateComponent::set_neg_state_identifier, py::arg("neg_state_identifier"), R"(
436  Set the identifier of the negated internal state.
437 
438  :param str neg_state_identifier: The identifier of the negated internal state.
439  )");
440 
441  py::class_<RAMPortComponent, GateTypeComponent, RawPtrWrapper<RAMPortComponent>> py_ram_port_component(m, "RAMPortComponent", R"(
442  A RAM port component specifying the behavior of a port belonging to a RAM gate type.
443  )");
444 
445  py_ram_port_component.def_static("is_class_of", &RAMPortComponent::is_class_of, py::arg("component"), R"(
446  Check whether a component is a RAMPortComponent.
447 
448  :param hal_py.GateTypeComponent component: The component to check.
449  :returns: ``True`` if component is a RAMPortComponent, ``False`` otherwise.
450  :rtype: bool
451  )");
452 
453  py_ram_port_component.def_property("data_group", &RAMPortComponent::get_data_group, &RAMPortComponent::set_data_group, R"(
454  The name of the read or write data pin group.
455 
456  :type: str
457  )");
458 
459  py_ram_port_component.def("get_data_group", &RAMPortComponent::get_data_group, R"(
460  Get the name of the read or write data pin group.
461 
462  :returns: The name of the pin group.
463  :rtype: str
464  )");
465 
466  py_ram_port_component.def("set_data_group", &RAMPortComponent::set_data_group, py::arg("data_group"), R"(
467  Set the name of the read or write data pin group.
468 
469  :param str data_group: The name of the pin group.
470  )");
471 
472  py_ram_port_component.def_property("address_group", &RAMPortComponent::get_address_group, &RAMPortComponent::set_address_group, R"(
473  The name of the read or write address pin group.
474 
475  :type: str
476  )");
477 
478  py_ram_port_component.def("get_address_group", &RAMPortComponent::get_address_group, R"(
479  Get the name of the read or write address pin group.
480 
481  :returns: The name of the pin group.
482  :rtype: str
483  )");
484 
485  py_ram_port_component.def("set_address_group", &RAMPortComponent::set_address_group, py::arg("addr_group"), R"(
486  Set the name of the read or write address pin group.
487 
488  :param str addr_group: The name of the pin group.
489  )");
490 
491  py_ram_port_component.def_property("clock_function", &RAMPortComponent::get_clock_function, &RAMPortComponent::set_clock_function, R"(
492  The Boolean function determining the read or write clock.
493 
494  :type: hal_py.BooleanFunction
495  )");
496 
497  py_ram_port_component.def("get_clock_function", &RAMPortComponent::get_clock_function, R"(
498  Get the Boolean function determining the read or write clock.
499 
500  :returns: The Boolean function.
501  :rtype: hal_py.BooleanFunction
502  )");
503 
504  py_ram_port_component.def("set_clock_function", &RAMPortComponent::set_clock_function, py::arg("clock_bf"), R"(
505  Set the Boolean function determining the read or write clock.
506 
507  :param hal_py.BooleanFunction clock_bf: The Boolean function.
508  )");
509 
510  py_ram_port_component.def_property("enable_function", &RAMPortComponent::get_enable_function, &RAMPortComponent::set_enable_function, R"(
511  The Boolean function determining the read or write enable.
512 
513  :type: hal_py.BooleanFunction
514  )");
515 
516  py_ram_port_component.def("get_enable_function", &RAMPortComponent::get_enable_function, R"(
517  Get the Boolean function determining the read or write enable.
518 
519  :returns: The Boolean function.
520  :rtype: hal_py.BooleanFunction
521  )");
522 
523  py_ram_port_component.def("set_enable_function", &RAMPortComponent::set_enable_function, py::arg("enable_bf"), R"(
524  Set the Boolean function determining the read or write enable.
525 
526  :param hal_py.BooleanFunction enable_bf: The Boolean function.
527  )");
528 
529  py_ram_port_component.def_property("write_port", &RAMPortComponent::is_write_port, &RAMPortComponent::set_write_port, R"(
530  ``True`` if the port is a write port, ``False`` if it is a read port.
531 
532  :type: bool
533  )");
534 
535  py_ram_port_component.def("is_write_port", &RAMPortComponent::is_write_port, R"(
536  Check whether the port is a write or a read port.
537 
538  :returns: ``True`` if the port is a write port, ``False`` otherwise.
539  :rtype: bool
540  )");
541 
542  py_ram_port_component.def("set_write_port", &RAMPortComponent::set_write_port, py::arg("is_write"), R"(
543  Set the port to be a write or a read port.
544 
545  :param bool is_write: ``True`` to set the port to be a write port, ``False`` to set it to be a read port.
546  )");
547  }
548 } // namespace hal
void set_clock_function(const BooleanFunction &clock_bf)
void set_async_set_reset_behavior(const AsyncSetResetBehavior behav_state, const AsyncSetResetBehavior behav_neg_state)
void set_async_set_function(const BooleanFunction &async_set_bf)
BooleanFunction get_clock_function() const
const std::pair< AsyncSetResetBehavior, AsyncSetResetBehavior > & get_async_set_reset_behavior() const
BooleanFunction get_async_set_function() const
static bool is_class_of(const GateTypeComponent *component)
BooleanFunction get_async_reset_function() const
BooleanFunction get_next_state_function() const
void set_next_state_function(const BooleanFunction &next_state_bf)
void set_async_reset_function(const BooleanFunction &async_reset_bf)
virtual std::vector< GateTypeComponent * > get_components(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const =0
virtual ComponentType get_type() const =0
GateTypeComponent * get_component(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
const std::string & get_init_category() const
static bool is_class_of(const GateTypeComponent *component)
void set_init_category(const std::string &init_category)
void set_init_identifiers(const std::vector< std::string > &init_identifiers)
const std::vector< std::string > & get_init_identifiers() const
void set_init_ascending(bool init_ascending=true)
bool is_init_ascending() const
static bool is_class_of(const GateTypeComponent *component)
BooleanFunction get_async_reset_function() const
void set_async_reset_function(const BooleanFunction &async_reset_bf)
void set_async_set_reset_behavior(AsyncSetResetBehavior behav_state, AsyncSetResetBehavior behav_neg_state)
static bool is_class_of(const GateTypeComponent *component)
const std::pair< AsyncSetResetBehavior, AsyncSetResetBehavior > & get_async_set_reset_behavior() const
void set_enable_function(const BooleanFunction &enable_bf)
void set_async_set_function(const BooleanFunction &async_set_bf)
BooleanFunction get_async_set_function() const
BooleanFunction get_enable_function() const
BooleanFunction get_data_in_function() const
void set_data_in_function(const BooleanFunction &data_in_bf)
static bool is_class_of(const GateTypeComponent *component)
static bool is_class_of(const GateTypeComponent *component)
u32 get_bit_size() const
void set_bit_size(const u32 bit_size)
void set_enable_function(const BooleanFunction &enable_bf)
void set_address_group(const std::string &addr_group)
void set_write_port(bool is_write)
const std::string & get_data_group() const
const BooleanFunction & get_enable_function() const
static bool is_class_of(const GateTypeComponent *component)
const BooleanFunction & get_clock_function() const
const std::string & get_address_group() const
void set_clock_function(const BooleanFunction &clock_bf)
void set_data_group(const std::string &data_group)
const std::string & get_state_identifier() const
void set_state_identifier(const std::string &state_identifier)
static bool is_class_of(const GateTypeComponent *component)
const std::string & get_neg_state_identifier() const
void set_neg_state_identifier(const std::string &neg_state_identifier)
void gate_type_components_init(py::module &m)
const Module * module(const Gate *g, const NodeBoxes &boxes)
Definition: defines.h:45