From c293c57fb82ed624ae633c0ab358bfd4460b4f35 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Tue, 8 Jun 2010 12:02:03 +0000 Subject: [PATCH] * ./hurricane: - Change: In Instance & Cell, do *not* materialize unplaced instances. This is to avoid overloading the QuadTree at point (0,0) and besides has no senses. Uses the PlacementStatus state. - Bug: In Viewer CMakeLists.txt, put tool include directories first. --- hurricane/src/hurricane/Cell.cpp | 10 +++++++--- hurricane/src/hurricane/Instance.cpp | 22 +++++++++++++++++----- hurricane/src/isobar/CMakeLists.txt | 4 ++-- hurricane/src/viewer/CMakeLists.txt | 6 +++--- 4 files changed, 29 insertions(+), 13 deletions(-) diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index e7ccd6dc..311b6b8f 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -258,9 +258,13 @@ void Cell::flattenNets(bool buildRings) void Cell::materialize() // ********************* { - for_each_instance(instance, getInstances()) instance->materialize(); end_for; - for_each_net(net, getNets()) net->materialize(); end_for; - for_each_marker(marker, getMarkers()) marker->materialize(); end_for; + forEach ( Instance*, iinstance, getInstances() ) { + if ( iinstance->getPlacementStatus() != Instance::PlacementStatus::UNPLACED ) + iinstance->materialize(); + } + + forEach ( Net* , inet , getNets () ) inet ->materialize(); + forEach ( Marker*, imarker, getMarkers() ) imarker->materialize(); } void Cell::unmaterialize() diff --git a/hurricane/src/hurricane/Instance.cpp b/hurricane/src/hurricane/Instance.cpp index aed30e9b..bbc64dd6 100644 --- a/hurricane/src/hurricane/Instance.cpp +++ b/hurricane/src/hurricane/Instance.cpp @@ -303,7 +303,7 @@ InstanceFilter Instance::getIsNotUnplacedFilter() void Instance::materialize() // ************************* { - if (!isMaterialized()) { + if (not isMaterialized()) { Box boundingBox = getBoundingBox(); if (!boundingBox.isEmpty()) { QuadTree* quadTree = _cell->_getQuadTree(); @@ -375,10 +375,17 @@ void Instance::setTransformation(const Transformation& transformation) void Instance::setPlacementStatus(const PlacementStatus& placementstatus) // ********************************************************************** { -// if (placementstatus != _placementStatus) { -// Invalidate(true); - _placementStatus = placementstatus; -// } + if (placementstatus != _placementStatus) { + invalidate(true); + + if (_placementStatus == PlacementStatus::UNPLACED) + materialize (); + else if ( placementstatus == PlacementStatus::UNPLACED ) + unmaterialize (); + + _placementStatus = placementstatus; + + } } void Instance::setMasterCell(Cell* masterCell, bool secureFlag) @@ -449,7 +456,12 @@ void Instance::_postCreate() end_for; } + bool autoMaterialization = not autoMaterializationIsDisabled(); + disableAutoMaterialization(); + Inherit::_postCreate(); + + if ( autoMaterialization ) enableAutoMaterialization(); } void Instance::_preDestroy() diff --git a/hurricane/src/isobar/CMakeLists.txt b/hurricane/src/isobar/CMakeLists.txt index 65b536ec..0c3c43cd 100644 --- a/hurricane/src/isobar/CMakeLists.txt +++ b/hurricane/src/isobar/CMakeLists.txt @@ -1,7 +1,7 @@ - include_directories ( ${PYTHON_INCLUDE_PATH} - ${HURRICANE_SOURCE_DIR}/src/hurricane + include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane ${HURRICANE_SOURCE_DIR}/src/isobar + ${PYTHON_INCLUDE_PATH} ) set ( sources ProxyProperty.cpp PyBox.cpp diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index 2ef6a8b9..98445b33 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -1,9 +1,9 @@ include ( ${QT_USE_FILE} ) - include_directories ( ${Boost_INCLUDE_DIRS} - ${HURRICANE_SOURCE_DIR}/src/hurricane - ${HURRICANE_SOURCE_DIR}/src/viewer ) + include_directories ( ${HURRICANE_SOURCE_DIR}/src/hurricane + ${HURRICANE_SOURCE_DIR}/src/viewer + ${Boost_INCLUDE_DIRS} ) set ( mocincludes hurricane/viewer/HApplication.h hurricane/viewer/PaletteItem.h