OpenASIP  2.0
ExecutableMove.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 ExecutableMove.hh
26  *
27  * Declaration of ExecutableMove 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_MOVE_HH
35 #define TTA_EXECUTABLE_MOVE_HH
36 
37 #include "InlineImmediateValue.hh"
38 #include "SimulatorConstants.hh"
39 
40 class ReadableState;
41 class BusState;
42 class WritableState;
43 class SimValue;
44 
45 
46 /**
47  * Represents an interpreted move.
48  *
49  * Interpreted means that source and destination of the move are already
50  * resolved.
51  */
53 public:
55  const ReadableState& src,
56  BusState& bus,
57  WritableState& dst);
58 
60  const ReadableState& src,
61  BusState& bus,
62  WritableState& dst,
63  const ReadableState& guardReg,
64  bool negated);
65 
67  InlineImmediateValue* immediateSource,
68  BusState& bus,
69  WritableState& dst,
70  const ReadableState& guardReg,
71  bool negated);
72 
74  InlineImmediateValue* immediateSource,
75  BusState& bus,
76  WritableState& dst);
77 
78  virtual ~ExecutableMove();
79 
80  virtual void executeRead();
81  virtual void executeWrite();
82  virtual void evaluateGuard();
83  virtual bool squashed() const;
84 
86  void resetExecutionCount();
87 
88 protected:
90 
91  /// Source of the move.
93  /// Bus of the move.
95  /// Destination of the move.
97  /// Guard of the move.
99  /// True if this is a guarded move.
100  const bool guarded_;
101  /// True if guard is inverted.
102  const bool negated_;
103  /// The count of times this move has been fully executed (without squash).
105  /// True in case this move was squashed last time it was executed.
106  bool squashed_;
107 
108 private:
109  /// Copying not allowed.
111  /// Assignment not allowed.
113  /// If the move source is an inline immediate, the instance
114  /// is stored here so it can be deleted in the destructor.
116 };
117 
118 /**
119  * Extremely simple wrapper for ExecutableMove, takes no params but exec count.
120  */
122 public:
124 private:
125 };
126 
127 #endif
ExecutableMove::operator=
ExecutableMove & operator=(const ExecutableMove &)
Assignment not allowed.
ExecutableMove::ExecutableMove
ExecutableMove()
Definition: ExecutableMove.cc:228
ReadableState
Definition: ReadableState.hh:41
ExecutableMove::dst_
WritableState * dst_
Destination of the move.
Definition: ExecutableMove.hh:96
ExecutableMove::resetExecutionCount
void resetExecutionCount()
Definition: ExecutableMove.cc:194
WritableState
Definition: WritableState.hh:41
BusState
Definition: BusState.hh:48
DummyExecutableMove
Definition: ExecutableMove.hh:121
ExecutableMove::guarded_
const bool guarded_
True if this is a guarded move.
Definition: ExecutableMove.hh:100
ExecutableMove::guardReg_
const ReadableState * guardReg_
Guard of the move.
Definition: ExecutableMove.hh:98
SimValue
Definition: SimValue.hh:96
SimulatorConstants.hh
InlineImmediateValue.hh
ExecutableMove::negated_
const bool negated_
True if guard is inverted.
Definition: ExecutableMove.hh:102
ExecutableMove::executeRead
virtual void executeRead()
Definition: ExecutableMove.cc:166
ExecutableMove
Definition: ExecutableMove.hh:52
DummyExecutableMove::DummyExecutableMove
DummyExecutableMove(ClockCycleCount executionCount)
Definition: ExecutableMove.cc:244
ExecutableMove::squashed
virtual bool squashed() const
Definition: ExecutableMove.cc:221
ExecutableMove::executionCount
ClockCycleCount executionCount() const
Definition: ExecutableMove.cc:206
RegisterState
Definition: RegisterState.hh:50
ClockCycleCount
CycleCount ClockCycleCount
Alias for ClockCycleCount.
Definition: SimulatorConstants.hh:57
ExecutableMove::src_
const ReadableState * src_
Source of the move.
Definition: ExecutableMove.hh:92
ExecutableMove::executionCount_
ClockCycleCount executionCount_
The count of times this move has been fully executed (without squash).
Definition: ExecutableMove.hh:104
ExecutableMove::squashed_
bool squashed_
True in case this move was squashed last time it was executed.
Definition: ExecutableMove.hh:106
ExecutableMove::bus_
BusState * bus_
Bus of the move.
Definition: ExecutableMove.hh:94
ExecutableMove::executeWrite
virtual void executeWrite()
Definition: ExecutableMove.cc:181
ExecutableMove::evaluateGuard
virtual void evaluateGuard()
Definition: ExecutableMove.cc:150
ExecutableMove::~ExecutableMove
virtual ~ExecutableMove()
Definition: ExecutableMove.cc:136
ExecutableMove::inlineImmediate_
InlineImmediateValue * inlineImmediate_
If the move source is an inline immediate, the instance is stored here so it can be deleted in the de...
Definition: ExecutableMove.hh:115