Just skip placement when there is no instances to place.
* New: In EtesianEngine::toColoquinte(), fixed blocks must not be accounted as instances to be placed. When, there is no instances to place, just issue an error message and return.
This commit is contained in:
parent
ea38329de1
commit
63854d80c1
|
@ -367,6 +367,8 @@ namespace Etesian {
|
||||||
size_t instanceNb = 0;
|
size_t instanceNb = 0;
|
||||||
double cellLength = 0;
|
double cellLength = 0;
|
||||||
|
|
||||||
|
cmess2 << " o Looking through the hierarchy." << endl;
|
||||||
|
|
||||||
vector<Occurrence> feedOccurrences;
|
vector<Occurrence> feedOccurrences;
|
||||||
for( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences() )
|
for( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences() )
|
||||||
{
|
{
|
||||||
|
@ -382,6 +384,7 @@ namespace Etesian {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cmess2 << " - Using as block: " << occurrence.getCompactString() << "." << endl;
|
||||||
cellLength += DbU::toLambda( _bloatCells.getAb( occurrence ).getWidth() );
|
cellLength += DbU::toLambda( _bloatCells.getAb( occurrence ).getWidth() );
|
||||||
instanceNb += 1;
|
instanceNb += 1;
|
||||||
}
|
}
|
||||||
|
@ -538,7 +541,7 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EtesianEngine::toColoquinte ()
|
size_t EtesianEngine::toColoquinte ()
|
||||||
{
|
{
|
||||||
AllianceFramework* af = AllianceFramework::get();
|
AllianceFramework* af = AllianceFramework::get();
|
||||||
DbU::Unit hpitch = getHorizontalPitch();
|
DbU::Unit hpitch = getHorizontalPitch();
|
||||||
|
@ -548,6 +551,23 @@ namespace Etesian {
|
||||||
cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl;
|
cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl;
|
||||||
cmess1 << ::Dots::asString(" - V-pitch" , DbU::getValueString(vpitch)) << endl;
|
cmess1 << ::Dots::asString(" - V-pitch" , DbU::getValueString(vpitch)) << endl;
|
||||||
|
|
||||||
|
cmess2 << " o Looking through the hierarchy." << endl;
|
||||||
|
|
||||||
|
for( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences() )
|
||||||
|
{
|
||||||
|
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
||||||
|
Cell* masterCell = instance->getMasterCell();
|
||||||
|
string instanceName = occurrence.getCompactString();
|
||||||
|
|
||||||
|
if (masterCell->getAbutmentBox().getHeight() != getSliceHeight())
|
||||||
|
cmess2 << " - Using as block: " << instanceName << "." << endl;
|
||||||
|
|
||||||
|
if (instance->getPlacementStatus() != Instance::PlacementStatus::FIXED) {
|
||||||
|
cerr << Error( "EtesianEngine::toColoquinte(): Block instance \"%s\" is *not* FIXED."
|
||||||
|
, getString(instance->getName()).c_str() ) << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Dots dots ( cmess2, " ", 80, 1000 );
|
Dots dots ( cmess2, " ", 80, 1000 );
|
||||||
if (not cmess2.enabled()) dots.disable();
|
if (not cmess2.enabled()) dots.disable();
|
||||||
|
|
||||||
|
@ -556,9 +576,19 @@ namespace Etesian {
|
||||||
if (getBlockInstance()) topTransformation = getBlockInstance()->getTransformation();
|
if (getBlockInstance()) topTransformation = getBlockInstance()->getTransformation();
|
||||||
topTransformation.applyOn( topAb );
|
topTransformation.applyOn( topAb );
|
||||||
|
|
||||||
size_t instancesNb = getCell()->getTerminalNetlistInstanceOccurrences(getBlockInstance()).getSize();
|
size_t instancesNb = 0;
|
||||||
if (not instancesNb)
|
for ( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences(getBlockInstance()) ) {
|
||||||
throw Error( "EtesianEngine::toColoquinte(): No instance to place." );
|
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
||||||
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED)
|
||||||
|
continue;
|
||||||
|
++instancesNb;
|
||||||
|
}
|
||||||
|
if (not instancesNb) {
|
||||||
|
cerr << Error( "EtesianEngine::toColoquinte(): \"%s\" has no instance to place, doing nothing."
|
||||||
|
, getString(getCell()->getName()).c_str()
|
||||||
|
) << endl;
|
||||||
|
return instancesNb;
|
||||||
|
}
|
||||||
|
|
||||||
// Coloquinte circuit description data-structures.
|
// Coloquinte circuit description data-structures.
|
||||||
// One dummy fixed instance at the end
|
// One dummy fixed instance at the end
|
||||||
|
@ -595,6 +625,9 @@ namespace Etesian {
|
||||||
throw Error( "EtesianEngine::toColoquinte(): Feed instance \"%s\" found."
|
throw Error( "EtesianEngine::toColoquinte(): Feed instance \"%s\" found."
|
||||||
, instanceName.c_str() );
|
, instanceName.c_str() );
|
||||||
}
|
}
|
||||||
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
|
||||||
Box instanceAb = _bloatCells.getAb( occurrence );
|
Box instanceAb = _bloatCells.getAb( occurrence );
|
||||||
|
|
||||||
|
@ -758,6 +791,8 @@ namespace Etesian {
|
||||||
_placementLB.positions_ = positions;
|
_placementLB.positions_ = positions;
|
||||||
_placementLB.orientations_ = orientations;
|
_placementLB.orientations_ = orientations;
|
||||||
_placementUB = _placementLB;
|
_placementUB = _placementLB;
|
||||||
|
|
||||||
|
return instancesNb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1017,7 +1052,7 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
findYSpin();
|
findYSpin();
|
||||||
toColoquinte();
|
if (not toColoquinte()) return;
|
||||||
|
|
||||||
Effort placementEffort = getPlaceEffort();
|
Effort placementEffort = getPlaceEffort();
|
||||||
GraphicUpdate placementUpdate = getUpdateConf();
|
GraphicUpdate placementUpdate = getUpdateConf();
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace Etesian {
|
||||||
void adjustSliceHeight ();
|
void adjustSliceHeight ();
|
||||||
void resetPlacement ();
|
void resetPlacement ();
|
||||||
void loadLeafCellLayouts ();
|
void loadLeafCellLayouts ();
|
||||||
void toColoquinte ();
|
size_t toColoquinte ();
|
||||||
void preplace ();
|
void preplace ();
|
||||||
void roughLegalize ( float minDisruption, unsigned options );
|
void roughLegalize ( float minDisruption, unsigned options );
|
||||||
void globalPlace ( float initPenalty, float minDisruption, float targetImprovement, float minInc, float maxInc, unsigned options=0 );
|
void globalPlace ( float initPenalty, float minDisruption, float targetImprovement, float minInc, float maxInc, unsigned options=0 );
|
||||||
|
|
Loading…
Reference in New Issue