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