ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Classes | Functions
ETISS_Frontend

Classes

class  etiss::Initializer
 Wrapper for the initialize and shutdown of the ETISS environment. More...
 

Functions

std::set< std::string > etiss::listCPUArchs ()
 Create a set with all identifier names of the known CPUArch plug-ins. More...
 
std::set< std::string > etiss::listJITs ()
 Create a set with all identifier names of the known JIT plug-ins. More...
 
std::set< std::string > etiss::listPlugins ()
 Create a set with all identifier names of the known plug-ins. More...
 
void etiss::preloadLibraries ()
 Search and try to load libraries. More...
 
std::shared_ptr< JITetiss::getJIT (std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 Get a present JIT plug-in by name. More...
 
std::shared_ptr< CPUArchetiss::getCPUArch (std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 Get a present CPUArch plug-in by name. More...
 
std::shared_ptr< Pluginetiss::getPlugin (std::string name, std::map< std::string, std::string > options=std::map< std::string, std::string >())
 Get a present Plugin plug-in by name. More...
 
bool etiss::loadLibrary (std::string path, std::string name)
 Load a library. More...
 
void etiss::addLibrary (std::shared_ptr< etiss::LibraryInterface > libInterface)
 Add a LibraryInterface to the ETISS environment. More...
 
std::set< std::string > etiss::listLibraries ()
 Create a set with strings of the library names and some information appended in square brackets. More...
 
std::set< std::string > etiss::listLibraryPrefixes ()
 Create a set with strings of the library names. More...
 
void etiss::initialize (std::vector< std::string > &args)
 Initialize and configure ETISS. More...
 
std::shared_ptr< etiss::JITetiss::getDefaultJIT ()
 Get the default JIT implementation. More...
 
void etiss::shutdown ()
 Shutdown ETISS. More...
 
std::string etiss::errorMessage (etiss::int32 code, CPUArch *arch=0)
 Get the error message for an error code for a specific CPUArch plug-in. More...
 

Detailed Description

Function Documentation

◆ addLibrary()

void etiss::addLibrary ( std::shared_ptr< etiss::LibraryInterface libInterface)

Add a LibraryInterface to the ETISS environment.

Before a library can be use within ETISS the library needs to be added to ETISS.

Parameters
interfacePointer to the LibraryInterface of the library to be added.
See also
LibraryInteface.h

Definition at line 301 of file ETISS.cpp.

References etiss_defaultjit_, etiss_libraries_, etiss_libraries_mu_, and etiss::forceInitialization().

Referenced by etiss_initialize(), and etiss::loadLibrary().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ errorMessage()

std::string etiss::errorMessage ( etiss::int32  code,
CPUArch arch = 0 
)

Get the error message for an error code for a specific CPUArch plug-in.

Todo:
add error message interface to etiss::CPUArch

TODO: cpu arch error message function

Definition at line 991 of file ETISS.cpp.

References etiss::CPUArch::getName().

Here is the call graph for this function:

◆ getCPUArch()

std::shared_ptr< CPUArch > etiss::getCPUArch ( std::string  name,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)

Get a present CPUArch plug-in by name.

Parameters
nameString of the plug-in name.
optionsA key value map with the options required to load the plug-in.
Returns
Pointer to the plug-in.

Definition at line 197 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, etiss::log(), and options.

Referenced by etiss::CPUCore::create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDefaultJIT()

std::shared_ptr< etiss::JIT > etiss::getDefaultJIT ( )

Get the default JIT implementation.

The default JIT implementation, is the first loaded JIT plug-in.

Returns
Pointer to the JIT plug-in.

Definition at line 344 of file ETISS.cpp.

References etiss_defaultjit_, and etiss::getJIT().

Referenced by etiss::Initializer::loadIniJIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getJIT()

std::shared_ptr< JIT > etiss::getJIT ( std::string  name,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)

Get a present JIT plug-in by name.

Parameters
nameString of the plug-in name.
optionsA key value map with the options required to load the plug-in.
Returns
Pointer to the plug-in.

Definition at line 153 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, etiss::log(), and options.

Referenced by etiss::getDefaultJIT(), and etiss::Initializer::loadIniJIT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPlugin()

std::shared_ptr< Plugin > etiss::getPlugin ( std::string  name,
std::map< std::string, std::string >  options = std::map<std::string, std::string>() 
)

Get a present Plugin plug-in by name.

Parameters
nameString of the plug-in name.
optionsA key value map with the options required to load the plug-in.
Returns
Pointer to the plug-in.

Definition at line 241 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, etiss::INFO, etiss::log(), and options.

Referenced by etiss::Initializer::loadIniPlugins().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize()

void etiss::initialize ( std::vector< std::string > &  args)

Initialize and configure ETISS.

Attention
It is recommended to use etiss::Initializer instead of calling etiss::initialize / etiss::shutdown manually

Definition at line 881 of file ETISS.cpp.

References get_metrics::args, and etiss_initialize().

Referenced by etiss::Initializer::Initializer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listCPUArchs()

std::set< std::string > etiss::listCPUArchs ( )

Create a set with all identifier names of the known CPUArch plug-ins.

See also
CPUArch
Returns
A set with the identifier strings.

Definition at line 69 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, and etiss::log().

Here is the call graph for this function:

◆ listJITs()

std::set< std::string > etiss::listJITs ( )

Create a set with all identifier names of the known JIT plug-ins.

See also
JIT
Returns
A set with the identifier strings.

Definition at line 97 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, and etiss::log().

Here is the call graph for this function:

◆ listLibraries()

std::set< std::string > etiss::listLibraries ( )

Create a set with strings of the library names and some information appended in square brackets.

Note
Use etiss::listLibraryPrefixes to get the raw library names.
Returns
A set with the strings.

Definition at line 322 of file ETISS.cpp.

References etiss_libraries_, and etiss_libraries_mu_.

◆ listLibraryPrefixes()

std::set< std::string > etiss::listLibraryPrefixes ( )

Create a set with strings of the library names.

The library names are also required to be used as prefixes to symbols (library name + '_': e.g. ETISSINCLUDED_exportedSymbol).

Returns
A set with the strings.

Definition at line 333 of file ETISS.cpp.

References etiss_libraries_, and etiss_libraries_mu_.

◆ listPlugins()

std::set< std::string > etiss::listPlugins ( )

Create a set with all identifier names of the known plug-ins.

See also
Plugin
Returns
A set with the identifier strings.

Definition at line 125 of file ETISS.cpp.

References etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, and etiss::log().

Here is the call graph for this function:

◆ loadLibrary()

bool etiss::loadLibrary ( std::string  path,
std::string  name 
)

Load a library.

The library needs to be an implementation of etiss::CPUArch, etiss::JIT or etiss::Plugin. A Library interface is created for the library with etiss::LibraryInterface::openSharedLibrary and added to the ETISS environment with etiss::addLibrary.

Parameters
pathString of the library location. E.g. "/path/to/lib"
nameString of the library name. The library name is the file name of the library without the lib prefix and the file extension. E.g. for libOR1KArch.so the name is OR1KArch.
Returns
True if the operation was successful or false otherwise.

Definition at line 288 of file ETISS.cpp.

References etiss::addLibrary(), and etiss::LibraryInterface::openSharedLibrary().

Referenced by loadLibraryList(), and etiss::preloadLibraries().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ preloadLibraries()

void etiss::preloadLibraries ( )

Search and try to load libraries.

This function is called automatically by CPUCore::create(1).

See also
ETISSInit.cpp

Definition at line 192 of file ETISSInit.cpp.

References etiss::cfg(), etiss_preload_libraries, findLibs(), etiss::Configuration::get(), etiss::installDir(), etiss::loadLibrary(), and loadLibraryList().

Referenced by etiss_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shutdown()

void etiss::shutdown ( )

Shutdown ETISS.

This function shutsdown the ETISS environment. All used libraries are unloaded and the used resources are released.

Attention
It is recommende to use etiss::Initializer instead of calling etiss::initialize / etiss::shutdown manually

Definition at line 914 of file ETISS.cpp.

References etiss::fault::Stressor::clear(), etiss::ERROR, etiss_libraries_, etiss_libraries_mu_, etiss_shutdownOk, etiss::CPUCore::list(), etiss::log(), and etiss::py::shutdown().

Referenced by etiss_shutdown(), and etiss::Initializer::~Initializer().

Here is the call graph for this function:
Here is the caller graph for this function: