WIP: rerun LVS, partial LVS

Rerun LVS: a button is provided which allows re-running
the LVS or netlist extraction from the netlist browser.
TODO: a generic concept for triggering the generators

"Partial LVS" is a feature where it's possible to
select a layout subcell - running LVS then will only
compare against the corresponding schematic subcell, not
the whole tree. The magic is done by "align" which will
remove the upper hierarchy part.
This commit is contained in:
Matthias Koefferlein
2019-08-24 22:56:20 +02:00
parent c543fe7a44
commit 444e10d32f
16 changed files with 105 additions and 19 deletions
@@ -132,6 +132,20 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="rerun_button">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../../lay/lay/layResources.qrc">
<normaloff>:/run.png</normaloff>:/run.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
@@ -30,6 +30,7 @@
#include "layMarker.h"
#include "layNetInfoDialog.h"
#include "layNetExportDialog.h"
#include "lymMacro.h"
#include "tlProgress.h"
#include "tlExceptions.h"
#include "dbLayoutToNetlist.h"
@@ -124,6 +125,7 @@ NetlistBrowserPage::NetlistBrowserPage (QWidget * /*parent*/)
m_update_needed (true),
mp_info_dialog (0),
dm_update_highlights (this, &NetlistBrowserPage::update_highlights),
dm_rerun_macro (this, &NetlistBrowserPage::rerun_macro),
m_cell_context_cache (0)
{
Ui::NetlistBrowserPage::setupUi (this);
@@ -188,6 +190,7 @@ NetlistBrowserPage::NetlistBrowserPage (QWidget * /*parent*/)
connect (m_show_all_action, SIGNAL (triggered ()), this, SLOT (show_all_clicked ()));
connect (info_button, SIGNAL (pressed ()), this, SLOT (info_button_pressed ()));
connect (rerun_button, SIGNAL (pressed ()), this, SLOT (rerun_button_pressed ()));
connect (find_button, SIGNAL (pressed ()), this, SLOT (find_button_pressed ()));
connect (forward, SIGNAL (clicked ()), this, SLOT (navigate_forward ()));
connect (backward, SIGNAL (clicked ()), this, SLOT (navigate_back ()));
@@ -585,6 +588,27 @@ NetlistBrowserPage::navigate_forward ()
}
}
void
NetlistBrowserPage::rerun_button_pressed ()
{
// NOTE: we use deferred execution, because otherwise the button won't get repainted properly
dm_rerun_macro ();
}
void
NetlistBrowserPage::rerun_macro ()
{
if (! mp_database->generator ().empty ()) {
lym::Macro *generator = lym::MacroCollection::root ().find_macro (mp_database->generator ());
if (! generator) {
throw tl::Exception (tl::sprintf (tl::to_string (tr ("Cannot find generator script: %s")), mp_database->generator()));
} else {
generator->run ();
}
}
}
void
NetlistBrowserPage::info_button_pressed ()
{
@@ -741,6 +765,13 @@ NetlistBrowserPage::set_db (db::LayoutToNetlist *l2ndb)
db::LayoutVsSchematic *lvsdb = dynamic_cast<db::LayoutVsSchematic *> (l2ndb);
mp_database.reset (l2ndb);
rerun_button->setEnabled (mp_database.get () && ! mp_database->generator ().empty ());
if (rerun_button->isEnabled ()) {
rerun_button->setToolTip (tl::to_qstring (tl::to_string (tr ("Run ")) + mp_database->generator ()));
} else {
rerun_button->setToolTip (QString ());
}
show_netlist->setVisible (lvsdb != 0);
show_xref->setVisible (lvsdb != 0);
@@ -169,6 +169,7 @@ public slots:
private slots:
void show_all_clicked ();
void info_button_pressed ();
void rerun_button_pressed ();
void find_button_pressed ();
void anchor_clicked (const QString &url);
void navigate_back ();
@@ -212,6 +213,7 @@ private:
std::vector<const db::Circuit *> m_current_circuits;
lay::NetInfoDialog *mp_info_dialog;
tl::DeferredMethod<NetlistBrowserPage> dm_update_highlights;
tl::DeferredMethod<NetlistBrowserPage> dm_rerun_macro;
db::ContextCache m_cell_context_cache;
void set_db (db::LayoutToNetlist *l2ndb);
@@ -233,6 +235,7 @@ private:
bool produce_highlights_for_subcircuit (const db::SubCircuit *subcircuit, size_t &n_markers, const std::vector<db::DCplxTrans> &tv);
bool produce_highlights_for_circuit (const db::Circuit *circuit, size_t &n_markers, const std::vector<db::DCplxTrans> &tv);
void configure_marker (lay::Marker *marker, bool with_fill);
void rerun_macro ();
void export_nets (const std::vector<const db::Net *> *nets);
};
+3 -3
View File
@@ -275,9 +275,9 @@ HEADERS = \
layNetlistBrowserTreeModel.h \
layLibrariesView.h
INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb
INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
DEPENDPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC $$LYM_INC
LIBS += -L$$DESTDIR -lklayout_tl -lklayout_gsi -lklayout_db -lklayout_rdb -lklayout_lym
INCLUDEPATH += $$QTBASIC_INC
DEPENDPATH += $$QTBASIC_INC