OpenASIP 2.2
Loading...
Searching...
No Matches
OperationContainer.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file OperationContainer.hh
26 *
27 * Declaration of OperationContainer class.
28 *
29 * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33#ifndef TTA_OPERATION_CONTAINER_HH
34#define TTA_OPERATION_CONTAINER_HH
35
36#include <string>
37
38#include "PluginTools.hh"
39#include "OperationContext.hh"
40#include "BaseType.hh"
41
42class Operation;
43class OperationIndex;
45class OperationModule;
47class IdealSRAM;
48
49/**
50 * Singleton class that holds necessary information for viewing operation
51 * properties, modifying operation behavior, and simulating operation
52 * behavior.
53 *
54 * Include also means to view and modify the contents of the memory.
55 */
57public:
61 static Memory& memory();
62
63 static void destroy();
64
65 static OperationModule& module(
66 const std::string& path,
67 const std::string& mod);
68
69 static Operation* operation(
70 const std::string& path,
71 const std::string& module,
72 const std::string& oper);
73
74 static bool operationExists(const std::string& name);
75
76 static bool isEffective(OperationModule& module, const std::string& name);
77
78 static Word memoryStart();
79 static Word memoryEnd();
80
81 virtual ~OperationContainer();
82
83private:
85 /// Copying not allowed.
87 /// Assignment not allowed.
89
90 /// Creation function name for operation behavior.
91 static const std::string CREATE_FUNCTION;
92 /// Operation behavior deletion function name.
93 static const std::string DELETE_FUNCTION;
94
95 /// Starting point of the memory.
96 static const Word MEMORY_START;
97 /// End point of the memory.
98 static const Word MEMORY_END;
99 /// MAU size of the memory.
100 static const Word MAUSIZE;
101
102 /// Contains information of operations.
104 /// Static instance of operation serializer.
106 /// Operation context used through the execution of the program.
108 /// Program counter.
110 /// Return address.
112 /// Sys call handler.
114 /// Sys call number.
116 /// Memory used througout the execution of the program.
118 /// PluginTools used by OperationContainer;
120};
121
122#endif
UInt32 InstructionAddress
Definition BaseType.hh:175
static const Word MEMORY_START
Starting point of the memory.
static IdealSRAM * memory_
Memory used througout the execution of the program.
static bool operationExists(const std::string &name)
static PluginTools tools_
PluginTools used by OperationContainer;.
static Memory & memory()
static OperationSerializer & operationSerializer()
static bool isEffective(OperationModule &module, const std::string &name)
static OperationContext & operationContext()
OperationContainer(const OperationContainer &)
Copying not allowed.
static OperationModule & module(const std::string &path, const std::string &mod)
static OperationContext context_
Operation context used through the execution of the program.
static Operation * operation(const std::string &path, const std::string &module, const std::string &oper)
static OperationIndex & operationIndex()
static OperationIndex * index_
Contains information of operations.
OperationContainer & operator=(const OperationContainer &)
Assignment not allowed.
static const std::string DELETE_FUNCTION
Operation behavior deletion function name.
static InstructionAddress programCounter_
Program counter.
static const std::string CREATE_FUNCTION
Creation function name for operation behavior.
static OperationSerializer * serializer_
Static instance of operation serializer.
static SimValue sysCallNumber_
Sys call number.
static const Word MEMORY_END
End point of the memory.
static SimValue returnAddress_
Return address.
static SimValue sysCallHandler_
Sys call handler.
static const Word MAUSIZE
MAU size of the memory.