Skip to content

Commit 21b13f2

Browse files
committed
gui: add option to force drawing of flywires even when routing it present
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
1 parent 8881d16 commit 21b13f2

4 files changed

Lines changed: 28 additions & 11 deletions

File tree

src/gui/src/dbDescriptors.cpp

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "db_sta/dbSta.hh"
2323
#include "odb/db.h"
2424
#include "odb/dbShape.h"
25+
#include "options.h"
2526
#include "sta/Liberty.hh"
2627
#include "utl/Logger.h"
2728
#include "utl/algorithms.h"
@@ -1380,19 +1381,26 @@ void DbNetDescriptor::highlight(std::any object, Painter& painter) const
13801381
}
13811382
}
13821383

1383-
odb::dbWire* wire = net->getWire();
1384-
if (wire) {
1385-
if (sink_object != nullptr) {
1386-
drawPathSegment(net, sink_object, painter);
1387-
}
1384+
bool draw_flywires = painter.getOptions()->isFlywireHighlightOnly();
1385+
1386+
if (!draw_flywires) {
1387+
odb::dbWire* wire = net->getWire();
1388+
if (wire) {
1389+
draw_flywires = false;
1390+
if (sink_object != nullptr) {
1391+
drawPathSegment(net, sink_object, painter);
1392+
}
13881393

1389-
odb::dbWireShapeItr it;
1390-
it.begin(wire);
1391-
odb::dbShape shape;
1392-
while (it.next(shape)) {
1393-
painter.drawRect(shape.getBox());
1394+
odb::dbWireShapeItr it;
1395+
it.begin(wire);
1396+
odb::dbShape shape;
1397+
while (it.next(shape)) {
1398+
painter.drawRect(shape.getBox());
1399+
}
13941400
}
1395-
} else if (!is_supply && !is_routed_special) {
1401+
}
1402+
1403+
if (draw_flywires && !is_supply && !is_routed_special) {
13961404
std::set<odb::Point> driver_locs;
13971405
std::set<odb::Point> sink_locs;
13981406
for (auto inst_term : net->getITerms()) {

src/gui/src/displayControls.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ DisplayControls::DisplayControls(QWidget* parent)
515515
makeLeafItem(
516516
misc_.manufacturing_grid, "Manufacturing grid", misc, Qt::Unchecked);
517517
makeLeafItem(misc_.gcell_grid, "GCell grid", misc, Qt::Unchecked);
518+
makeLeafItem(misc_.flywires_only, "Flywires only", misc, Qt::Unchecked);
518519
makeLeafItem(misc_.labels, "Labels", misc, Qt::Checked, true);
519520
setNameItemDoubleClickAction(misc_.labels, [this]() {
520521
label_font_
@@ -1860,6 +1861,11 @@ bool DisplayControls::isGCellGridVisible() const
18601861
return isModelRowVisible(&misc_.gcell_grid);
18611862
}
18621863

1864+
bool DisplayControls::isFlywireHighlightOnly() const
1865+
{
1866+
return isModelRowVisible(&misc_.flywires_only);
1867+
}
1868+
18631869
bool DisplayControls::areIOPinsVisible() const
18641870
{
18651871
return isModelRowVisible(&shape_types_.pins);

src/gui/src/displayControls.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ class DisplayControls : public QDockWidget,
243243
bool isModuleView() const override;
244244

245245
bool isGCellGridVisible() const override;
246+
bool isFlywireHighlightOnly() const override;
246247

247248
// API from dbNetworkObserver
248249
void postReadLiberty() override;
@@ -378,6 +379,7 @@ class DisplayControls : public QDockWidget,
378379
ModelRow module;
379380
ModelRow manufacturing_grid;
380381
ModelRow gcell_grid;
382+
ModelRow flywires_only;
381383
ModelRow labels;
382384
ModelRow background;
383385
};

src/gui/src/options.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class Options
8787
virtual bool isModuleView() const = 0;
8888

8989
virtual bool isGCellGridVisible() const = 0;
90+
virtual bool isFlywireHighlightOnly() const = 0;
9091
};
9192

9293
} // namespace gui

0 commit comments

Comments
 (0)