coriolis/tramontana/src/QueryTiles.cpp

106 lines
3.1 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 )
{
Add Rectilinear & "cut" support to the extractor. Note about the managment of VIA & cuts: Components using a layer which is a ViaLayer, that is one containing more than one BasicLayer, multiple tiles are created in QueryTiles::goCallback(). Components that have a single BasicLayer of "cut" material will also have their multiples tiles created in QueryTiles::goCallback(). Rectilinear components will have their multiples tiles created in Tile::create(). Tile::create() return not all the tiles but the one used as root (for the union find). * New: In SweepLine::_buildCutConnexMap(), when using a "cut" layer in a standalone way, and not as part of a ViaLayer, we do not automatically know to which layer above & below they are connected. We build a table for each cut layer, based on the ViaLayer, to know all tops & belows layers they connect (this is cumulative, in the case of "cut" towards the substrate). Then in Tile::create(), we not only create the tile for the "cut" but also in thoses connected layers (and link them in the union find). * New: In Tile::create(), when we encounter a Rectilinear, break it into rectangles and make as many tiles. All tiles linked to the same root in the union find. * Bug: In Hurricane::Rectilinear, ambiguous specification of the set of points defining the shape. I did suppose that the start and and point where not the same the last edge being between them. But if FlexLib, it uses the GDSII inspired convention where the first and last point must be the same, to indicate a closed contour. This difference was not causing any difference with the drawing, but it was a problem for getAsRectangle(). This was creating a "false" extra vertical edge leading to a bigger rectangle. And this, in turn, was making "false" intersections in the tiling/sweepline of the extractor. Add a more thorough checking of the points vector.
2023-05-05 09:22:51 -05:00
Tile* rootTile = nullptr;
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
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;
Add Rectilinear & "cut" support to the extractor. Note about the managment of VIA & cuts: Components using a layer which is a ViaLayer, that is one containing more than one BasicLayer, multiple tiles are created in QueryTiles::goCallback(). Components that have a single BasicLayer of "cut" material will also have their multiples tiles created in QueryTiles::goCallback(). Rectilinear components will have their multiples tiles created in Tile::create(). Tile::create() return not all the tiles but the one used as root (for the union find). * New: In SweepLine::_buildCutConnexMap(), when using a "cut" layer in a standalone way, and not as part of a ViaLayer, we do not automatically know to which layer above & below they are connected. We build a table for each cut layer, based on the ViaLayer, to know all tops & belows layers they connect (this is cumulative, in the case of "cut" towards the substrate). Then in Tile::create(), we not only create the tile for the "cut" but also in thoses connected layers (and link them in the union find). * New: In Tile::create(), when we encounter a Rectilinear, break it into rectangles and make as many tiles. All tiles linked to the same root in the union find. * Bug: In Hurricane::Rectilinear, ambiguous specification of the set of points defining the shape. I did suppose that the start and and point where not the same the last edge being between them. But if FlexLib, it uses the GDSII inspired convention where the first and last point must be the same, to indicate a closed contour. This difference was not causing any difference with the drawing, but it was a problem for getAsRectangle(). This was creating a "false" extra vertical edge leading to a bigger rectangle. And this, in turn, was making "false" intersections in the tiling/sweepline of the extractor. Add a more thorough checking of the points vector.
2023-05-05 09:22:51 -05:00
Tile* tile = Tile::create( occurrence
, layer
, rootTile
, _sweepLine );
if (not rootTile) rootTile = tile;
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
}
Add Rectilinear & "cut" support to the extractor. Note about the managment of VIA & cuts: Components using a layer which is a ViaLayer, that is one containing more than one BasicLayer, multiple tiles are created in QueryTiles::goCallback(). Components that have a single BasicLayer of "cut" material will also have their multiples tiles created in QueryTiles::goCallback(). Rectilinear components will have their multiples tiles created in Tile::create(). Tile::create() return not all the tiles but the one used as root (for the union find). * New: In SweepLine::_buildCutConnexMap(), when using a "cut" layer in a standalone way, and not as part of a ViaLayer, we do not automatically know to which layer above & below they are connected. We build a table for each cut layer, based on the ViaLayer, to know all tops & belows layers they connect (this is cumulative, in the case of "cut" towards the substrate). Then in Tile::create(), we not only create the tile for the "cut" but also in thoses connected layers (and link them in the union find). * New: In Tile::create(), when we encounter a Rectilinear, break it into rectangles and make as many tiles. All tiles linked to the same root in the union find. * Bug: In Hurricane::Rectilinear, ambiguous specification of the set of points defining the shape. I did suppose that the start and and point where not the same the last edge being between them. But if FlexLib, it uses the GDSII inspired convention where the first and last point must be the same, to indicate a closed contour. This difference was not causing any difference with the drawing, but it was a problem for getAsRectangle(). This was creating a "false" extra vertical edge leading to a bigger rectangle. And this, in turn, was making "false" intersections in the tiling/sweepline of the extractor. Add a more thorough checking of the points vector.
2023-05-05 09:22:51 -05:00
BasicLayer* cutLayer = component->getLayer()->getBasicLayers().getFirst();
if (cutLayer->getMaterial() == BasicLayer::Material::cut) {
const SweepLine::LayerSet& connexSet = _sweepLine->getCutConnexLayers( cutLayer );
for ( const BasicLayer* connexLayer : connexSet ) {
Tile::create( occurrence
, connexLayer
, rootTile
, _sweepLine
, Tile::ForceLayer );
}
}
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
_goMatchCount++;
}
} // Tramontana namespace.