OpenASIP 2.2
Loading...
Searching...
No Matches
ExecutableInstruction.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 ExecutableInstruction.hh
26 *
27 * Declaration of ExecutableInstruction class.
28 *
29 * @author Jussi Nykänen 2005 (nykanen-no.spam-cs.tut.fi)
30 * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
31 * @note rating: red
32 */
33
34#ifndef TTA_EXECUTABLE_INSTRUCTION_HH
35#define TTA_EXECUTABLE_INSTRUCTION_HH
36
37#include <vector>
38#include "SimulatorConstants.hh"
39
40class ExecutableMove;
42
43/**
44 * Represents an interpreted TTA instruction.
45 *
46 * This class is used to simulate the data transports performed by a TTA
47 * instruction.
48 */
50public:
52 virtual ~ExecutableInstruction();
53
56
57 void execute();
58
60 ClockCycleCount moveExecutionCount(std::size_t moveIndex) const;
62
63 bool moveSquashed(std::size_t moveIndex) const;
64
65 void setExitPoint(bool b);
66 bool isExitPoint() const;
67
68private:
69 /// Copying not allowed.
71 /// Assignment not allowed.
73 /// Contains ExecutableMoves.
74 typedef std::vector<ExecutableMove*> MoveContainer;
75 /// Contains long immediate update actions.
76 typedef std::vector<LongImmUpdateAction*> UpdateContainer;
77 /// All moves of the instruction.
79 /// All long immediate update actions.
81 /// The count of times this instruction has been executed.
83 /// True in case the instruction is considered a program exit point.
85};
86
88
89#endif
CycleCount ClockCycleCount
Alias for ClockCycleCount.
ClockCycleCount executionCount() const
std::vector< LongImmUpdateAction * > UpdateContainer
Contains long immediate update actions.
ClockCycleCount moveExecutionCount(std::size_t moveIndex) const
ExecutableInstruction & operator=(const ExecutableInstruction &)
Assignment not allowed.
ExecutableInstruction(const ExecutableInstruction &)
Copying not allowed.
bool exitPoint_
True in case the instruction is considered a program exit point.
void setExitPoint(bool b)
UpdateContainer updateActions_
All long immediate update actions.
ClockCycleCount executionCount_
The count of times this instruction has been executed.
void addExecutableMove(ExecutableMove *move)
MoveContainer moves_
All moves of the instruction.
void addLongImmediateUpdateAction(LongImmUpdateAction *action)
bool moveSquashed(std::size_t moveIndex) const
std::vector< ExecutableMove * > MoveContainer
Contains ExecutableMoves.
bool isExitPoint() const