OpenASIP  2.0
InputFUBroker.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 InputFUBroker.hh
26  *
27  * Declaration of InputFUBroker class.
28  *
29  * @author Ari Mets�halme 2006 (ari.metsahalme-no.spam-tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_INPUT_FU_BROKER_HH
34 #define TTA_INPUT_FU_BROKER_HH
35 
36 #include "FUBroker.hh"
37 #include "SchedulingResource.hh"
38 
39 namespace TTAMachine {
40  class Machine;
41  class MachinePart;
42 }
43 
44 namespace TTAProgram {
45  class Move;
46  class TerminalFUPort;
47 }
48 
49 class MoveNode;
50 class ResourceMapper;
51 
52 /**
53  * Input function unit broker.
54  */
55 class InputFUBroker : public FUBroker {
56 public:
57  InputFUBroker(std::string, unsigned int initiationInterval = 0);
58  virtual ~InputFUBroker();
59 
61  int cycle, const MoveNode& node,
62  const TTAMachine::Bus* bus,
63  const TTAMachine::FunctionUnit* srcFU,
64  const TTAMachine::FunctionUnit* dstFU,
65  int immWriteCycle,
66  const TTAMachine::ImmediateUnit* immu,
67  int immRegIndex) const override;
68 
69  virtual int earliestCycle(int cycle, const MoveNode& node,
70  const TTAMachine::Bus* bus,
71  const TTAMachine::FunctionUnit* srcFU,
72  const TTAMachine::FunctionUnit* dstFU,
73  int immWriteCycle,
74  const TTAMachine::ImmediateUnit* immu,
75  int immRegIndex) const override;
76  virtual int latestCycle(int cycle, const MoveNode& node,
77  const TTAMachine::Bus* bus,
78  const TTAMachine::FunctionUnit* srcFU,
79  const TTAMachine::FunctionUnit* dstFU,
80  int immWriteCycle,
81  const TTAMachine::ImmediateUnit* immu,
82  int immRegIndex) const override;
83  virtual bool isAlreadyAssigned(
84  int cycle, const MoveNode& node,
85  const TTAMachine::Bus* preassignedBus) const override;
86  virtual bool isApplicable(
87  const MoveNode& node, const TTAMachine::Bus* preAssigndBus = 0)
88  const override;
89  virtual void assign(int cycle, MoveNode& node, SchedulingResource& res,
90  int immWriteCycle, int immRegIndex) override;
91 
92  virtual void unassign(MoveNode& node) override;
93 
94  virtual void buildResources(const TTAMachine::Machine& target) override;
95  virtual void setupResourceLinks(const ResourceMapper& mapper) override;
96 };
97 
98 #endif
TTAProgram
Definition: Estimator.hh:65
InputFUBroker::~InputFUBroker
virtual ~InputFUBroker()
Definition: InputFUBroker.cc:76
InputFUBroker::isAlreadyAssigned
virtual bool isAlreadyAssigned(int cycle, const MoveNode &node, const TTAMachine::Bus *preassignedBus) const override
Definition: InputFUBroker.cc:365
InputFUBroker::buildResources
virtual void buildResources(const TTAMachine::Machine &target) override
Definition: InputFUBroker.cc:503
TTAMachine::Bus
Definition: Bus.hh:53
InputFUBroker::InputFUBroker
InputFUBroker(std::string, unsigned int initiationInterval=0)
Definition: InputFUBroker.cc:68
FUBroker
Definition: FUBroker.hh:49
MoveNode
Definition: MoveNode.hh:65
InputFUBroker::earliestCycle
virtual int earliestCycle(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
Definition: InputFUBroker.cc:320
InputFUBroker::latestCycle
virtual int latestCycle(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
Definition: InputFUBroker.cc:341
SchedulingResourceSet
Definition: SchedulingResource.hh:161
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
InputFUBroker::setupResourceLinks
virtual void setupResourceLinks(const ResourceMapper &mapper) override
Definition: InputFUBroker.cc:531
InputFUBroker::assign
virtual void assign(int cycle, MoveNode &node, SchedulingResource &res, int immWriteCycle, int immRegIndex) override
Definition: InputFUBroker.cc:414
SchedulingResource
Definition: SchedulingResource.hh:52
SchedulingResource.hh
FUBroker.hh
InputFUBroker::unassign
virtual void unassign(MoveNode &node) override
Definition: InputFUBroker.cc:474
InputFUBroker::allAvailableResources
virtual SchedulingResourceSet allAvailableResources(int cycle, const MoveNode &node, const TTAMachine::Bus *bus, const TTAMachine::FunctionUnit *srcFU, const TTAMachine::FunctionUnit *dstFU, int immWriteCycle, const TTAMachine::ImmediateUnit *immu, int immRegIndex) const override
Definition: InputFUBroker.cc:89
ResourceMapper
Definition: ResourceMapper.hh:51
InputFUBroker::isApplicable
virtual bool isApplicable(const MoveNode &node, const TTAMachine::Bus *preAssigndBus=0) const override
Definition: InputFUBroker.cc:389
InputFUBroker
Definition: InputFUBroker.hh:55
TTAMachine
Definition: Assembler.hh:48
TTAMachine::Machine
Definition: Machine.hh:73
TTAMachine::ImmediateUnit
Definition: ImmediateUnit.hh:50