OpenASIP
2.0
src
applibs
Scheduler
ResourceManager
PendingAssignment.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 PendingAssignment.hh
26
*
27
* Declaration of PendingAssignment class.
28
*
29
* @author Ari Metsähalme 2006 (ari.metsahalme-no.spam-tut.fi)
30
* @note rating: red
31
*/
32
33
#ifndef TTA_PENDING_ASSIGNMENT_HH
34
#define TTA_PENDING_ASSIGNMENT_HH
35
36
#include "
SchedulingResource.hh
"
37
38
class
ResourceBroker
;
39
class
MoveNode
;
40
41
namespace
TTAMachine
{
42
class
Bus;
43
class
FunctionUnit;
44
}
45
46
/**
47
*/
48
class
PendingAssignment
{
49
public
:
50
PendingAssignment
(
ResourceBroker
&
broker
);
51
virtual
~PendingAssignment
();
52
53
ResourceBroker
&
broker
();
54
void
setRequest
(
int
cycle,
MoveNode
& node,
55
const
TTAMachine::Bus
* bus,
56
const
TTAMachine::FunctionUnit
* srcFU,
57
const
TTAMachine::FunctionUnit
* dstFU,
58
int
immWriteCycle,
59
const
TTAMachine::ImmediateUnit
* immu,
60
int
immRegIndex);
61
bool
isAssignmentPossible
();
62
void
tryNext
();
63
void
undoAssignment
();
64
void
forget
();
65
void
clear
();
66
SchedulingResource
&
resource
(
int
index) {
67
return
availableResources_
.
resource
(index); }
68
int
lastTriedAssignment
()
const
{
return
lastTriedAssignment_
; }
69
private
:
70
/// Corresponding resource broker.
71
ResourceBroker
&
broker_
;
72
int
cycle_
;
73
MoveNode
*
node_
;
74
const
TTAMachine::Bus
*
bus_
;
75
const
TTAMachine::FunctionUnit
*
srcFU_
;
76
const
TTAMachine::FunctionUnit
*
dstFU_
;
77
int
immWriteCycle_
;
78
bool
assignmentTried_
;
79
SchedulingResourceSet
availableResources_
;
80
int
lastTriedAssignment_
;
81
const
TTAMachine::ImmediateUnit
*
immu_
;
82
int
immRegIndex_
;
83
};
84
85
#endif
PendingAssignment::assignmentTried_
bool assignmentTried_
Definition:
PendingAssignment.hh:78
PendingAssignment::forget
void forget()
Definition:
PendingAssignment.cc:164
PendingAssignment::node_
MoveNode * node_
Definition:
PendingAssignment.hh:73
PendingAssignment::availableResources_
SchedulingResourceSet availableResources_
Definition:
PendingAssignment.hh:79
TTAMachine::Bus
Definition:
Bus.hh:53
ResourceBroker
Definition:
ResourceBroker.hh:61
MoveNode
Definition:
MoveNode.hh:65
PendingAssignment::broker
ResourceBroker & broker()
Definition:
PendingAssignment.cc:61
PendingAssignment::~PendingAssignment
virtual ~PendingAssignment()
Definition:
PendingAssignment.cc:52
SchedulingResourceSet
Definition:
SchedulingResource.hh:161
TTAMachine::FunctionUnit
Definition:
FunctionUnit.hh:55
PendingAssignment::lastTriedAssignment_
int lastTriedAssignment_
Definition:
PendingAssignment.hh:80
SchedulingResource
Definition:
SchedulingResource.hh:52
SchedulingResource.hh
PendingAssignment::resource
SchedulingResource & resource(int index)
Definition:
PendingAssignment.hh:66
PendingAssignment::srcFU_
const TTAMachine::FunctionUnit * srcFU_
Definition:
PendingAssignment.hh:75
PendingAssignment::isAssignmentPossible
bool isAssignmentPossible()
Definition:
PendingAssignment.cc:99
PendingAssignment::lastTriedAssignment
int lastTriedAssignment() const
Definition:
PendingAssignment.hh:68
PendingAssignment::immu_
const TTAMachine::ImmediateUnit * immu_
Definition:
PendingAssignment.hh:81
PendingAssignment::immRegIndex_
int immRegIndex_
Definition:
PendingAssignment.hh:82
PendingAssignment::tryNext
void tryNext()
Definition:
PendingAssignment.cc:119
PendingAssignment
Definition:
PendingAssignment.hh:48
PendingAssignment::setRequest
void setRequest(int cycle, MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex)
Definition:
PendingAssignment.cc:73
PendingAssignment::PendingAssignment
PendingAssignment(ResourceBroker &broker)
Definition:
PendingAssignment.cc:44
PendingAssignment::bus_
const TTAMachine::Bus * bus_
Definition:
PendingAssignment.hh:74
PendingAssignment::cycle_
int cycle_
Definition:
PendingAssignment.hh:72
PendingAssignment::clear
void clear()
Definition:
PendingAssignment.cc:177
SchedulingResourceSet::resource
SchedulingResource & resource(int index) const
Definition:
SchedulingResource.cc:263
TTAMachine
Definition:
Assembler.hh:48
PendingAssignment::dstFU_
const TTAMachine::FunctionUnit * dstFU_
Definition:
PendingAssignment.hh:76
PendingAssignment::broker_
ResourceBroker & broker_
Corresponding resource broker.
Definition:
PendingAssignment.hh:71
PendingAssignment::immWriteCycle_
int immWriteCycle_
Definition:
PendingAssignment.hh:77
PendingAssignment::undoAssignment
void undoAssignment()
Definition:
PendingAssignment.cc:146
TTAMachine::ImmediateUnit
Definition:
ImmediateUnit.hh:50
Generated by
1.8.17