From efb001de7e1877d427f5088c2e7419ec68570495 Mon Sep 17 00:00:00 2001 From: SJulianS Date: Fri, 24 Mar 2023 09:43:21 +0100 Subject: [PATCH 1/2] combinational and FF gate type from python --- .../netlist/gate_library/gate_library.h | 13 ++-- .../gate_type_component/ff_component.h | 20 +++-- .../gate_type_component/gate_type_component.h | 13 +++- .../gate_type_component/ff_component.cpp | 11 ++- .../gate_type_component.cpp | 12 ++- src/python_bindings/bindings/gate_library.cpp | 74 +++++++++++++++++-- 6 files changed, 117 insertions(+), 26 deletions(-) diff --git a/include/hal_core/netlist/gate_library/gate_library.h b/include/hal_core/netlist/gate_library/gate_library.h index f9b7888dacd..2adf02eed4e 100644 --- a/include/hal_core/netlist/gate_library/gate_library.h +++ b/include/hal_core/netlist/gate_library/gate_library.h @@ -1,20 +1,20 @@ // MIT License -// +// // Copyright (c) 2019 Ruhr University Bochum, Chair for Embedded Security. All Rights reserved. // Copyright (c) 2019 Marc Fyrbiak, Sebastian Wallat, Max Hoffmann ("ORIGINAL AUTHORS"). All rights reserved. // Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved. // Copyright (c) 2021 Jörn Langheinrich, Julian Speith, Nils Albartus, René Walendy, Simon Klix ("ORIGINAL AUTHORS"). All Rights reserved. -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -95,11 +95,10 @@ namespace hal const std::pair& get_gate_location_data_identifiers() const; /** - * TODO pybind * Create a new gate type, add it to the gate library, and return it. * * @param[in] name - The name of the gate type. - * @param[in] properties - The properties of the gate type. + * @param[in] properties - The properties of the gate type. Defaults to `GateTypeProperty::combinational`. * @param[in] component - A component adding additional functionality to the gate type. * @returns The new gate type instance on success, a nullptr otherwise. */ @@ -198,7 +197,7 @@ namespace hal std::vector m_includes; - GateLibrary(const GateLibrary&) = delete; + GateLibrary(const GateLibrary&) = delete; GateLibrary& operator=(const GateLibrary&) = delete; u32 get_unique_gate_type_id(); diff --git a/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h b/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h index 0f492e03ec0..c74f6395396 100644 --- a/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h +++ b/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h @@ -1,20 +1,20 @@ // MIT License -// +// // Copyright (c) 2019 Ruhr University Bochum, Chair for Embedded Security. All Rights reserved. // Copyright (c) 2019 Marc Fyrbiak, Sebastian Wallat, Max Hoffmann ("ORIGINAL AUTHORS"). All rights reserved. // Copyright (c) 2021 Max Planck Institute for Security and Privacy. All Rights reserved. // Copyright (c) 2021 Jörn Langheinrich, Julian Speith, Nils Albartus, René Walendy, Simon Klix ("ORIGINAL AUTHORS"). All Rights reserved. -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -40,8 +40,18 @@ namespace hal * @param[in] component - Another component to be added as a child component. * @param[in] next_state_bf - The function describing the internal state. * @param[in] clock_bf - The function describing the clock input. + * @param[in] async_reset_bf - The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. + * @param[in] async_set_bf - The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. + * @param[in] behav_state - The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. + * @param[in] behav_neg_state - The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. */ - FFComponent(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf); + FFComponent(std::unique_ptr component, + const BooleanFunction& next_state_bf, + const BooleanFunction& clock_bf, + const BooleanFunction& async_reset_bf = BooleanFunction(), + const BooleanFunction& async_set_bf = BooleanFunction(), + const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, + const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef); /** * Get the type of the gate type component. diff --git a/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h b/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h index 981ad4b4627..839250b79ef 100644 --- a/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h +++ b/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h @@ -27,6 +27,7 @@ #include "hal_core/defines.h" #include "hal_core/netlist/boolean_function.h" +#include "hal_core/netlist/gate_library/enums/async_set_reset_behavior.h" #include #include @@ -71,9 +72,19 @@ namespace hal * @param[in] component - Another component to be added as a child component. * @param[in] next_state_bf - The function describing the internal state. * @param[in] clock_bf - The function describing the clock input. + * @param[in] async_reset_bf - The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. + * @param[in] async_set_bf - The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. + * @param[in] behav_state - The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. + * @param[in] behav_neg_state - The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. * @returns The FFComponent. */ - static std::unique_ptr create_ff_component(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf); + static std::unique_ptr create_ff_component(std::unique_ptr component, + const BooleanFunction& next_state_bf, + const BooleanFunction& clock_bf, + const BooleanFunction& async_reset_bf = BooleanFunction(), + const BooleanFunction& async_set_bf = BooleanFunction(), + const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, + const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef); /** * Create a new LatchComponent with given child component and the Boolean functions describing the data input and the enable signal. diff --git a/src/netlist/gate_library/gate_type_component/ff_component.cpp b/src/netlist/gate_library/gate_type_component/ff_component.cpp index db49b5d313a..d138ff25c57 100644 --- a/src/netlist/gate_library/gate_type_component/ff_component.cpp +++ b/src/netlist/gate_library/gate_type_component/ff_component.cpp @@ -2,8 +2,15 @@ namespace hal { - FFComponent::FFComponent(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf) - : m_component(std::move(component)), m_next_state_bf(next_state_bf.clone()), m_clock_bf(clock_bf.clone()) + FFComponent::FFComponent(std::unique_ptr component, + const BooleanFunction& next_state_bf, + const BooleanFunction& clock_bf, + const BooleanFunction& async_reset_bf, + const BooleanFunction& async_set_bf, + const AsyncSetResetBehavior behav_state, + const AsyncSetResetBehavior behav_neg_state) + : m_component(std::move(component)), m_next_state_bf(next_state_bf.clone()), m_clock_bf(clock_bf.clone()), m_async_reset_bf(async_reset_bf.clone()), m_async_set_bf(async_set_bf.clone()), + m_async_set_reset_behavior(std::make_pair(behav_state, behav_neg_state)) { } diff --git a/src/netlist/gate_library/gate_type_component/gate_type_component.cpp b/src/netlist/gate_library/gate_type_component/gate_type_component.cpp index 1b65c586c21..c056b4332d6 100644 --- a/src/netlist/gate_library/gate_type_component/gate_type_component.cpp +++ b/src/netlist/gate_library/gate_type_component/gate_type_component.cpp @@ -31,9 +31,15 @@ namespace hal return std::make_unique(std::move(component), init_ascending); } - std::unique_ptr GateTypeComponent::create_ff_component(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf) + std::unique_ptr GateTypeComponent::create_ff_component(std::unique_ptr component, + const BooleanFunction& next_state_bf, + const BooleanFunction& clock_bf, + const BooleanFunction& async_reset_bf, + const BooleanFunction& async_set_bf, + const AsyncSetResetBehavior behav_state, + const AsyncSetResetBehavior behav_neg_state) { - return std::make_unique(std::move(component), next_state_bf.clone(), clock_bf.clone()); + return std::make_unique(std::move(component), next_state_bf, clock_bf, async_reset_bf, async_set_bf, behav_state, behav_neg_state); } std::unique_ptr GateTypeComponent::create_latch_component(std::unique_ptr component) @@ -75,7 +81,7 @@ namespace hal const BooleanFunction& enable_bf, bool is_write) { - return std::make_unique(std::move(component), data_group, addr_group, clock_bf.clone(), enable_bf.clone(), is_write); + return std::make_unique(std::move(component), data_group, addr_group, clock_bf, enable_bf, is_write); } GateTypeComponent* GateTypeComponent::get_component(const std::function& filter) const diff --git a/src/python_bindings/bindings/gate_library.cpp b/src/python_bindings/bindings/gate_library.cpp index a51437d02ce..59ecec9aa8a 100644 --- a/src/python_bindings/bindings/gate_library.cpp +++ b/src/python_bindings/bindings/gate_library.cpp @@ -68,14 +68,72 @@ namespace hal :rtype: tuple(str,str) )"); - // py_gate_library.def("create_gate_type", &GateLibrary::create_gate_type, py::arg("name"), py::arg("properties") = std::set(), R"( - // Create a new gate type, add it to the gate library, and return it. - - // :param str name: The name of the gate type. - // :param set[hal_py.GateTypeProperty] properties: The properties of the gate type. - // :returns: The new gate type instance on success, None otherwise. - // :rtype: hal_py.GateType - // )"); + py_gate_library.def( + "create_gate_type", + [](GateLibrary& self, const std::string& name, std::set properties = {GateTypeProperty::combinational}) -> GateType* { return self.create_gate_type(name, properties); }, + py::arg("name"), + py::arg("properties") = std::set({GateTypeProperty::combinational}), + R"( + Create a new gate type, add it to the gate library, and return it. + + :param str name: The name of the gate type. + :param set[hal_py.GateTypeProperty] properties: The properties of the gate type. Defaults to ``hal_py.GateTypeProperty.combinational``. + :returns: The new gate type instance on success, None otherwise. + :rtype: hal_py.GateType or None + )"); + + py_gate_library.def( + "create_ff_gate_type", + [](GateLibrary& self, + const std::string& name, + const std::string& state_identifier, + const std::string& neg_state_identifier, + const BooleanFunction& next_state_bf, + const BooleanFunction& clock_bf, + const BooleanFunction& async_reset_bf = BooleanFunction(), + const BooleanFunction& async_set_bf = BooleanFunction(), + const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, + const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef, + const std::string& init_category = "", + const std::string& init_identifier = "") -> GateType* { + std::unique_ptr init_component = nullptr; + if (!init_category.empty() && !init_identifier.empty()) + { + init_component = GateTypeComponent::create_init_component(init_category, {init_identifier}); + } + std::unique_ptr state_component = GateTypeComponent::create_state_component(std::move(init_component), state_identifier, neg_state_identifier); + std::unique_ptr ff_component = + GateTypeComponent::create_ff_component(std::move(state_component), next_state_bf, clock_bf, async_reset_bf, async_set_bf, behav_state, behav_neg_state); + return self.create_gate_type(name, {GateTypeProperty::sequential, GateTypeProperty::ff}, std::move(ff_component)); + }, + py::arg("name"), + py::arg("state_identifier"), + py::arg("neg_state_identifier"), + py::arg("next_state_bf"), + py::arg("clock_bf"), + py::arg("async_reset_bf") = BooleanFunction(), + py::arg("async_set_bf") = BooleanFunction(), + py::arg("behav_state") = AsyncSetResetBehavior::undef, + py::arg("behav_neg_state") = AsyncSetResetBehavior::undef, + py::arg("init_category") = "", + py::arg("init_identifier") = "", + R"( + Create a new gate type, add it to the gate library, and return it. + + :param str name: The name of the gate type. + :param str state_identifier: The identifier of the internal state. + :param str neg_state_identifier: The identifier of the negated internal state. + :param hal_py.BooleanFunction next_state_bf: The function describing the internal state. + :param hal_py.BooleanFunction clock_bf: The function describing the clock input. + :param hal_py.BooleanFunction async_reset_bf: The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. + :param hal_py.BooleanFunction async_set_bf: The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. + :param hal_py.AsyncSetResetBehavior behav_state: The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to ``AsyncSetResetBehavior::undef``. + :param hal_py.AsyncSetResetBehavior behav_neg_state: The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to ``AsyncSetResetBehavior::undef``. + :param str init_category: The initialization data category. Defaults to an empty string. + :param str init_identifier: The initialization data identifier. Defaults to an empty string. + :returns: The new flip-flop gate type instance on success, None otherwise. + :rtype: hal_py.GateType or None + )"); py_gate_library.def("contains_gate_type", &GateLibrary::contains_gate_type, py::arg("gate_type"), R"( Check whether the given gate type is contained in this library. From b389a7e5abb740e096b2a56e4289d9203072ed7c Mon Sep 17 00:00:00 2001 From: SJulianS Date: Fri, 24 Mar 2023 12:22:48 +0100 Subject: [PATCH 2/2] reduce parameters - async set/reset can be changed by retreiving component from gate type --- .../gate_type_component/ff_component.h | 12 +----------- .../gate_type_component/gate_type_component.h | 12 +----------- .../gate_type_component/ff_component.cpp | 11 ++--------- .../gate_type_component.cpp | 10 ++-------- src/python_bindings/bindings/gate_library.cpp | 19 +++---------------- 5 files changed, 9 insertions(+), 55 deletions(-) diff --git a/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h b/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h index c74f6395396..a9ec81a2c32 100644 --- a/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h +++ b/include/hal_core/netlist/gate_library/gate_type_component/ff_component.h @@ -40,18 +40,8 @@ namespace hal * @param[in] component - Another component to be added as a child component. * @param[in] next_state_bf - The function describing the internal state. * @param[in] clock_bf - The function describing the clock input. - * @param[in] async_reset_bf - The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. - * @param[in] async_set_bf - The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. - * @param[in] behav_state - The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. - * @param[in] behav_neg_state - The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. */ - FFComponent(std::unique_ptr component, - const BooleanFunction& next_state_bf, - const BooleanFunction& clock_bf, - const BooleanFunction& async_reset_bf = BooleanFunction(), - const BooleanFunction& async_set_bf = BooleanFunction(), - const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, - const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef); + FFComponent(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf); /** * Get the type of the gate type component. diff --git a/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h b/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h index 839250b79ef..cd46251e6ed 100644 --- a/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h +++ b/include/hal_core/netlist/gate_library/gate_type_component/gate_type_component.h @@ -72,19 +72,9 @@ namespace hal * @param[in] component - Another component to be added as a child component. * @param[in] next_state_bf - The function describing the internal state. * @param[in] clock_bf - The function describing the clock input. - * @param[in] async_reset_bf - The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. - * @param[in] async_set_bf - The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. - * @param[in] behav_state - The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. - * @param[in] behav_neg_state - The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to `AsyncSetResetBehavior::undef`. * @returns The FFComponent. */ - static std::unique_ptr create_ff_component(std::unique_ptr component, - const BooleanFunction& next_state_bf, - const BooleanFunction& clock_bf, - const BooleanFunction& async_reset_bf = BooleanFunction(), - const BooleanFunction& async_set_bf = BooleanFunction(), - const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, - const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef); + static std::unique_ptr create_ff_component(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf); /** * Create a new LatchComponent with given child component and the Boolean functions describing the data input and the enable signal. diff --git a/src/netlist/gate_library/gate_type_component/ff_component.cpp b/src/netlist/gate_library/gate_type_component/ff_component.cpp index d138ff25c57..db49b5d313a 100644 --- a/src/netlist/gate_library/gate_type_component/ff_component.cpp +++ b/src/netlist/gate_library/gate_type_component/ff_component.cpp @@ -2,15 +2,8 @@ namespace hal { - FFComponent::FFComponent(std::unique_ptr component, - const BooleanFunction& next_state_bf, - const BooleanFunction& clock_bf, - const BooleanFunction& async_reset_bf, - const BooleanFunction& async_set_bf, - const AsyncSetResetBehavior behav_state, - const AsyncSetResetBehavior behav_neg_state) - : m_component(std::move(component)), m_next_state_bf(next_state_bf.clone()), m_clock_bf(clock_bf.clone()), m_async_reset_bf(async_reset_bf.clone()), m_async_set_bf(async_set_bf.clone()), - m_async_set_reset_behavior(std::make_pair(behav_state, behav_neg_state)) + FFComponent::FFComponent(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf) + : m_component(std::move(component)), m_next_state_bf(next_state_bf.clone()), m_clock_bf(clock_bf.clone()) { } diff --git a/src/netlist/gate_library/gate_type_component/gate_type_component.cpp b/src/netlist/gate_library/gate_type_component/gate_type_component.cpp index c056b4332d6..37be62a5f88 100644 --- a/src/netlist/gate_library/gate_type_component/gate_type_component.cpp +++ b/src/netlist/gate_library/gate_type_component/gate_type_component.cpp @@ -31,15 +31,9 @@ namespace hal return std::make_unique(std::move(component), init_ascending); } - std::unique_ptr GateTypeComponent::create_ff_component(std::unique_ptr component, - const BooleanFunction& next_state_bf, - const BooleanFunction& clock_bf, - const BooleanFunction& async_reset_bf, - const BooleanFunction& async_set_bf, - const AsyncSetResetBehavior behav_state, - const AsyncSetResetBehavior behav_neg_state) + std::unique_ptr GateTypeComponent::create_ff_component(std::unique_ptr component, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf) { - return std::make_unique(std::move(component), next_state_bf, clock_bf, async_reset_bf, async_set_bf, behav_state, behav_neg_state); + return std::make_unique(std::move(component), next_state_bf, clock_bf); } std::unique_ptr GateTypeComponent::create_latch_component(std::unique_ptr component) diff --git a/src/python_bindings/bindings/gate_library.cpp b/src/python_bindings/bindings/gate_library.cpp index 59ecec9aa8a..e4c91428a5f 100644 --- a/src/python_bindings/bindings/gate_library.cpp +++ b/src/python_bindings/bindings/gate_library.cpp @@ -90,20 +90,15 @@ namespace hal const std::string& neg_state_identifier, const BooleanFunction& next_state_bf, const BooleanFunction& clock_bf, - const BooleanFunction& async_reset_bf = BooleanFunction(), - const BooleanFunction& async_set_bf = BooleanFunction(), - const AsyncSetResetBehavior behav_state = AsyncSetResetBehavior::undef, - const AsyncSetResetBehavior behav_neg_state = AsyncSetResetBehavior::undef, - const std::string& init_category = "", - const std::string& init_identifier = "") -> GateType* { + const std::string& init_category = "", + const std::string& init_identifier = "") -> GateType* { std::unique_ptr init_component = nullptr; if (!init_category.empty() && !init_identifier.empty()) { init_component = GateTypeComponent::create_init_component(init_category, {init_identifier}); } std::unique_ptr state_component = GateTypeComponent::create_state_component(std::move(init_component), state_identifier, neg_state_identifier); - std::unique_ptr ff_component = - GateTypeComponent::create_ff_component(std::move(state_component), next_state_bf, clock_bf, async_reset_bf, async_set_bf, behav_state, behav_neg_state); + std::unique_ptr ff_component = GateTypeComponent::create_ff_component(std::move(state_component), next_state_bf, clock_bf); return self.create_gate_type(name, {GateTypeProperty::sequential, GateTypeProperty::ff}, std::move(ff_component)); }, py::arg("name"), @@ -111,10 +106,6 @@ namespace hal py::arg("neg_state_identifier"), py::arg("next_state_bf"), py::arg("clock_bf"), - py::arg("async_reset_bf") = BooleanFunction(), - py::arg("async_set_bf") = BooleanFunction(), - py::arg("behav_state") = AsyncSetResetBehavior::undef, - py::arg("behav_neg_state") = AsyncSetResetBehavior::undef, py::arg("init_category") = "", py::arg("init_identifier") = "", R"( @@ -125,10 +116,6 @@ namespace hal :param str neg_state_identifier: The identifier of the negated internal state. :param hal_py.BooleanFunction next_state_bf: The function describing the internal state. :param hal_py.BooleanFunction clock_bf: The function describing the clock input. - :param hal_py.BooleanFunction async_reset_bf: The Boolean function describing the asynchronous reset behavior of the flip-flop. Defaults to an empty Boolean function. - :param hal_py.BooleanFunction async_set_bf: The Boolean function describing the asynchronous set behavior of the flip-flop. Defaults to an empty Boolean function. - :param hal_py.AsyncSetResetBehavior behav_state: The behavior of the internal state when both asynchronous set and reset are active at the same time. Defaults to ``AsyncSetResetBehavior::undef``. - :param hal_py.AsyncSetResetBehavior behav_neg_state: The behavior of the negated internal state when both asynchronous set and reset are active at the same time. Defaults to ``AsyncSetResetBehavior::undef``. :param str init_category: The initialization data category. Defaults to an empty string. :param str init_identifier: The initialization data identifier. Defaults to an empty string. :returns: The new flip-flop gate type instance on success, None otherwise.