From a8322252cee05956be7f7b52acb2937976a567fd Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 18 Nov 2017 12:13:16 +0100 Subject: [PATCH] In Etesian, issue an error message in case of unplaced macro-block. In Etesian, issue an error message in case of unplaced macro-block. --- etesian/src/EtesianEngine.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 541186a2..a8f0a5cf 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -425,8 +425,24 @@ namespace Etesian { if (not cmess2.enabled()) dots.disable(); + size_t instancesNb = 0; + for ( Occurrence occurrence : getCell()->getLeafInstanceOccurrences() ) { + Instance* instance = static_cast(occurrence.getEntity()); + Cell* masterCell = instance->getMasterCell(); + + if ( (instance->getPlacementStatus() != Instance::PlacementStatus::PLACED) + and (instance->getPlacementStatus() != Instance::PlacementStatus::FIXED ) + and (masterCell->getAbutmentBox().getHeight() != getSliceHeight()) ) { + throw Error( "EtesianEngine::toColoquinte(): Cannot manage unplaced block, instance \"%s\" of \"%s\"." + , getString(instance ->getName()).c_str() + , getString(masterCell->getName()).c_str() + ); + } + + ++instancesNb; + } + // Coloquinte circuit description data-structures. - size_t instancesNb = getCell()->getLeafInstanceOccurrences().getSize(); vector idsToTransf ( instancesNb ); vector instances ( instancesNb ); vector< point > positions ( instancesNb );