OpenASIP  2.0
FUBroker.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2016 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 InputFUBroker.hh
26  *
27  * Declaration of InputFUBroker class.
28  *
29  * @author Heikki Kultala 2016-2020 (heikki.kultala-no.spam-tuni.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_FU_BROKER_HH
34 #define TTA_FU_BROKER_HH
35 
36 #include "ResourceBroker.hh"
37 #include "DataDependenceGraph.hh"
38 
39 namespace TTAMachine {
40  class FunctionUnit;
41 }
42 
43 class MoveNode;
44 class ProgramOperation;
45 
46 /**
47  * Input function unit broker.
48  */
49 class FUBroker : public ResourceBroker {
50 public:
51  FUBroker(std::string name, unsigned int initiationInterval = 0) :
52  ResourceBroker(name, initiationInterval) {}
53  virtual ~FUBroker() {}
54 protected:
55  std::pair<bool, const TTAMachine::FunctionUnit*> findDstFUOfMove(
56  const MoveNode& node,
57  const TTAMachine::FunctionUnit* resFU,
58  DataDependenceGraph::NodeSet& processedInputNodes) const;
59 
60  std::pair<bool, const TTAMachine::FunctionUnit*> findFUOfPO(
61  ProgramOperation& po, const TTAMachine::FunctionUnit* resFU) const;
62 };
63 
64 #endif
BoostGraph< MoveNode, DataDependenceEdge >::NodeSet
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
Definition: BoostGraph.hh:86
FUBroker::FUBroker
FUBroker(std::string name, unsigned int initiationInterval=0)
Definition: FUBroker.hh:51
ResourceBroker
Definition: ResourceBroker.hh:61
FUBroker
Definition: FUBroker.hh:49
DataDependenceGraph.hh
ProgramOperation
Definition: ProgramOperation.hh:70
MoveNode
Definition: MoveNode.hh:65
FUBroker::~FUBroker
virtual ~FUBroker()
Definition: FUBroker.hh:53
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
FUBroker::findFUOfPO
std::pair< bool, const TTAMachine::FunctionUnit * > findFUOfPO(ProgramOperation &po, const TTAMachine::FunctionUnit *resFU) const
Definition: FUBroker.cc:77
ResourceBroker.hh
TTAMachine
Definition: Assembler.hh:48
FUBroker::findDstFUOfMove
std::pair< bool, const TTAMachine::FunctionUnit * > findDstFUOfMove(const MoveNode &node, const TTAMachine::FunctionUnit *resFU, DataDependenceGraph::NodeSet &processedInputNodes) const
Definition: FUBroker.cc:37