Go to the documentation of this file.
33 #ifndef TTA_PROGRAM_HH
34 #define TTA_PROGRAM_HH
55 class InstructionReferenceManager;
56 class TerminalImmediate;
void addProcedure(Procedure *proc)
Instruction & firstInstruction() const
UInt32 InstructionAddress
Procedure & operator[](size_t index)
void addInstruction(Instruction *ins)
int procedureCount() const
Procedure & firstProcedure() const
Address entryAddress() const
Address startAddress() const
bool isInstructionPerAddress() const
Instruction & nextInstruction(const Instruction &) const
std::vector< DataMemory * > DataMemList
List for data memories.
bool finalized_
True in case the program is not (and must not be) updated anymore and it has its final instruction ad...
bool instructionPerAddress_
True in case the program is instruction indexed, that is, each instruction is assumed to be in a sing...
const Move & moveAt(int number) const
DataMemList dataMems_
The data memories in the program.
UniversalMachine * umach_
The UniversalMachine instance used to refer to in case of the unscheduled/unassigned parts of the pro...
std::vector< Instruction * > InstructionVector
Vector for instructions.
InstructionReferenceManager * refManager_
Keeps book of all instruction to instruction (jumps and calls) references in the program.
const Procedure & procedureAtIndex(int index) const
bool hasProcedure(const std::string &name) const
const GlobalScope & globalScopeConst() const
std::vector< Procedure * > ProcList
List for procedures.
Instruction & instructionAt(InstructionAddress address) const
void copyDataLabelsFrom(const Program &srcProg)
std::vector< Move * > MoveList
List for moves.
void addDataMemory(DataMemory *dataMem)
Procedure & nextProcedure(const Procedure &proc) const
void setEntryAddress(Address address)
void moveProcedure(Procedure &proc, int howMuch)
void link(const TTAProgram::Program &other)
DataMemory & dataMemory(int index) const
void copyDataMemoriesFrom(const Program &srcProg)
Program(const TTAMachine::AddressSpace &space)
UniversalMachine & universalMachine() const
Program & operator=(const Program &old)
int dataMemoryCount() const
TCEString toString() const
MoveList moves_
List of all the moves of the program.
int instructionCount() const
void setStartAddress(Address start)
InstructionReferenceManager & instructionReferenceManager() const
ProcList procedures_
The procedures in the program.
void replaceUniversalAddressSpaces(const TTAMachine::AddressSpace &space)
static void writeToTPEF(const TTAProgram::Program &program, const std::string &tpefFileName)
Address entry_
The entry address of the program.
TTAMachine::Machine & targetProcessor() const
static Program * loadFromTPEF(const std::string &tpefFileName, const TTAMachine::Machine &theMachine)
TerminalImmediate * convertSymbolRef(Terminal &tsr)
GlobalScope * globalScope_
Global scope of the program.
find Finds info of the inner loops in the program
Instruction & lastInstruction() const
Procedure & lastProcedure() const
GlobalScope & globalScope()
void fixInstructionReferences()
void removeProcedure(Procedure &proc)
ProcList::const_iterator ProcIter
Iterator for the procedure list.
void copyFrom(const Program &source)
Address start_
The start address of the program.
InstructionVector instructionVector() const
Procedure & procedure(int index) const
void setUniversalMachine(UniversalMachine *umach)
static Program * loadFromUnscheduledTPEF(const std::string &tpefFileName, const TTAMachine::Machine &theMachine)
void copyCodeLabelsFrom(const Program &srcProg)
void convertSymbolRefsToInsRefs(bool ignoreUnfoundSymbols=false)