OpenASIP  2.0
CompiledSimCodeGenerator.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2010 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 CompiledSimCodeGenerator.hh
26  *
27  * Declaration of CompiledSimCodeGenerator class.
28  *
29  * @author Viljami Korhonen 2007 (viljami.korhonen-no.spam-tut.fi)
30  * @author Pekka Jääskeläinen 2010
31  * @note rating: red
32  */
33 
34 #ifndef COMPILED_SIM_CODE_GENERATOR_HH
35 #define COMPILED_SIM_CODE_GENERATOR_HH
36 
37 #include <iostream>
38 #include <fstream>
39 #include <string>
40 #include <set>
41 #include <map>
42 
43 #include "OperationPool.hh"
44 #include "SimulatorConstants.hh"
47 #include "CIStringSet.hh"
48 
49 namespace TTAMachine {
50  class Machine;
51  class FunctionUnit;
52  class FUPort;
53  class Port;
54  class Unit;
55  class HWOperation;
56  class Guard;
57  class RegisterFile;
58  class ControlUnit;
59  class Bus;
60  class RegisterGuard;
61 }
62 
63 namespace TTAProgram {
64  class Program;
65  class Instruction;
66  class Procedure;
67  class Terminal;
68  class CodeLabel;
69  class GlobalScope;
70  class Move;
71 }
72 
73 class SimulatorFrontend;
75 
76 
77 /// A struct for tracking basic blocks and their relation to their procedures
79  /// Procedure start per basic block starts
80  std::map<InstructionAddress, InstructionAddress> procedureStart;
81 
82  typedef std::multimap<InstructionAddress, InstructionAddress>
84 
85  /// All basic block start addresses per procedure start
87 
88  /// Basic block starts and their corresponding .cpp files
89  std::map<InstructionAddress, std::string> basicBlockFiles;
90 };
91 
92 
93 /**
94  * A class that generates C/C++ code from the given POM and MOM
95  *
96  * Used for the compiled simulation
97  *
98  */
100 public:
101  /// A type for std::string sets
102  typedef std::set<std::string> StringSet;
103  /// A type for storing address-to-address combinations
104  typedef std::map<InstructionAddress, InstructionAddress> AddressMap;
105 
109  const TTASimulationController& controller,
110  bool fuResourceConflictDetection,
111  bool handleCycleEnd,
112  bool dynamicCompilation,
113  bool basicBlockPerFile = false,
114  bool functionPerFile = true,
115  const TCEString& globalSymbolPrefix = "");
116 
117  virtual ~CompiledSimCodeGenerator();
118 
119  virtual void generateToDirectory(const std::string& dirName);
120  virtual StringSet createdFiles() const;
121  virtual AddressMap basicBlocks() const;
123 
125 
126 private:
127  /// Copying not allowed.
129  /// Assignment not allowed.
131 
132  /**
133  * A struct for handling delayed assignments for the FU results
134  */
136  /// The source symbol
137  std::string sourceSymbol;
138  /// The target symbol
139  std::string targetSymbol;
140  /// The FU result symbol
141  std::string fuResultSymbol;
142  };
143 
144  /// A type for operation symbol declarations: 1=op.name 2=op.symbol
145  typedef std::multimap<std::string, std::string> OperationSymbolDeclarations;
146 
147  /// FU Result writes
148  typedef std::multimap<int, DelayedAssignment> DelayedAssignments;
149  typedef std::map<std::string, int> FUResultWrites;
150 
154  void generateSimulationCode();
155  void findBasicBlocks() const;
156  void generateProcedureCode(const TTAProgram::Procedure& procedure);
160  std::string generateHaltCode(const std::string& message="");
163  void updateSymbolsMap();
165  void generateJumpTableCode();
166  void generateMakefile();
167 
168  void addDeclaredSymbol(const std::string& name, int width);
169  void addUsedRFSymbols();
170 
171  std::string handleJump(const TTAMachine::HWOperation& op);
172  std::string handleOperation(const TTAMachine::HWOperation& op);
173  std::string handleOperationWithoutDag(const TTAMachine::HWOperation& op);
174  std::string detectConflicts(const TTAMachine::HWOperation& op);
175  std::string generateGuardRead(const TTAProgram::Move& move);
176  std::string generateGuardCondition(const TTAProgram::Move& move);
177  void generateInstruction(const TTAProgram::Instruction& instruction);
178  std::string generateTriggerCode(const TTAMachine::HWOperation& op);
179  std::string generateStoreTrigger(const TTAMachine::HWOperation& op);
180  std::string generateLoadTrigger(const TTAMachine::HWOperation& op);
181 
182 // guard-pipeline related methods
183  bool handleRegisterWrite(
184  const std::string& regSymbolName, std::ostream& stream);
185 
186  std::string guardPipelineTopSymbol(const TTAMachine::RegisterGuard& guard);
187  void generateGuardPipelineVariables(std::ostream& stream);
188  void generateGuardPipelineAdvance(std::ostream& stream);
189 
190  std::string generateAddFUResult(
191  const TTAMachine::FUPort& resultPort,
192  const std::string& value,
193  int latency);
194 
195  std::string generateFUResultRead(
196  const std::string& destination,
197  const std::string& resultSymbol);
198 
199  int maxLatency() const;
200 
201  std::vector<TTAMachine::Port*> fuOutputPorts(
202  const TTAMachine::FunctionUnit& fu) const;
203 
204  static bool isStoreOperation(const std::string& opName);
205  static bool isLoadOperation(const std::string& opName);
206 
207  /// The machine used for simulation
209  /// The simulated program
211  /// The simulator frontend
213  /// GCU
215 
216  /// Should we let frontend handle each cycle end
218  /// Is this a dynamic compiled simulation?
220  /// Should the generator generate only one basic block per code file
222  /// Should the generator start with a new file after function end
224 
225  /// Type for SimValue symbol declarations: string=symbolname, int=width
226  typedef std::map<std::string, int> SimValueSymbolDeclarations;
227  /// A list of all symbols that are declared after the program code is ready
229 
230  /// A set of all the declared functions
232  /// A list of the code files created during the process
234  /// A list of used operations
236 
237  /// Absolute instruction # being processed
239  /// Istruction counter for checking how many instructions to put per file
241  /// How many moves have we been through with?
243  /// Are we at the beginning of a new procedure?
245  /// Pointer to the current Procedure being processed
247 
248  /// last instruction of the current basic block
250  /// name of the last used guard variable
251  std::string lastGuardBool_;
252  /// Temporary list of the used guard bool symbols per instruction
253  std::map<std::string, std::string> usedGuardSymbols_;
254  /// Program exit point addresses
255  std::set<InstructionAddress> exitPoints_;
256 
257  /// The basic block map referred by start of the block as a key
259  /// The basic block map referred by end of the block as a key
261  /// Basic blocks relations to procedures and vice versa.
263  /// Delayed FU Result assignments
265  /// Last known FU result writes
267 
268  /// The operation pool
270 
271  /// Directory where to write the source files of the engine.
272  std::string targetDirectory_;
273  /// Name of the class to be created
274  std::string className_;
275  /// Header filename
276  std::string headerFile_;
277  /// Main source filename. This includes the constructor and the simulateCycle().
278  std::string mainFile_;
279  /// Current file being processed
280  std::fstream currentFile_;
281  /// Name of the current file being processed
282  std::string currentFileName_;
283  /// Current output stream i.e. the above file
284  std::ostream* os_;
285 
286  /// The symbol generator
288 
289  /// Conflict detection code generator
291 
292  /// Maximum number of instructions per engine source code file,
293  /// computed from the instruction width (bus count) to control
294  /// simulation engine code size explosion with wider simulated
295  /// machines.
297  /// Max for each simulation function.
299 
300  typedef std::map<std::string, int> GuardPipeline;
302 
304 
306 };
307 
308 #endif // include once
309 
CompiledSimCodeGenerator::headerFile_
std::string headerFile_
Header filename.
Definition: CompiledSimCodeGenerator.hh:276
CompiledSimCodeGenerator::usedGuardSymbols_
std::map< std::string, std::string > usedGuardSymbols_
Temporary list of the used guard bool symbols per instruction.
Definition: CompiledSimCodeGenerator.hh:253
CompiledSimCodeGenerator::exitPoints_
std::set< InstructionAddress > exitPoints_
Program exit point addresses.
Definition: CompiledSimCodeGenerator.hh:255
CompiledSimCodeGenerator::updateSymbolsMap
void updateSymbolsMap()
Definition: CompiledSimCodeGenerator.cc:859
CompiledSimCodeGenerator::guardPipelineTopSymbol
std::string guardPipelineTopSymbol(const TTAMachine::RegisterGuard &guard)
Definition: CompiledSimCodeGenerator.cc:1824
CompiledSimCodeGenerator::supportedMemoryOperations
static TCETools::CIStringSet supportedMemoryOperations()
Definition: CompiledSimCodeGenerator.cc:1868
TTAProgram
Definition: Estimator.hh:65
CompiledSimCodeGenerator::GuardPipeline
std::map< std::string, int > GuardPipeline
Definition: CompiledSimCodeGenerator.hh:300
CompiledSimCodeGenerator::instructionNumber_
int instructionNumber_
Absolute instruction # being processed.
Definition: CompiledSimCodeGenerator.hh:238
TTAProgram::Program
Definition: Program.hh:63
CompiledSimCodeGenerator::generateInstruction
void generateInstruction(const TTAProgram::Instruction &instruction)
Definition: CompiledSimCodeGenerator.cc:1136
ProcedureBBRelations::procedureStart
std::map< InstructionAddress, InstructionAddress > procedureStart
Procedure start per basic block starts.
Definition: CompiledSimCodeGenerator.hh:80
CompiledSimCodeGenerator::isProcedureBegin_
bool isProcedureBegin_
Are we at the beginning of a new procedure?
Definition: CompiledSimCodeGenerator.hh:244
InstructionAddress
UInt32 InstructionAddress
Definition: BaseType.hh:175
CompiledSimCodeGenerator::basicBlocks
virtual AddressMap basicBlocks() const
Definition: CompiledSimCodeGenerator.cc:317
CompiledSimCodeGenerator::handleOperationWithoutDag
std::string handleOperationWithoutDag(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:974
CompiledSimCodeGenerator::createdFiles
virtual StringSet createdFiles() const
Definition: CompiledSimCodeGenerator.cc:307
CompiledSimCodeGenerator::guardPipeline_
GuardPipeline guardPipeline_
Definition: CompiledSimCodeGenerator.hh:301
CompiledSimCodeGenerator::generateConstructorCode
void generateConstructorCode()
Definition: CompiledSimCodeGenerator.cc:513
machine
TTAMachine::Machine * machine
the architecture definition of the estimated processor
Definition: EstimatorCmdLineUI.cc:59
CompiledSimCodeGenerator::AddressMap
std::map< InstructionAddress, InstructionAddress > AddressMap
A type for storing address-to-address combinations.
Definition: CompiledSimCodeGenerator.hh:104
TTAMachine::HWOperation
Definition: HWOperation.hh:52
CompiledSimCodeGenerator::generateTriggerCode
std::string generateTriggerCode(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:1501
CompiledSimCodeGenerator::procedureBBRelations_
ProcedureBBRelations procedureBBRelations_
Basic blocks relations to procedures and vice versa.
Definition: CompiledSimCodeGenerator.hh:262
TTAProgram::Instruction
Definition: Instruction.hh:57
CompiledSimCodeGenerator::DelayedAssignment::sourceSymbol
std::string sourceSymbol
The source symbol.
Definition: CompiledSimCodeGenerator.hh:137
CompiledSimCodeGenerator::lastGuardBool_
std::string lastGuardBool_
name of the last used guard variable
Definition: CompiledSimCodeGenerator.hh:251
CompiledSimCodeGenerator::generateConstructorParameters
void generateConstructorParameters()
Definition: CompiledSimCodeGenerator.cc:497
CompiledSimCodeGenerator::generateGuardRead
std::string generateGuardRead(const TTAProgram::Move &move)
Definition: CompiledSimCodeGenerator.cc:1035
CompiledSimCodeGenerator::generateFUOutputUpdater
void generateFUOutputUpdater()
Definition: CompiledSimCodeGenerator.cc:721
CompiledSimCodeGenerator::generateJumpTableCode
void generateJumpTableCode()
Definition: CompiledSimCodeGenerator.cc:889
CompiledSimCodeGenerator::machine_
const TTAMachine::Machine & machine_
The machine used for simulation.
Definition: CompiledSimCodeGenerator.hh:208
CompiledSimCodeGenerator::generateAdvanceClockCode
void generateAdvanceClockCode()
Definition: CompiledSimCodeGenerator.cc:783
CompiledSimCodeGenerator::handleCycleEnd_
bool handleCycleEnd_
Should we let frontend handle each cycle end.
Definition: CompiledSimCodeGenerator.hh:217
CompiledSimCodeGenerator::operator=
CompiledSimCodeGenerator & operator=(const CompiledSimCodeGenerator &)
Assignment not allowed.
CompiledSimCodeGenerator::isStoreOperation
static bool isStoreOperation(const std::string &opName)
Definition: CompiledSimCodeGenerator.cc:1878
CompiledSimCodeGenerator::currentProcedure_
const TTAProgram::Procedure * currentProcedure_
Pointer to the current Procedure being processed.
Definition: CompiledSimCodeGenerator.hh:246
CompiledSimCodeGenerator::fuOutputPorts
std::vector< TTAMachine::Port * > fuOutputPorts(const TTAMachine::FunctionUnit &fu) const
Definition: CompiledSimCodeGenerator.cc:1788
ProcedureBBRelations::BasicBlockStarts
std::multimap< InstructionAddress, InstructionAddress > BasicBlockStarts
Definition: CompiledSimCodeGenerator.hh:83
CompiledSimCodeGenerator::maxInstructionsPerFile_
unsigned maxInstructionsPerFile_
Maximum number of instructions per engine source code file, computed from the instruction width (bus ...
Definition: CompiledSimCodeGenerator.hh:296
CompiledSimCodeGenerator::createdFiles_
StringSet createdFiles_
A list of the code files created during the process.
Definition: CompiledSimCodeGenerator.hh:233
SimulatorConstants.hh
CompiledSimCodeGenerator::currentFileName_
std::string currentFileName_
Name of the current file being processed.
Definition: CompiledSimCodeGenerator.hh:282
TTAMachine::FunctionUnit
Definition: FunctionUnit.hh:55
CompiledSimCodeGenerator::handleJump
std::string handleJump(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:921
CompiledSimCodeGenerator::generateGuardCondition
std::string generateGuardCondition(const TTAProgram::Move &move)
Definition: CompiledSimCodeGenerator.cc:1089
CompiledSimCodeGenerator::declaredSymbols_
SimValueSymbolDeclarations declaredSymbols_
A list of all symbols that are declared after the program code is ready.
Definition: CompiledSimCodeGenerator.hh:228
TTAMachine::FUPort
Definition: FUPort.hh:46
CompiledSimCodeGenerator::CompiledSimCodeGenerator
CompiledSimCodeGenerator(const TTAMachine::Machine &machine, const TTAProgram::Program &program, const TTASimulationController &controller, bool fuResourceConflictDetection, bool handleCycleEnd, bool dynamicCompilation, bool basicBlockPerFile=false, bool functionPerFile=true, const TCEString &globalSymbolPrefix="")
Definition: CompiledSimCodeGenerator.cc:160
TTASimulationController
Definition: TTASimulationController.hh:69
ConflictDetectionCodeGenerator
Definition: ConflictDetectionCodeGenerator.hh:67
CompiledSimCodeGenerator::moveCounter_
int moveCounter_
How many moves have we been through with?
Definition: CompiledSimCodeGenerator.hh:242
CompiledSimCodeGenerator::generateSymbolDeclarations
void generateSymbolDeclarations()
Definition: CompiledSimCodeGenerator.cc:874
CompiledSimCodeGenerator::generateMakefile
void generateMakefile()
Definition: CompiledSimCodeGenerator.cc:245
CompiledSimCodeGenerator::handleRegisterWrite
bool handleRegisterWrite(const std::string &regSymbolName, std::ostream &stream)
Definition: CompiledSimCodeGenerator.cc:1838
CIStringSet.hh
CompiledSimCodeGenerator::lastInstructionOfBB_
InstructionAddress lastInstructionOfBB_
last instruction of the current basic block
Definition: CompiledSimCodeGenerator.hh:249
CompiledSimCodeGenerator::SimValueSymbolDeclarations
std::map< std::string, int > SimValueSymbolDeclarations
Type for SimValue symbol declarations: string=symbolname, int=width.
Definition: CompiledSimCodeGenerator.hh:226
CompiledSimCodeGenerator::generateFUResultRead
std::string generateFUResultRead(const std::string &destination, const std::string &resultSymbol)
Definition: CompiledSimCodeGenerator.cc:1752
TTAMachine::ControlUnit
Definition: ControlUnit.hh:50
TTAMachine::RegisterGuard
Definition: Guard.hh:137
ProcedureBBRelations::basicBlockFiles
std::map< InstructionAddress, std::string > basicBlockFiles
Basic block starts and their corresponding .cpp files.
Definition: CompiledSimCodeGenerator.hh:89
CompiledSimCodeGenerator::lastFUWrites_
FUResultWrites lastFUWrites_
Last known FU result writes.
Definition: CompiledSimCodeGenerator.hh:266
CompiledSimCodeGenerator::conflictDetectionGenerator_
ConflictDetectionCodeGenerator conflictDetectionGenerator_
Conflict detection code generator.
Definition: CompiledSimCodeGenerator.hh:290
CompiledSimCodeGenerator::needGuardPipeline_
bool needGuardPipeline_
Definition: CompiledSimCodeGenerator.hh:303
CompiledSimCodeGenerator::delayedFUResultWrites_
DelayedAssignments delayedFUResultWrites_
Delayed FU Result assignments.
Definition: CompiledSimCodeGenerator.hh:264
CompiledSimCodeGenerator
Definition: CompiledSimCodeGenerator.hh:99
CompiledSimCodeGenerator::detectConflicts
std::string detectConflicts(const TTAMachine::HWOperation &op)
CompiledSimCodeGenerator::generateAddFUResult
std::string generateAddFUResult(const TTAMachine::FUPort &resultPort, const std::string &value, int latency)
Definition: CompiledSimCodeGenerator.cc:1682
CompiledSimCodeGenerator::FUResultWrites
std::map< std::string, int > FUResultWrites
Definition: CompiledSimCodeGenerator.hh:149
CompiledSimCodeGenerator::generateGuardPipelineVariables
void generateGuardPipelineVariables(std::ostream &stream)
Definition: CompiledSimCodeGenerator.cc:1812
CompiledSimCodeGenerator::handleOperation
std::string handleOperation(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:941
TCETools::CIStringSet
std::set< TCEString, CaseInsensitiveCmp > CIStringSet
Definition: CIStringSet.hh:49
CompiledSimCodeGenerator::maxLatency
int maxLatency() const
Definition: CompiledSimCodeGenerator.cc:1769
CompiledSimCodeGenerator::generateShutdownCode
void generateShutdownCode(InstructionAddress address)
Definition: CompiledSimCodeGenerator.cc:710
CompiledSimCodeGenerator::DelayedAssignment::fuResultSymbol
std::string fuResultSymbol
The FU result symbol.
Definition: CompiledSimCodeGenerator.hh:141
CompiledSimCodeGenerator::gcu_
const TTAMachine::ControlUnit & gcu_
GCU.
Definition: CompiledSimCodeGenerator.hh:214
CompiledSimCodeGenerator::generateHeaderAndMainCode
void generateHeaderAndMainCode()
Definition: CompiledSimCodeGenerator.cc:345
CompiledSimCodeGenerator::mainFile_
std::string mainFile_
Main source filename. This includes the constructor and the simulateCycle().
Definition: CompiledSimCodeGenerator.hh:278
TTAProgram::Move
Definition: Move.hh:55
CompiledSimCodeGenerator::operationPool_
OperationPool operationPool_
The operation pool.
Definition: CompiledSimCodeGenerator.hh:269
ProcedureBBRelations::basicBlockStarts
BasicBlockStarts basicBlockStarts
All basic block start addresses per procedure start.
Definition: CompiledSimCodeGenerator.hh:86
CompiledSimCodeGenerator::os_
std::ostream * os_
Current output stream i.e. the above file.
Definition: CompiledSimCodeGenerator.hh:284
CompiledSimSymbolGenerator
Definition: CompiledSimSymbolGenerator.hh:66
CompiledSimCodeGenerator::className_
std::string className_
Name of the class to be created.
Definition: CompiledSimCodeGenerator.hh:274
CompiledSimCodeGenerator::currentFile_
std::fstream currentFile_
Current file being processed.
Definition: CompiledSimCodeGenerator.hh:280
CompiledSimCodeGenerator::StringSet
std::set< std::string > StringSet
A type for std::string sets.
Definition: CompiledSimCodeGenerator.hh:102
CompiledSimCodeGenerator::findBasicBlocks
void findBasicBlocks() const
Definition: CompiledSimCodeGenerator.cc:621
CompiledSimCodeGenerator::usedOperations_
OperationSymbolDeclarations usedOperations_
A list of used operations.
Definition: CompiledSimCodeGenerator.hh:235
CompiledSimCodeGenerator::maxInstructionsPerSimulationFunction_
unsigned maxInstructionsPerSimulationFunction_
Max for each simulation function.
Definition: CompiledSimCodeGenerator.hh:298
CompiledSimCodeGenerator::functionPerFile_
bool functionPerFile_
Should the generator start with a new file after function end.
Definition: CompiledSimCodeGenerator.hh:223
TCEString
Definition: TCEString.hh:53
CompiledSimCodeGenerator::targetDirectory_
std::string targetDirectory_
Directory where to write the source files of the engine.
Definition: CompiledSimCodeGenerator.hh:272
CompiledSimCodeGenerator::bbStarts_
AddressMap bbStarts_
The basic block map referred by start of the block as a key.
Definition: CompiledSimCodeGenerator.hh:258
CompiledSimCodeGenerator::generateToDirectory
virtual void generateToDirectory(const std::string &dirName)
Definition: CompiledSimCodeGenerator.cc:231
CompiledSimCodeGenerator::DelayedAssignments
std::multimap< int, DelayedAssignment > DelayedAssignments
FU Result writes.
Definition: CompiledSimCodeGenerator.hh:148
CompiledSimCodeGenerator::isLoadOperation
static bool isLoadOperation(const std::string &opName)
Definition: CompiledSimCodeGenerator.cc:1886
CompiledSimCodeGenerator::dynamicCompilation_
bool dynamicCompilation_
Is this a dynamic compiled simulation?
Definition: CompiledSimCodeGenerator.hh:219
CompiledSimCodeGenerator::symbolGen_
CompiledSimSymbolGenerator symbolGen_
The symbol generator.
Definition: CompiledSimCodeGenerator.hh:287
CompiledSimCodeGenerator::bbEnds_
AddressMap bbEnds_
The basic block map referred by end of the block as a key.
Definition: CompiledSimCodeGenerator.hh:260
program
find Finds info of the inner loops in the program
Definition: InnerLoopFinder.cc:80
CompiledSimCodeGenerator::procedureBBRelations
virtual ProcedureBBRelations procedureBBRelations() const
Definition: CompiledSimCodeGenerator.cc:330
ProcedureBBRelations
A struct for tracking basic blocks and their relation to their procedures.
Definition: CompiledSimCodeGenerator.hh:78
CompiledSimCodeGenerator::generateGuardPipelineAdvance
void generateGuardPipelineAdvance(std::ostream &stream)
Definition: CompiledSimCodeGenerator.cc:1799
CompiledSimCodeGenerator::generateSimulationGetter
void generateSimulationGetter()
Definition: CompiledSimCodeGenerator.cc:749
OperationPool
Definition: OperationPool.hh:52
CompiledSimCodeGenerator::simController_
const TTASimulationController & simController_
The simulator frontend.
Definition: CompiledSimCodeGenerator.hh:212
TTAMachine
Definition: Assembler.hh:48
CompiledSimCodeGenerator::basicBlockPerFile_
bool basicBlockPerFile_
Should the generator generate only one basic block per code file.
Definition: CompiledSimCodeGenerator.hh:221
CompiledSimCodeGenerator::generateLoadTrigger
std::string generateLoadTrigger(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:1617
ConflictDetectionCodeGenerator.hh
CompiledSimCodeGenerator::DelayedAssignment
Definition: CompiledSimCodeGenerator.hh:135
CompiledSimCodeGenerator::generateStoreTrigger
std::string generateStoreTrigger(const TTAMachine::HWOperation &op)
Definition: CompiledSimCodeGenerator.cc:1588
CompiledSimCodeGenerator::instructionCounter_
int instructionCounter_
Istruction counter for checking how many instructions to put per file.
Definition: CompiledSimCodeGenerator.hh:240
CompiledSimCodeGenerator::generateSimulationCode
void generateSimulationCode()
Definition: CompiledSimCodeGenerator.cc:598
CompiledSimCodeGenerator::addUsedRFSymbols
void addUsedRFSymbols()
TTAProgram::Procedure
Definition: Procedure.hh:55
OperationPool.hh
SimulatorFrontend
Definition: SimulatorFrontend.hh:89
CompiledSimCodeGenerator::OperationSymbolDeclarations
std::multimap< std::string, std::string > OperationSymbolDeclarations
A type for operation symbol declarations: 1=op.name 2=op.symbol.
Definition: CompiledSimCodeGenerator.hh:145
CompiledSimCodeGenerator::updateDeclaredSymbolsList
void updateDeclaredSymbolsList()
Definition: CompiledSimCodeGenerator.cc:799
CompiledSimCodeGenerator::globalSymbolSuffix_
TCEString globalSymbolSuffix_
Definition: CompiledSimCodeGenerator.hh:305
CompiledSimCodeGenerator::DelayedAssignment::targetSymbol
std::string targetSymbol
The target symbol.
Definition: CompiledSimCodeGenerator.hh:139
CompiledSimCodeGenerator::generateHaltCode
std::string generateHaltCode(const std::string &message="")
Definition: CompiledSimCodeGenerator.cc:775
CompiledSimCodeGenerator::program_
const TTAProgram::Program & program_
The simulated program.
Definition: CompiledSimCodeGenerator.hh:210
CompiledSimCodeGenerator::generateProcedureCode
void generateProcedureCode(const TTAProgram::Procedure &procedure)
Definition: CompiledSimCodeGenerator.cc:691
CompiledSimSymbolGenerator.hh
CompiledSimCodeGenerator::declaredFunctions_
StringSet declaredFunctions_
A set of all the declared functions.
Definition: CompiledSimCodeGenerator.hh:231
TTAMachine::Machine
Definition: Machine.hh:73
CompiledSimCodeGenerator::~CompiledSimCodeGenerator
virtual ~CompiledSimCodeGenerator()
Definition: CompiledSimCodeGenerator.cc:221
CompiledSimCodeGenerator::addDeclaredSymbol
void addDeclaredSymbol(const std::string &name, int width)
Definition: CompiledSimCodeGenerator.cc:909