16 py::class_<GateTypeComponent, RawPtrWrapper<GateTypeComponent>> py_gate_type_component(m,
"GateTypeComponent", R
"(
17 A component defining additional functionality of a gate type.
20 py::enum_<GateTypeComponent::ComponentType>(py_gate_type_component, "ComponentType", R
"(
21 The type of a gate type component.
34 The type of the gate type component.
36 :type: hal_py.GateTypeComponent.ComponentType
40 Get the type of the gate type component.
42 :returns: The type of the gate type component.
43 :rtype: hal_py.GateTypeComponent.ComponentType
47 All components of the gate type component as a list.
49 :type: list[hal_py.GateTypeComponent]
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.
56 :param lambda filter: The filter applied to all candidate components, disabled by default.
57 :returns: The components.
58 :rtype: list[hal_py.GateTypeComponent]
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.
65 :param lambda filter: The filter applied to all candidate components.
66 :returns: The component or None.
67 :rtype: hal_py.GateTypeComponent or None
70 py::class_<LUTComponent, GateTypeComponent, RawPtrWrapper<LUTComponent>> py_lut_component(m, "LUTComponent", R
"(
71 A LUT component specifying the LUT gate type's functionality.
75 Check whether a component is a LUTComponent.
77 :param hal_py.GateTypeComponent component: The component to check.
78 :returns: True if component is a LUTComponent, False otherwise.
83 The bit-order of the initialization string.
84 True if ascending, False otherwise.
90 Get the bit-order of the initialization string.
92 :returns: True if ascending bit-order, False otherwise.
97 Set the bit-order of the initialization string.
99 :param bool init_ascending: True if ascending bit-order, False otherwise.
102 py::class_<FFComponent, GateTypeComponent, RawPtrWrapper<FFComponent>> py_ff_component(m, "FFComponent", R
"(
103 A FF component specifying the FF gate type's functionality.
107 Check whether a component is a FFComponent.
109 :param hal_py.GateTypeComponent component: The component to check.
110 :returns: True if component is a FFComponent, False otherwise.
115 The Boolean function describing the next internal state of the flip-flop.
119 Get the Boolean function describing the next internal state of the flip-flop.
121 :returns: The function describing the internal state.
122 :rtype: hal_py.BooleanFunction
126 Set the Boolean function describing the next internal state of the flip-flop.
128 :param hal_py.BooleanFunction next_state_bf: The function describing the internal state.
132 The Boolean function describing the clock input of the flip-flop.
136 Get the Boolean function describing the clock input of the flip-flop.
138 :returns: The function describing the clock input.
139 :rtype: hal_py.BooleanFunction
143 Set the Boolean function describing the clock input of the flip-flop.
145 :param hal_py.BooleanFunction clock_bf: The function describing the clock input.
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.
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.
157 :returns: The function describing the asynchronous reset behavior.
158 :rtype: hal_py.BooleanFunction
162 Set the Boolean function describing the asynchronous reset behavior of the flip-flop.
164 :param hal_py.BooleanFunction async_reset_bf: The function describing the asynchronous reset behavior.
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.
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.
176 :returns: The function describing the asynchronous set behavior.
177 :rtype: hal_py.BooleanFunction
181 Set the Boolean function describing the asynchronous set behavior of the flip-flop.
183 :param hal_py.BooleanFunction async_set_bf: The function describing the asynchronous set behavior.
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.
189 :returns: The values specifying the behavior for the internal and negated internal state.
190 :rytpe: tuple(hal_py.AsyncSetResetBehavior, hal_py.AsyncSetResetBehavior)
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.
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.
200 py::class_<LatchComponent, GateTypeComponent, RawPtrWrapper<LatchComponent>> py_latch_component(m, "LatchComponent", R
"(
201 A latch component specifying the latch gate type's functionality.
205 Check whether a component is a LatchComponent.
207 :param hal_py.GateTypeComponent component: The component to check.
208 :returns: True if component is a LatchComponent, False otherwise.
213 The Boolean function describing the data input of the latch.
217 Get the Boolean function describing the data input of the latch.
219 :returns: The function describing the data input.
220 :rtype: hal_py.BooleanFunction
224 Set the Boolean function describing the data input of the latch.
226 :param hal_py.BooleanFunction data_in_bf: The function describing the data input.
230 The Boolean function describing the enable behavior of the latch.
234 Get the Boolean function describing the enable behavior of the latch.
236 :returns: The function describing the enable behavior.
237 :rtype: hal_py.BooleanFunction
241 Set the Boolean function describing the enable behavior of the latch.
243 :param hal_py.BooleanFunction enable_bf: The function describing the enable behavior.
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.
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.
255 :returns: The function describing the asynchronous reset behavior.
256 :rtype: hal_py.BooleanFunction
260 Set the Boolean function describing the asynchronous reset behavior of the latch.
262 :param hal_py.BooleanFunction async_reset_bf: The function describing the asynchronous reset behavior.
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.
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.
274 :returns: The function describing the asynchronous set behavior.
275 :rtype: hal_py.BooleanFunction
279 Set the Boolean function describing the asynchronous set behavior of the latch.
281 :param hal_py.BooleanFunction async_set_bf: The function describing the asynchronous set behavior.
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.
287 :returns: The values specifying the behavior for the internal and negated internal state.
288 :rytpe: tuple(hal_py.AsyncSetResetBehavior, hal_py.AsyncSetResetBehavior)
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.
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.
298 py::class_<RAMComponent, GateTypeComponent, RawPtrWrapper<RAMComponent>> py_ram_component(m, "RAMComponent", R
"(
299 A RAM component specifying the RAM gate type's functionality.
303 Check whether a component is a RAMComponent.
305 :param hal_py.GateTypeComponent component: The component to check.
306 :returns: True if component is a RAMComponent, False otherwise.
311 The size of the RAM in bits.
317 Get the size of the RAM in bits.
319 :returns: The size of the RAM in bits.
323 Set the size of the RAM in bits.
325 :param int bit_size: The size of the RAM in bits.
328 py::class_<MACComponent, GateTypeComponent, RawPtrWrapper<MACComponent>> py_mac_component(m, "MACComponent", R
"(
329 A MAC component specifying the MAC gate type's functionality.
333 Check whether a component is a MACComponent.
335 :param hal_py.GateTypeComponent component: The component to check.
336 :returns: True if component is a MACComponent, False otherwise.
340 py::class_<InitComponent, GateTypeComponent, RawPtrWrapper<InitComponent>> py_init_component(m, "InitComponent", R
"(
341 An initialization component specifying the initialization behavior of a gate type.
345 Check whether a component is an InitComponent.
347 :param hal_py.GateTypeComponent component: The component to check.
348 :returns: True if component is a InitComponent, False otherwise.
353 The category in which to find the initialization data.
359 Get the category in which to find the initialization data.
361 :returns: The data category.
366 Set the category in which to find the initialization data.
368 :param str init_category: The data category.
372 The list of identifiers at which to find initialization data.
378 Get the list of identifiers at which to find the initialization data.
380 :returns: The data identifiers.
385 Set the list of identifiers at which to find the initialization data.
387 :param list[str] init_identifiers: The data identifiers.
390 py::class_<StateComponent, GateTypeComponent, RawPtrWrapper<StateComponent>> py_state_component(m, "StateComponent", R
"(
391 A StateComponent with given child component and the internal state identifiers.
395 Check whether a component is an StateComponent.
397 :param hal_py.GateTypeComponent component: The component to check.
398 :returns: True if component is a StateComponent, False otherwise.
403 The identifier of the internal state.
409 Get the identifier of the internal state.
411 :returns: The identifier of the internal state.
416 Set the identifier of the internal state.
418 :param str state_identifier: The identifier of the internal state.
422 The identifier of the negated internal state.
428 Get the identifier of the negated internal state.
430 :returns: The identifier of the negated internal state.
435 Set the identifier of the negated internal state.
437 :param str neg_state_identifier: The identifier of the negated internal state.
440 py::class_<RAMPortComponent, GateTypeComponent, RawPtrWrapper<RAMPortComponent>> py_ram_port_component(m, "RAMPortComponent", R
"(
441 A RAM port component specifying the behavior of a port belonging to a RAM gate type.
445 Check whether a component is a RAMPortComponent.
447 :param hal_py.GateTypeComponent component: The component to check.
448 :returns: True if component is a RAMPortComponent, False otherwise.
453 The name of the read or write data pin group.
459 Get the name of the read or write data pin group.
461 :returns: The name of the pin group.
466 Set the name of the read or write data pin group.
468 :param str data_group: The name of the pin group.
472 The name of the read or write address pin group.
478 Get the name of the read or write address pin group.
480 :returns: The name of the pin group.
485 Set the name of the read or write address pin group.
487 :param str addr_group: The name of the pin group.
491 The Boolean function determining the read or write clock.
493 :type: hal_py.BooleanFunction
497 Get the Boolean function determining the read or write clock.
499 :returns: The Boolean function.
500 :rtype: hal_py.BooleanFunction
504 Set the Boolean function determining the read or write clock.
506 :param hal_py.BooleanFunction clock_bf: The Boolean function.
510 The Boolean function determining the read or write enable.
512 :type: hal_py.BooleanFunction
516 Get the Boolean function determining the read or write enable.
518 :returns: The Boolean function.
519 :rtype: hal_py.BooleanFunction
523 Set the Boolean function determining the read or write enable.
525 :param hal_py.BooleanFunction enable_bf: The Boolean function.
529 True if the port is a write port, false if it is a read port.
535 Check whether the port is a write or a read port.
537 :returns: True if the port is a write port, false if it is a read port.
542 Set the port to be a write or a read port.
544 :param bool is_write: True if the port is a write port, false if it is a read port.
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)
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
bool is_write_port() 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)