* ./metis:
- Change: In MetisGraph CTOR, clearer error message when there is duplicated instances. Show the full occurrence path of each conflicting instance.
This commit is contained in:
parent
725cf8b2e6
commit
a3dd3f6d4f
|
@ -157,17 +157,23 @@ MetisGraph::MetisGraph ( MetisEngine* metis, GCell* gcell )
|
||||||
, _partResultVector()
|
, _partResultVector()
|
||||||
, _edgeCut(INT_MAX)
|
, _edgeCut(INT_MAX)
|
||||||
{
|
{
|
||||||
typedef set<Instance*> InstanceSet;
|
typedef map<Instance*,Occurrence> OccurrencesLUT;
|
||||||
InstanceSet instanceSet;
|
OccurrencesLUT occurrencesLUT;
|
||||||
|
|
||||||
for_each_occurrence(occurrence, _cell->getLeafInstanceOccurrences())
|
for_each_occurrence(occurrence, _cell->getLeafInstanceOccurrences())
|
||||||
{
|
{
|
||||||
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
||||||
if (!instance->isFixed())
|
if (!instance->isFixed()) {
|
||||||
{
|
OccurrencesLUT::iterator duplicated = occurrencesLUT.find(instance);
|
||||||
if (instanceSet.find(instance) != instanceSet.end())
|
if (duplicated != occurrencesLUT.end()) {
|
||||||
throw Error("MetisEngine limitation : only one occurrence of unplaced instance");
|
throw Error("MetisEngine limitation: Each unplaced instance must have one occurrence only.\n"
|
||||||
instanceSet.insert(instance);
|
"Model %s is intanciated as:<b>\n. %s\n. %s</b>\n (at least)."
|
||||||
|
,getString(instance->getMasterCell()->getName()).c_str()
|
||||||
|
,occurrence.getCompactString().c_str()
|
||||||
|
,(*duplicated).second.getCompactString().c_str()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
occurrencesLUT.insert(make_pair(instance,occurrence));
|
||||||
_toPlaceInstanceOccurrencesSet.insert(occurrence); //treat this later
|
_toPlaceInstanceOccurrencesSet.insert(occurrence); //treat this later
|
||||||
}
|
}
|
||||||
end_for;
|
end_for;
|
||||||
|
|
Loading…
Reference in New Issue