OpenASIP  2.0
SimProgramBuilder.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 SimProgramBuilder.hh
26  *
27  * Declaration of SimProgramBuilder class.
28  *
29  * @author Jussi Nykänen 2005 (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 
34 #ifndef TTA_SIM_PROGRAM_BUILDER_HH
35 #define TTA_SIM_PROGRAM_BUILDER_HH
36 
37 #include "Exception.hh"
38 
39 class StateLocator;
40 class InstructionMemory;
42 class ExecutableMove;
43 class MachineState;
44 class StateData;
45 class ReadableState;
46 
47 namespace TTAMachine {
48  class Guard;
49 }
50 
51 namespace TTAProgram {
52  class Instruction;
53  class Move;
54  class Terminal;
55  class Program;
56 }
57 
58 /**
59  * Creates InstructionMemory out of Program Object Model.
60  *
61  */
63 public:
65  virtual ~SimProgramBuilder();
66 
68  const TTAProgram::Program& prog, MachineState& state);
69 
70 private:
71  /// Copying not allowed.
73  /// Assignment not allowed.
75 
77  const TTAProgram::Terminal& theTerminal, MachineState& state);
78 
80  const TTAMachine::Guard& guard, MachineState& state);
81 
83  const TTAProgram::Terminal& theTerminal, MachineState& state);
84 
86  const TTAProgram::Instruction& instruction, MachineState& state);
87 
89  const TTAProgram::Move& move, MachineState& state);
90 
91  // is the source program a sequential program
93 };
94 
95 #endif
SimProgramBuilder::processSourceTerminal
StateData * processSourceTerminal(const TTAProgram::Terminal &theTerminal, MachineState &state)
Definition: SimProgramBuilder.cc:194
TTAMachine::Guard
Definition: Guard.hh:55
TTAProgram
Definition: Estimator.hh:65
TTAProgram::Program
Definition: Program.hh:63
ExecutableInstruction
Definition: ExecutableInstruction.hh:49
SimProgramBuilder::~SimProgramBuilder
virtual ~SimProgramBuilder()
Definition: SimProgramBuilder.cc:97
Exception.hh
TTAProgram::Instruction
Definition: Instruction.hh:57
ReadableState
Definition: ReadableState.hh:41
InstructionMemory
Definition: InstructionMemory.hh:54
SimProgramBuilder::operator=
SimProgramBuilder & operator=(const SimProgramBuilder &)
Assignment not allowed.
SimProgramBuilder::SimProgramBuilder
SimProgramBuilder()
Definition: SimProgramBuilder.cc:90
MachineState
Definition: MachineState.hh:61
SimProgramBuilder::build
InstructionMemory * build(const TTAProgram::Program &prog, MachineState &state)
Definition: SimProgramBuilder.cc:472
ExecutableMove
Definition: ExecutableMove.hh:52
StateLocator
Definition: StateLocator.hh:51
TTAProgram::Move
Definition: Move.hh:55
SimProgramBuilder
Definition: SimProgramBuilder.hh:62
SimProgramBuilder::processInstruction
ExecutableInstruction * processInstruction(const TTAProgram::Instruction &instruction, MachineState &state)
Definition: SimProgramBuilder.cc:402
SimProgramBuilder::findGuardModel
const ReadableState & findGuardModel(const TTAMachine::Guard &guard, MachineState &state)
Definition: SimProgramBuilder.cc:231
TTAProgram::Terminal
Definition: Terminal.hh:60
StateData
Definition: StateData.hh:44
TTAMachine
Definition: Assembler.hh:48
SimProgramBuilder::processMove
ExecutableMove * processMove(const TTAProgram::Move &move, MachineState &state)
Definition: SimProgramBuilder.cc:257
SimProgramBuilder::processBidirTerminal
StateData * processBidirTerminal(const TTAProgram::Terminal &theTerminal, MachineState &state)
Definition: SimProgramBuilder.cc:111
SimProgramBuilder::sequentialProgram_
bool sequentialProgram_
Definition: SimProgramBuilder.hh:92