coriolis/tramontana/src/QueryTiles.cpp

92 lines
2.6 KiB
C++
Raw Normal View History

Transhierarchical/flat extraction work, no netlist rebuild yet. * Bug: In Interval::intersect(), bad condition check in strict mode. * Change: In Occurrence::operator<(), change the sorting criterions so that the ones with no paths are "lower", then the one with no entities, then compare entities Id then Path hashes. * Change: In Occurrence::getCompactString(), to be more readable, suppress leading and ending "<>". * Change: In IntervalTree, now use an IntervalDataCompare to control the ordering of the nodes inside the tree. This may be needed when IntervalData is build upon a pointer, we don't want to sort on pointer values (non deterministic) . * Bug: In IntervalTree::postRemove(), there was an incorrect computation of the updated childsVMax. * Bug: In IntervalTree::beginOverlaps(), miscalculated leftmost interval overlapping. * Bug: In RbTree::remove(), when exchanging the removed node for a leaf, fully swap the nodes contents, was incompletly copied before. * New: In CellWidget, add new slots selectSet(OccurrenceSet&) and unselectSet(OccurrenceSet&), to be able to select/unselected sets of Occurrence (for use by TabEquipotentials). * Change: In EtesianEngine, no more need to remove leading/ending "<>". * New: In Tramontana, use a Query to find all the Occurrence under an area. Previously we were using Cell::getOccurrencesUnder() which *do not* return the components in instances, so we would have been unable to find trans-hierarchical shorts circuits. * New: In tramontana, now use a Relation to tag all the components belonging to an Equipotential. * Change: In Equipotential, store everything under the form of Occurrence, instead of Components. Due to the way the Occurrences are sorted, the one holding Components should be firts.
2023-04-02 16:02:46 -05:00
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) Sorbonne Université 2007-2023, All Rights Reserved
//
// +-----------------------------------------------------------------+
// | C O R I O L I S |
// | T r a m o n t a n a - Extractor & LVX |
// | |
// | Algorithm : Christian MASSON |
// | First impl. : Yifei WU |
// | Second impl. : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./QueryTiles.cpp" |
// +-----------------------------------------------------------------+
#include <vector>
#include "tramontana/QueryTiles.h"
#include "tramontana/SweepLine.h"
namespace Tramontana {
using std::cerr;
using std::endl;
using std::vector;
QueryTiles::QueryTiles ( SweepLine* sweepLine )
: Query ()
, _sweepLine (sweepLine)
, _goMatchCount (0)
, _processedLayers(0)
{
setCell ( sweepLine->getCell() );
setArea ( sweepLine->getCell()->getBoundingBox() );
setFilter( Query::DoComponents|Query::DoTerminalCells );
}
void QueryTiles::setBasicLayer ( const BasicLayer* basicLayer )
{
_processedLayers |= basicLayer->getMask();
Query::setBasicLayer ( basicLayer );
}
bool QueryTiles::isProcessed ( Component* component ) const
{
Layer::Mask fullyProcesseds = _processedLayers & ~getBasicLayer()->getMask();
return component->getLayer()->getMask().intersect( fullyProcesseds );
}
void QueryTiles::masterCellCallback ()
{ }
void QueryTiles::rubberCallback ( Rubber* )
{ }
void QueryTiles::extensionGoCallback ( Go* )
{ }
bool QueryTiles::hasGoCallback () const
{ return true; }
void QueryTiles::goCallback ( Go* go )
{
vector<Tile*> tiles;
Component* component = dynamic_cast<Component*>( go );
if (not component) return;
if (isProcessed(component)) return;
Occurrence occurrence = Occurrence( go, getPath() );
for ( const BasicLayer* layer : _sweepLine->getExtracteds() ) {
if (not component->getLayer()->getMask().intersect(layer->getMask())) continue;
tiles.push_back( Tile::create( occurrence, layer ));
_sweepLine->add( tiles.back() );
if (tiles.size() > 1)
tiles.back()->setParent( tiles[0] );
}
_goMatchCount++;
}
} // Tramontana namespace.