OpenASIP
2.0
|
#include <OperationContainer.hh>
Public Member Functions | |
virtual | ~OperationContainer () |
Static Public Member Functions | |
static OperationIndex & | operationIndex () |
static OperationSerializer & | operationSerializer () |
static OperationContext & | operationContext () |
static Memory & | memory () |
static void | destroy () |
static OperationModule & | module (const std::string &path, const std::string &mod) |
static Operation * | operation (const std::string &path, const std::string &module, const std::string &oper) |
static bool | operationExists (const std::string &name) |
static bool | isEffective (OperationModule &module, const std::string &name) |
static Word | memoryStart () |
static Word | memoryEnd () |
Private Member Functions | |
OperationContainer () | |
OperationContainer (const OperationContainer &) | |
Copying not allowed. More... | |
OperationContainer & | operator= (const OperationContainer &) |
Assignment not allowed. More... | |
Static Private Attributes | |
static const std::string | CREATE_FUNCTION = "createOpBehavior_" |
Creation function name for operation behavior. More... | |
static const std::string | DELETE_FUNCTION = "deleteOpBehavior_" |
Operation behavior deletion function name. More... | |
static const Word | MEMORY_START = 0 |
Starting point of the memory. More... | |
static const Word | MEMORY_END = 65535 |
End point of the memory. More... | |
static const Word | MAUSIZE = 8 |
MAU size of the memory. More... | |
static OperationIndex * | index_ = NULL |
Contains information of operations. More... | |
static OperationSerializer * | serializer_ = NULL |
Static instance of operation serializer. More... | |
static OperationContext | context_ |
Operation context used through the execution of the program. More... | |
static InstructionAddress | programCounter_ |
Program counter. More... | |
static SimValue | returnAddress_ |
Return address. More... | |
static SimValue | sysCallHandler_ |
Sys call handler. More... | |
static SimValue | sysCallNumber_ |
Sys call number. More... | |
static IdealSRAM * | memory_ |
Memory used througout the execution of the program. More... | |
static PluginTools | tools_ |
PluginTools used by OperationContainer;. More... | |
Singleton class that holds necessary information for viewing operation properties, modifying operation behavior, and simulating operation behavior.
Include also means to view and modify the contents of the memory.
Definition at line 56 of file OperationContainer.hh.
|
virtual |
|
private |
|
private |
Copying not allowed.
|
static |
This function is called to clean up the static objects.
This function should be called only when application is closed.
Definition at line 280 of file OperationContainer.cc.
References index_, memory_, and serializer_.
Referenced by OSEd::OnExit().
|
static |
Returns true if operation is effective.
Effective means that is is found first in list of search paths.
module | The module in which operation is defined. |
name | The name of the operation. |
Definition at line 244 of file OperationContainer.cc.
References assert, module(), OperationIndex::module(), OperationIndex::moduleCount(), OperationIndex::operationCount(), operationIndex(), OperationIndex::operationName(), OperationIndex::path(), and OperationIndex::pathCount().
Referenced by OSEdInfoView::operationView().
|
static |
Returns the memory model instance.
Definition at line 134 of file OperationContainer.cc.
References memory_.
Referenced by MemoryDialog::createContents(), and SimulateDialog::onAdvanceClock().
|
static |
Returns the end point of the memory.
Definition at line 314 of file OperationContainer.cc.
References MEMORY_END.
|
static |
Returns the start point of the memory.
Definition at line 304 of file OperationContainer.cc.
References MEMORY_START.
|
static |
Returns a certain module in a certain path.
If module is not found, a NullOperationModule is returned.
path | The name of the path. |
mod | The name of the module. |
Definition at line 148 of file OperationContainer.cc.
References NullOperationModule::instance(), OperationIndex::module(), OperationIndex::moduleCount(), OperationModule::name(), and operationIndex().
Referenced by OSEdAddOperationCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdBuildCmd::Do(), OSEdModifyBehaviorCmd::Do(), OSEdPropertiesCmd::Do(), OSEdRemoveModuleCmd::Do(), isEffective(), OSEdBuildCmd::isEnabled(), AddModuleDialog::onOk(), operation(), and OSEdInfoView::operationView().
|
static |
Returns a certain operation in a certain module and a path.
If operation is not found, NULL is returned.
path | The name of the path. |
mod | The name of the module. |
oper | The name of the operation. |
Definition at line 173 of file OperationContainer.cc.
References OperationIndex::addPath(), assert, ObjectState::child(), ObjectState::childCount(), NullOperationModule::instance(), NullOperationBehavior::instance(), Operation::loadState(), module(), operationSerializer(), OperationModule::propertiesModule(), OperationSerializer::readState(), Operation::setBehavior(), OperationSerializer::setSourceFile(), and ObjectState::stringAttribute().
Referenced by OSEdAddOperationCmd::Do(), OSEdInfoView::operationPropertyView(), OSEdTreeView::selectedOperation(), and OperationPropertyDialog::updateOperation().
|
static |
Returns the instance of OperationContext.
Definition at line 124 of file OperationContainer.cc.
References context_.
Referenced by SimulateDialog::createState(), SimulateDialog::onAdvanceClock(), SimulateDialog::onReset(), SimulateDialog::onTrigger(), SimulateDialog::SimulateDialog(), and SimulateDialog::~SimulateDialog().
|
static |
Returns true if operation exists.
name | The name of the operation. |
Definition at line 219 of file OperationContainer.cc.
References OperationIndex::module(), OperationIndex::moduleCount(), OperationIndex::operationCount(), operationIndex(), and OperationIndex::operationName().
Referenced by OperationPropertyDialog::onAddAffectedBy(), and OperationPropertyDialog::onAddAffects().
|
static |
Returns the instance of OperationIndex.
Definition at line 94 of file OperationContainer.cc.
References OperationIndex::addPath(), index_, and Environment::osalPaths().
Referenced by OSEdTreeView::constructTree(), OSEdBuildAllCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), OSEdAddModuleCmd::Do(), OSEdRemoveModuleCmd::Do(), OSEdAddOperationCmd::Do(), isEffective(), OSEdBuildAllCmd::isEnabled(), module(), OSEdInfoView::moduleView(), operationExists(), OSEdInfoView::operationView(), and OperationPropertyDialog::updateAffected().
|
static |
Returns the instance of OperationSerializer.
Definition at line 111 of file OperationContainer.cc.
References serializer_.
Referenced by OSEdTreeView::constructTree(), OSEdAddOperationCmd::Do(), OSEdRemoveOperationCmd::Do(), OSEdPropertiesCmd::Do(), OSEdAddModuleCmd::Do(), and operation().
|
private |
Assignment not allowed.
|
staticprivate |
Operation context used through the execution of the program.
Definition at line 107 of file OperationContainer.hh.
Referenced by operationContext().
|
staticprivate |
Creation function name for operation behavior.
Definition at line 91 of file OperationContainer.hh.
|
staticprivate |
Operation behavior deletion function name.
Definition at line 93 of file OperationContainer.hh.
|
staticprivate |
Contains information of operations.
Definition at line 103 of file OperationContainer.hh.
Referenced by destroy(), and operationIndex().
|
staticprivate |
MAU size of the memory.
Definition at line 100 of file OperationContainer.hh.
|
staticprivate |
Memory used througout the execution of the program.
Definition at line 117 of file OperationContainer.hh.
|
staticprivate |
End point of the memory.
Definition at line 98 of file OperationContainer.hh.
Referenced by memoryEnd().
|
staticprivate |
Starting point of the memory.
Definition at line 96 of file OperationContainer.hh.
Referenced by memoryStart().
|
staticprivate |
Program counter.
Definition at line 109 of file OperationContainer.hh.
|
staticprivate |
Return address.
Definition at line 111 of file OperationContainer.hh.
|
staticprivate |
Static instance of operation serializer.
Definition at line 105 of file OperationContainer.hh.
Referenced by destroy(), and operationSerializer().
|
staticprivate |
Sys call handler.
Definition at line 113 of file OperationContainer.hh.
|
staticprivate |
Sys call number.
Definition at line 115 of file OperationContainer.hh.
|
staticprivate |
PluginTools used by OperationContainer;.
Definition at line 119 of file OperationContainer.hh.