Go to the documentation of this file.
60 bool conflictDetectionEnabled) :
61 machine_(
machine), conflictDetectionEnabled_(conflictDetectionEnabled),
62 symbolGen_(symbolGenerator) {
68 string conflictDetectionSetting;
73 conflictDetectionSetting =
"AFSA";
75 conflictDetectionSetting = SETTING;
78 if (conflictDetectionSetting ==
"CRT") {
83 }
else if (conflictDetectionSetting ==
"AFSA") {
88 }
else if (conflictDetectionSetting ==
"LFSA") {
93 }
else if (conflictDetectionSetting ==
"DCM") {
100 <<
"Unknown CONFLICT_DETECTION_SETTING: '"
101 << conflictDetectionSetting <<
"'" << endl;
112 for (
int i = 0; i < fus.
count(); ++i) {
144 std::stringstream ss;
145 ss <<
"#include \"FSAFUResourceConflictDetector.hh\"" << endl << endl;
161 std::stringstream ss;
175 std::stringstream ss;
177 for (ConflictDetectorObjectNameMap::const_iterator i =
179 ss <<
"\t" << i->second <<
"."
197 std::stringstream ss;
199 <<
"\tif (conflictDetected_) {" << endl
200 <<
"\thaltSimulation(__FILE__, __LINE__, __FUNCTION__,"
201 <<
"\"Conflict detected!\");" << endl
217 std::stringstream ss;
219 for (ConflictDetectorObjectNameMap::const_iterator i =
221 ss <<
"\t," << i->second
222 <<
"(functionUnit(\"" << i->first <<
"\"))"
239 std::stringstream ss;
241 for (ConflictDetectorObjectNameMap::const_iterator i =
243 ss <<
"\t" << (*i).second <<
"."
268 int operationID = -1;
275 std::stringstream ss;
277 ss <<
"engine.conflictDetected_ |= !engine." << detector <<
"."
std::string conflictDetectorExtraInitMethod_
A method to be called on the conflict detector for initialization, empty if none.
virtual TCEString name() const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
std::string detectConflicts(const TTAMachine::HWOperation &op)
ConflictDetectorObjectNameMap conflictDetectors_
The resource conflict detector object name for each FU if any.
const CompiledSimSymbolGenerator & symbolGen_
Symbol generator.
static std::ostream & logStream()
bool conflictDetectionEnabled() const
std::string conflictDetectorAdvanceCycle_
The method to be called on the conflict detector on cycle advance.
const TTAMachine::Machine & machine_
The machine.
virtual ~ConflictDetectionCodeGenerator()
const std::string & name() const
ConflictDetectionCodeGenerator(const TTAMachine::Machine &machine, const CompiledSimSymbolGenerator &, bool conflictDetectionEnabled=false)
virtual FunctionUnitNavigator functionUnitNavigator() const
std::string notifyOfConflicts()
virtual int operationCount() const
std::string conflictDetectorType_
The FU resource conflict detector used, empty string if disabled.
std::string updateSymbolDeclarations()
FunctionUnit * parentUnit() const
bool needsConflictDetection() const
std::string symbolDeclaration(const TTAMachine::FunctionUnit &fu)
ComponentType * item(int index) const
virtual HWOperation * operation(const std::string &name) const
static std::string environmentVariable(const std::string &variable)
std::string conflictDetectorMethod_
The method in the resource conflict detector used to detect conflicts, empty string if disabled.
std::string conflictDetectorSymbol(const TTAMachine::FunctionUnit &fu) const
std::string advanceClockCode()
std::string extraInitialization()
bool conflictDetectionEnabled_
True, if the conflict detection is enabled.