|
HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
|
#include </home/runner/work/hal/hal/plugins/simulator/verilator/include/verilator/verilator.h>


Public Member Functions | |
| VerilatorEngine (const std::string &nam) | |
| bool | setSimulationInput (SimulationInput *simInput) override |
| int | numberCommandLines () const override |
| std::vector< std::string > | commandLine (int lineIndex) const override |
| bool | finalize () override |
Public Member Functions inherited from hal::SimulationEngineScripted | |
| SimulationEngineScripted (const std::string &nam) | |
Public Member Functions inherited from hal::SimulationEngine | |
| SimulationEngine (const std::string &nam) | |
| virtual | ~SimulationEngine () |
| std::string | name () const |
| State | state () const |
| int | get_state () const |
| std::string | get_working_directory () const |
| void | set_working_directory (const std::string &workDir) |
| bool | clock_events_required () const |
| bool | can_share_memory () const |
| bool | install_saleae_parser (std::string dirname) const |
| virtual void | setResultFilename (const std::string filename) |
| std::string | get_result_filename () const |
| virtual void | failed () |
| virtual void | set_engine_property (const std::string &key, const std::string &value) |
| virtual std::string | get_engine_property (const std::string &key) |
| virtual const std::unordered_map< std::string, std::string > & | get_engine_properties () const |
| virtual SimulationInput * | get_simulation_input () const |
Public Attributes | |
| std::unique_ptr< Netlist > | m_partial_netlist |
| std::filesystem::path | m_simulator_dir |
| std::string | m_design_name |
Additional Inherited Members | |
Public Types inherited from hal::SimulationEngine | |
| enum | State { Failed = -1 , Done = 0 , Running = 1 , Preparing = 2 } |
Protected Attributes inherited from hal::SimulationEngine | |
| bool | mRequireClockEvents |
| bool | mCanShareMemory |
| std::string | mResultFilename |
| State | mState |
| std::unordered_map< std::string, std::string > | mProperties |
| SimulationInput * | mSimulationInput |
| std::string | mWorkDir |
A simulation engine that translates the netlist into Verilog and simulates it using Verilator.
Definition at line 161 of file verilator.h.
| hal::verilator::VerilatorEngine::VerilatorEngine | ( | const std::string & | nam | ) |
Definition at line 297 of file verilator.cpp.
References hal::SimulationEngine::mRequireClockEvents.
|
overridevirtual |
Must be implemented by derived class
Returns command and argument to be executed
| [in] | lineIndex | the line index of the script starting from 0 |
Implements hal::SimulationEngineScripted.
Definition at line 225 of file verilator.cpp.
References m_design_name, path_to_rapidjson_includedir, and path_to_verilator_executable.
|
overridevirtual |
Can be overwritten by derived class
Signals the engine that it is time for final steps (.e.g. writing VCD file) after simulation is done - that is: SimulationEngineEventDriven: all input events have been processed SimulationEngineScripted: all comands executed successfully
true if successful, false otherwise. Reimplemented from hal::SimulationEngine.
Definition at line 302 of file verilator.cpp.
References hal::SimulationEngine::Done, m_simulator_dir, hal::SimulationEngine::mResultFilename, and hal::SimulationEngine::mState.
|
overridevirtual |
Must be implemented by derived class
Returns the information how many command lines are to be executed
Implements hal::SimulationEngineScripted.
Definition at line 220 of file verilator.cpp.
|
overridevirtual |
Must be implemented by derived class
Will be called by controller to pass all relevant information to setup the simulation
| [in] | simInput | the input |
true if engine could be prepared successfully with given input, false otherwise. Implements hal::SimulationEngine.
Definition at line 120 of file verilator.cpp.
References hal::verilator::cleanup_gate_type_names(), hal::verilator::converter::convert_gate_library_to_verilog(), hal::SimulationEngine::get_engine_property(), hal::SimulationInput::get_gates(), hal::netlist_utils::get_partial_netlist(), hal::SimulationEngine::get_working_directory(), log_error, log_info, log_warning, m_design_name, m_partial_netlist, m_simulator_dir, hal::SimulationEngine::mSimulationInput, hal::verilator::remove_unwanted_parameters_from_netlist(), and hal::netlist_writer_manager::write().
| std::string hal::verilator::VerilatorEngine::m_design_name |
Definition at line 172 of file verilator.h.
Referenced by commandLine(), and setSimulationInput().
| std::unique_ptr<Netlist> hal::verilator::VerilatorEngine::m_partial_netlist |
Definition at line 169 of file verilator.h.
Referenced by setSimulationInput().
| std::filesystem::path hal::verilator::VerilatorEngine::m_simulator_dir |
Definition at line 170 of file verilator.h.
Referenced by finalize(), and setSimulationInput().