Go to the documentation of this file.
33 #include <boost/format.hpp>
46 MachineCheck(
"Check operation binding, port directions, triggers") {}
62 bool triggerok =
true;
63 for (
int i = 0; i < fuNav.
count(); i++) {
67 FUPort* triggerPort = NULL;
73 if ( triggerPort != NULL) {
75 *
this, (boost::format(
"Multiple trigger ports are "
76 "not supported, Used in FU: %s")
86 *
this, (boost::format(
"Opcode setting and trigger "
87 "port differ in FU: ")
96 if ( triggerPort == NULL) {
98 *
this, (boost::format(
"Trigger port not found in FU: %s")
107 bool triggerRead =
false;
112 for (ExecutionPipeline::OperandSet::const_iterator iter =
113 reads.begin(); iter != reads.end(); iter++) {
116 std::string errorMsg =
118 "Operation %s in FU %s reads operand %d which "
119 "is not connected to input socket. "
120 "Check port bindings!")
121 % hwop.
name() % fu.
name() % *iter).str();
123 results.
addError(*
this, (errorMsg));
127 if (readPort == triggerPort) {
134 if ( triggerok && !triggerRead) {
135 std::string errorMsg =
137 "Trigger not bound for operation: %s in FU %s") %
146 for (ExecutionPipeline::OperandSet::const_iterator iter =
147 writes.begin(); iter != writes.end(); iter++) {
151 *
this, (boost::format(
"Operation %s in FU %s "
153 "which is not connected to "
155 "Check port bindings!")
156 % hwop.
name() % fu.
name() % *iter).str());
virtual Socket * inputSocket() const
virtual TCEString name() const
virtual bool isOpcodeSetting() const
void addError(const MachineCheck &check, const std::string &errorMsg)
OperandSet writtenOperands(int cycle) const
OperandSet readOperands(int cycle) const
virtual bool isTriggering() const
virtual FUPort * port(int operand) const
const std::string & name() const
virtual FunctionUnitNavigator functionUnitNavigator() const
virtual int operationCount() const
std::set< int > OperandSet
Set for operand indexes.
virtual int operationPortCount() const
virtual Socket * outputSocket() const
virtual bool check(const TTAMachine::Machine &mach, MachineCheckResults &results) const
ExecutionPipeline * pipeline() const
ComponentType * item(int index) const
virtual HWOperation * operation(const std::string &name) const
virtual FUPort * operationPort(const std::string &name) const