OpenASIP  2.0
MemoryAccessingFUState.cc
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 MemoryAccessingFUState.cc
26  *
27  * Definition of MemoryAccessingFUState class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @author Pekka Jääskeläinen 2005 (pjaaskel-no.spam-cs.tut.fi)
31  * @note rating: red
32  */
33 
35 #include "Memory.hh"
36 #include "OperationContext.hh"
37 #include "Memory.hh"
38 
39 /**
40  * Constructor (no explicitly given FU name).
41  *
42  * @param memory Memory instance.
43  * @param MAUSize Width of the minimum addressable unit.
44  * @param lock Global lock signal.
45  * @todo Do not hard code the MAU or NW sizes!
46  */
48  Memory& memory) :
49  FUState(), memory_(memory), operationContext_(DEFAULT_FU_NAME) {
50 
52 }
53 
54 /**
55  * Constructor (with explicitly given FU name).
56  *
57  * @param memory Memory instance.
58  * @param MAUSize Width of the minimum addressable unit.
59  * @param lock Global lock signal.
60  * @todo Do not hard code the MAU or NW sizes!
61  */
63  const TCEString& name,
64  Memory& memory) :
65  FUState(), memory_(memory), operationContext_(name) {
66 
68 }
69 
70 /**
71  * Destructor.
72  */
74 }
75 
76 /**
77  * Returns the operation context.
78  *
79  * This is basically a "template method" to allow differently initialized
80  * OperationContext-classes in FUState subclasses.
81  *
82  * @return The operation context for the FU.
83  */
86  return operationContext_;
87 }
88 
89 
OperationContext::setMemory
void setMemory(Memory *memory)
Definition: OperationContext.cc:238
MemoryAccessingFUState::operationContext_
OperationContext operationContext_
The operation context for this FU.
Definition: MemoryAccessingFUState.hh:63
MemoryAccessingFUState::memory_
Memory & memory_
Memory wrapper instance.
Definition: MemoryAccessingFUState.hh:60
Memory.hh
OperationContext
Definition: OperationContext.hh:56
DEFAULT_FU_NAME
#define DEFAULT_FU_NAME
Definition: OperationContext.hh:47
MemoryAccessingFUState::~MemoryAccessingFUState
virtual ~MemoryAccessingFUState()
Definition: MemoryAccessingFUState.cc:73
FUState
Definition: FUState.hh:58
MemoryAccessingFUState::context
virtual OperationContext & context()
Definition: MemoryAccessingFUState.cc:85
MemoryAccessingFUState::MemoryAccessingFUState
MemoryAccessingFUState(Memory &memory)
Definition: MemoryAccessingFUState.cc:47
MemoryAccessingFUState.hh
TCEString
Definition: TCEString.hh:53
OperationContext.hh
Memory
Definition: Memory.hh:74