OpenASIP 2.2
Loading...
Searching...
No Matches
ExecutableInstruction.cc
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.cc
26 *
27 * Definition 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
35#include "ExecutableMove.hh"
37#include "SequenceTools.hh"
38
39/**
40 * Constructor.
41 */
46
47/**
48 * Destructor.
49 */
54
55/**
56 * Adds move to the instruction.
57 *
58 * Moves must be added in the same order they are in source Program model's
59 * instruction.
60 *
61 * @param move Move to be added.
62 */
63void
67
68/**
69 * Adds long immediate update action.
70 *
71 * @param action Action to be added.
72 */
73void
78
79/**
80 * Returns the count of times this instruction has been executed so far.
81 *
82 * @return The execution count of this instruction.
83 */
88
89/**
90 * Resets the execution counters of this instruction and its moves.
91 */
92void
95 for (std::size_t i = 0; i < moves_.size(); ++i) {
96 moves_[i]->resetExecutionCount();
97 }
98}
99
100/**
101 * Returns the count of full executions so far of move at given index.
102 *
103 * Squashed moves are not included in the count. Thus, to get count of
104 * times a move has be squashed, one should get the instruction execution
105 * count and subsract the move's execution count from it.
106 *
107 * @return Count of executions of move at given move slot.
108 */
110ExecutableInstruction::moveExecutionCount(std::size_t moveIndex) const {
111 return moves_[moveIndex]->executionCount();
112}
find Finds info of the inner loops in the false
CycleCount ClockCycleCount
Alias for ClockCycleCount.
ClockCycleCount executionCount() const
ClockCycleCount moveExecutionCount(std::size_t moveIndex) const
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)
static void deleteAllItems(SequenceType &aSequence)