Files
2017-04-11 15:49:55 +02:00

26 lines
1.2 KiB
Plaintext
Executable File

auto myiter = WFR_SELF_GETITERATIONID();
std::cout << "AtomicActivity1 [" << myiter << "]:" << std::endl
<< "\titerCount: " << sin->iterCount.getValue() << std::endl
<< "\ttaskIn1: " << sin->taskIn1.getValue() << std::endl
<< "\tloopPortIn1: " << sin->loopPortIn1.getValue() << std::endl;
#include <sstream>
if (myiter+1 != sin->taskIn1.getValue()) {
std::stringstream ss;
ss << "Test Failure: IterationID+1 [" << myiter+1 << "] does not match taskIn1 [" << sin->taskIn1.getValue()<< "].";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (myiter == 0 && sin->iterCount.getValue() != sin->loopPortIn1.getValue()) {
std::stringstream ss;
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterCount [" << sin->iterCount.getValue()<< "] in 1st iteration.";
throw wfr::exception::wfr_fatal_error(ss.str());
}
if (myiter > 0 && sin->loopPortIn1.getValue() != myiter) {
std::stringstream ss;
ss << "Test Failure: LoopPortIn1 [" << sin->loopPortIn1.getValue() << "] does not match iterationID- [" << myiter << "] in subsequent iterations.";
throw wfr::exception::wfr_fatal_error(ss.str());
}
EXECUTE_SIMULATION_MODE
sout->taskOut1.setValue(sin->taskIn1.getValue());
sout->isOK.setValue(true);