OpenASIP  2.0
FSAFUResourceConflictDetector.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 FSAFUResourceConflictDetector.hh
26  *
27  * Declaration of FSAFUResourceConflictDetector class.
28  *
29  * @author Pekka Jääskeläinen 2006 (pjaaskel-no.spam-cs.tut.fi)
30  * @note This file is used in compiled simulation. Keep dependencies *clean*
31  * @note rating: red
32  */
33 
34 #ifndef TTA_FSA_FU_RESOURCE_CONFLICT_DETECTOR_HH
35 #define TTA_FSA_FU_RESOURCE_CONFLICT_DETECTOR_HH
36 
38 
39 namespace TTAMachine {
40  class FunctionUnit;
41 }
42 
43 class Operation;
45 
46 /**
47  * An FSA implementation of a FU resource conflict detector.
48  */
50 public:
51 
53  const TTAMachine::FunctionUnit& fu);
55 
56  virtual bool issueOperation(OperationID id);
57  virtual bool advanceCycle();
58  virtual bool isIdle();
59 
62  bool advanceCycleInline();
64 
65  virtual void reset();
66 
67  void initializeAllStates();
68 
69  const char* operationName(OperationID id) const;
70 
71  virtual OperationID operationID(const TCEString& operationName) const;
72 
73  virtual void writeToDotFile(const TCEString& fileName) const;
74 
75 private:
76  /// Private implementation in a separate source file
78 };
79 
80 #endif
FSAFUResourceConflictDetector::isIdle
virtual bool isIdle()
Definition: FSAFUResourceConflictDetector.cc:157
FSAFUResourceConflictDetector::advanceCycleLazyInline
bool advanceCycleLazyInline()
Definition: FSAFUResourceConflictDetector.cc:253
FSAFUResourceConflictDetector::reset
virtual void reset()
Definition: FSAFUResourceConflictDetector.cc:147
FUResourceConflictDetector.hh
FSAFUResourceConflictDetector::FSAFUResourceConflictDetector
FSAFUResourceConflictDetector(const TTAMachine::FunctionUnit &fu)
Definition: FSAFUResourceConflictDetector.cc:52
FUResourceConflictDetector::OperationID
int OperationID
Type for identifying operations in the conflict detector interface.
Definition: FUResourceConflictDetector.hh:49
FSAFUResourceConflictDetector::issueOperationInline
bool issueOperationInline(OperationID id)
Definition: FSAFUResourceConflictDetector.cc:184
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
FSAFUResourceConflictDetector::pimpl_
FSAFUResourceConflictDetectorPimpl * pimpl_
Private implementation in a separate source file.
Definition: FSAFUResourceConflictDetector.hh:77
FUResourceConflictDetector
Definition: FUResourceConflictDetector.hh:45
FSAFUResourceConflictDetectorPimpl
Definition: FSAFUResourceConflictDetectorPimpl.hh:48
FSAFUResourceConflictDetector::advanceCycleInline
bool advanceCycleInline()
Definition: FSAFUResourceConflictDetector.cc:230
FSAFUResourceConflictDetector::writeToDotFile
virtual void writeToDotFile(const TCEString &fileName) const
Definition: FSAFUResourceConflictDetector.cc:84
FSAFUResourceConflictDetector::issueOperationLazyInline
bool issueOperationLazyInline(OperationID id)
Definition: FSAFUResourceConflictDetector.cc:205
Operation
Definition: Operation.hh:59
FSAFUResourceConflictDetector::advanceCycle
virtual bool advanceCycle()
Definition: FSAFUResourceConflictDetector.cc:120
FSAFUResourceConflictDetector::initializeAllStates
void initializeAllStates()
Definition: FSAFUResourceConflictDetector.cc:74
FSAFUResourceConflictDetector::operationName
const char * operationName(OperationID id) const
Definition: FSAFUResourceConflictDetector.cc:110
TCEString
Definition: TCEString.hh:53
FSAFUResourceConflictDetector
Definition: FSAFUResourceConflictDetector.hh:49
FSAFUResourceConflictDetector::operationID
virtual OperationID operationID(const TCEString &operationName) const
Definition: FSAFUResourceConflictDetector.cc:134
TTAMachine
Definition: Assembler.hh:48
FSAFUResourceConflictDetector::~FSAFUResourceConflictDetector
virtual ~FSAFUResourceConflictDetector()
Definition: FSAFUResourceConflictDetector.cc:62
FSAFUResourceConflictDetector::issueOperation
virtual bool issueOperation(OperationID id)
Definition: FSAFUResourceConflictDetector.cc:99