-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
343 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 29 additions & 2 deletions
31
plugins/netlist_modifier/include/netlist_modifier/netlist_modifier.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,52 @@ | ||
#pragma once | ||
#include "hal_core/defines.h" | ||
#include "hal_core/plugin_system/plugin_interface_base.h" | ||
#include "hal_core/plugin_system/gui_extension_interface.h" | ||
#include "hal_core/utilities/result.h" | ||
#include "hal_core/netlist/netlist.h" | ||
|
||
namespace hal | ||
{ | ||
class GuiExtensionNetlistModifier; | ||
|
||
class PLUGIN_API NetlistModifierPlugin : public BasePluginInterface | ||
{ | ||
GuiExtensionNetlistModifier* m_gui_extension; | ||
|
||
public: | ||
std::string get_name() const override; | ||
std::string get_version() const override; | ||
void initialize() override; | ||
|
||
NetlistModifierPlugin(){}; | ||
void on_load() override; | ||
void on_unload() override; | ||
|
||
std::set<std::string> get_dependencies() const override; | ||
|
||
NetlistModifierPlugin(); | ||
|
||
bool create_modified_netlist(); | ||
|
||
Netlist* modified_netlist_pointer = nullptr; | ||
static Netlist* modified_netlist_pointer; | ||
private: | ||
|
||
bool replace_gates(); | ||
}; | ||
|
||
|
||
|
||
class GuiExtensionNetlistModifier : public GuiExtensionInterface | ||
{ | ||
std::vector<PluginParameter> m_parameter; | ||
|
||
public: | ||
NetlistModifierPlugin* m_parent; | ||
|
||
GuiExtensionNetlistModifier(); | ||
|
||
std::vector<PluginParameter> get_parameter() const override; | ||
|
||
void set_parameter(const std::vector<PluginParameter>& params) override; | ||
|
||
}; | ||
} // namespace hal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
option(PL_NETLIST_SIMULATOR_STUDY "PL_NETLIST_SIMULATOR_STUDY" OFF) | ||
|
||
if(PL_NETLIST_SIMULATOR_STUDY OR BUILD_ALL_PLUGINS) | ||
file(GLOB_RECURSE NETLIST_SIMULATOR_STUDY_INC ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h) | ||
file(GLOB_RECURSE NETLIST_SIMULATOR_STUDY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) | ||
file(GLOB_RECURSE NETLIST_SIMULATOR_STUDY_PYTHON_SRC ${CMAKE_CURRENT_SOURCE_DIR}/python/*.cpp) | ||
|
||
hal_add_plugin(netlist_simulator_study | ||
SHARED | ||
HEADER ${NETLIST_SIMULATOR_STUDY_INC} | ||
SOURCES ${NETLIST_SIMULATOR_STUDY_SRC} ${NETLIST_SIMULATOR_STUDY_PYTHON_SRC} | ||
LINK_LIBRARIES PUBLIC gui netlist_simulator_controller | ||
PYDOC SPHINX_DOC_INDEX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/documentation/netlist_simulator_study.rst | ||
) | ||
endif() |
Empty file.
49 changes: 49 additions & 0 deletions
49
plugins/netlist_simulator_study/include/netlist_simulator_study/netlist_simulator_study.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
|
||
#include "hal_core/plugin_system/plugin_interface_base.h" | ||
#include "hal_core/plugin_system/gui_extension_interface.h" | ||
|
||
|
||
namespace hal | ||
{ | ||
class NetlistSimulatorController; | ||
class GuiExtensionNetlistSimulatorStudy; | ||
|
||
class PLUGIN_API NetlistSimulatorStudyPlugin : public BasePluginInterface | ||
{ | ||
GuiExtensionNetlistSimulatorStudy* m_gui_extension; | ||
std::unique_ptr<NetlistSimulatorController> m_simul_controller; | ||
public: | ||
std::unique_ptr<Netlist> m_original_netlist; | ||
NetlistSimulatorStudyPlugin(); | ||
|
||
std::string get_name() const override; | ||
std::string get_version() const override; | ||
|
||
void on_load() override; | ||
void on_unload() override; | ||
|
||
/** | ||
* Returns plugin dependencies (GUI, simulation controller, verilator, waveform viewer) | ||
*/ | ||
std::set<std::string> get_dependencies() const override; | ||
|
||
bool simulate(std::filesystem::path sim_input); | ||
|
||
}; | ||
|
||
class GuiExtensionNetlistSimulatorStudy : public GuiExtensionInterface | ||
{ | ||
std::vector<PluginParameter> m_parameter; | ||
|
||
public: | ||
NetlistSimulatorStudyPlugin* m_parent; | ||
|
||
GuiExtensionNetlistSimulatorStudy(); | ||
|
||
std::vector<PluginParameter> get_parameter() const override; | ||
|
||
void set_parameter(const std::vector<PluginParameter>& params) override; | ||
|
||
}; | ||
} // namespace hal |
Oops, something went wrong.