From 498f592df436450387fbcabf7d251d648d38d08b Mon Sep 17 00:00:00 2001 From: "julian.speith" Date: Mon, 3 Jun 2024 20:28:12 +0200 Subject: [PATCH] documentation update --- .../dataflow_analysis/documentation/dataflow.rst | 12 ++++++------ .../include/dataflow_analysis/plugin_dataflow.h | 15 +++++++++++---- .../dataflow_analysis/python/python_bindings.cpp | 7 ++++--- plugins/dataflow_analysis/src/plugin_dataflow.cpp | 11 ++++++++--- 4 files changed, 29 insertions(+), 16 deletions(-) diff --git a/plugins/dataflow_analysis/documentation/dataflow.rst b/plugins/dataflow_analysis/documentation/dataflow.rst index a2cf8f91c2b..74b2779d820 100644 --- a/plugins/dataflow_analysis/documentation/dataflow.rst +++ b/plugins/dataflow_analysis/documentation/dataflow.rst @@ -1,16 +1,16 @@ Dataflow Analysis (DANA) ========================== -.. autoclass:: dataflow.DataflowPlugin - :members: +.. automodule:: dataflow + :members: analyze -.. autoclass:: dataflow.Dataflow.Configuration +.. autoclass:: dataflow.Configuration :members: .. automethod:: __init__ -.. autoclass:: dataflow.Dataflow.Result +.. autoclass:: dataflow.Result :members: -.. automodule:: dataflow.Dataflow - :members: analyze +.. autoclass:: dataflow.DataflowPlugin + :members: diff --git a/plugins/dataflow_analysis/include/dataflow_analysis/plugin_dataflow.h b/plugins/dataflow_analysis/include/dataflow_analysis/plugin_dataflow.h index d8ed093c014..20ad0529193 100644 --- a/plugins/dataflow_analysis/include/dataflow_analysis/plugin_dataflow.h +++ b/plugins/dataflow_analysis/include/dataflow_analysis/plugin_dataflow.h @@ -130,6 +130,13 @@ namespace hal */ std::string get_name() const override; + /** + * @brief Get the version of the plugin. + * + * @returns The version of the plugin. + */ + std::string get_version() const override; + /** * @brief Get a short description of the plugin. * @@ -138,10 +145,10 @@ namespace hal std::string get_description() const override; /** - * @brief Get the version of the plugin. - * - * @returns The version of the plugin. + * @brief Get the plugin dependencies. + * + * @returns A set of plugin names that this plugin depends on. */ - std::string get_version() const override; + std::set get_dependencies() const override; }; } // namespace hal diff --git a/plugins/dataflow_analysis/python/python_bindings.cpp b/plugins/dataflow_analysis/python/python_bindings.cpp index 3c53249814d..c5313ce7022 100644 --- a/plugins/dataflow_analysis/python/python_bindings.cpp +++ b/plugins/dataflow_analysis/python/python_bindings.cpp @@ -12,13 +12,14 @@ namespace hal #ifdef PYBIND11_MODULE PYBIND11_MODULE(dataflow, m) { - m.doc() = "hal DataflowPlugin python bindings"; + m.doc() = "Dataflow analysis tool DANA to recover word-level structures such as registers from gate-level netlists."; #else PYBIND11_PLUGIN(dataflow) { - py::module m("dataflow", "hal DataflowPlugin python bindings"); + py::module m("dataflow", "Dataflow analysis tool DANA to recover word-level structures such as registers from gate-level netlists."); #endif // ifdef PYBIND11_MODULE - py::class_, BasePluginInterface> py_dataflow_plugin(m, "DataflowPlugin"); + py::class_, BasePluginInterface> py_dataflow_plugin( + m, "DataflowPlugin", R"(This class provides an interface to integrate the DANA tool as a plugin within the HAL framework.)"); py_dataflow_plugin.def_property_readonly("name", &DataflowPlugin::get_name, R"( The name of the plugin. diff --git a/plugins/dataflow_analysis/src/plugin_dataflow.cpp b/plugins/dataflow_analysis/src/plugin_dataflow.cpp index 6debf7694b8..efdab1d47ac 100644 --- a/plugins/dataflow_analysis/src/plugin_dataflow.cpp +++ b/plugins/dataflow_analysis/src/plugin_dataflow.cpp @@ -21,14 +21,19 @@ namespace hal return std::string("dataflow"); } + std::string DataflowPlugin::get_version() const + { + return std::string("0.3"); + } + std::string DataflowPlugin::get_description() const { - return "Dataflow analysis for gate-level netlist reverse engineering"; + return "Dataflow analysis tool DANA to recover word-level structures such as registers from gate-level netlists."; } - std::string DataflowPlugin::get_version() const + std::set DataflowPlugin::get_dependencies() const { - return std::string("0.3"); + return {}; } DataflowPlugin::DataflowPlugin()