Go to the documentation of this file.
62 instructions_(
program.instructionVector()) {
82 for (std::set<ErrorCode>::const_iterator iter = errorsToCheck.begin();
83 iter != errorsToCheck.end(); iter++) {
110 for (std::size_t instrI = 0; instrI <
instructions_.size(); ++instrI) {
113 for (
int i = 0; i < instruction->
moveCount(); i++) {
114 const Move& move = instruction->
move(i);
116 const Bus& bus = move.
bus();
128 std::string errorMessage =
131 "." + port.
name() +
"' of the move on bus '" +
132 bus.
name() +
"' is not connected to an output socket.";
140 std::string errorMessage =
143 "." + port.
name() +
"' of the move on bus '" +
144 bus.
name() +
"' is not connected to the bus.";
161 std::string errorMessage =
164 "." + port.
name() +
"' of the move on bus '" +
165 bus.
name() +
"' is not connected to an input socket.";
173 std::string errorMessage =
176 "." + port.
name() +
"' of the move on bus '" +
177 bus.
name() +
"' is not connected to the bus.";
194 for (std::size_t instrI = 0; instrI <
instructions_.size(); ++instrI) {
200 std::set<std::string> destinations;
208 std::string errorMessage =
210 "Long immediate destination terminal is not an "
221 supportedWidth != width) {
241 std::pair<std::set<std::string>::iterator,
bool> result =
242 destinations.insert(iu.
name());
244 if (!result.second) {
247 std::string errorMessage =
249 "Multiple long immediates with destination IU '" +
257 if (supportedWidth < width) {
259 std::string errorMessage =
261 "Long immediate with destination IU '" +
262 iu.
name() +
"' has width of " +
264 "template only supports long immediates with width of " +
266 " bits or less. For template " + templ.
name();
283 std::set<std::string> errOpNames;
285 for (std::size_t instrI = 0; instrI <
instructions_.size(); ++instrI) {
288 for (
int i = 0; i < instruction->
moveCount(); i++) {
301 std::string errorMessage =
303 "Operation '" + opName +
304 "' cannot be simulated.";
309 errOpNames.insert(opName);
327 for (std::size_t instrI = 0; instrI <
instructions_.size(); ++instrI) {
329 for (
int i = 0; i < instruction->
moveCount(); i++) {
337 std::string errorMessage =
338 "Instruction at address: " +
340 "' cannot be simulated with the compiled simulator. "
342 " is a clocked operation).";
virtual bool isFUPort() const
const TTAProgram::Program::InstructionVector instructions_
The program's instructions in a quickly accessed vector.
UInt32 InstructionAddress
virtual Socket * inputSocket() const
virtual TCEString name() const
@ CONNECTION_MISSING
Connection required for a move is missing.
@ SIMULATION_NOT_POSSIBLE
Program contains operations with unknown behaviour.
@ LONG_IMMEDIATE_NOT_SUPPORTED
Instruction template missing for a long immediate.
Terminal & destination() const
void checkLongImmediates(POMValidatorResults &results)
const TTAMachine::Bus & bus() const
void checkConnectivity(POMValidatorResults &results)
virtual bool isClocked() const
virtual bool canBeSimulated() const
virtual TCEString name() const
static std::string toString(const T &source)
virtual Operation & operation() const
void checkSimulatability(POMValidatorResults &results)
#define assert(condition)
virtual bool isImmediateRegister() const
ErrorCode
Error codes for different errors.
@ COMPILED_SIMULATION_NOT_POSSIBLE
Compiled simulation is not possible.
virtual bool isGPR() const
virtual const TTAMachine::ImmediateUnit & immediateUnit() const
virtual int supportedWidth() const
InstructionAddress location() const
bool isConnectedTo(const Bus &bus) const
Immediate & immediate(int i) const
virtual bool isOpcodeSetting() const
const TTAMachine::InstructionTemplate & instructionTemplate() const
unsigned int unsignedValue() const
virtual std::string name() const
POMValidator(const TTAProgram::Program &program)
int immediateCount() const
virtual Socket * outputSocket() const
Terminal & source() const
virtual const TTAMachine::Port & port() const
find Finds info of the inner loops in the program
void checkCompiledSimulatability(POMValidatorResults &results)
POMValidatorResults * validate(const std::set< ErrorCode > &errorsToCheck)
void addError(POMValidator::ErrorCode code, const std::string &errorMsg)
Unit * parentUnit() const