From 311d9c6eb533a3045c68f2c2d15cfd7ed749f084 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 14 Jan 2023 23:56:31 +0100 Subject: [PATCH] WIP: new net property mode for net builder (name + id) --- src/db/db/dbLayoutToNetlist.cc | 8 +++++++- src/db/db/dbLayoutToNetlist.h | 5 +++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/db/db/dbLayoutToNetlist.cc b/src/db/db/dbLayoutToNetlist.cc index a18122ff4..7c64a60b5 100644 --- a/src/db/db/dbLayoutToNetlist.cc +++ b/src/db/db/dbLayoutToNetlist.cc @@ -1002,7 +1002,13 @@ LayoutToNetlist::make_netname_propid (db::Layout &ly, NetPropertyMode net_prop_m if (! netname_prop.is_nil ()) { db::property_names_id_type name_propnameid = ly.properties_repository ().prop_name_id (netname_prop); - if (net_prop_mode == NetIDOnly) { + if (net_prop_mode == NetNameAndIDOnly) { + std::vector l; + l.reserve (2); + l.push_back (tl::Variant (net.expanded_name ())); + l.push_back (tl::Variant (reinterpret_cast (&net))); + propset.insert (std::make_pair (name_propnameid, tl::Variant (l))); + } else if (net_prop_mode == NetIDOnly) { propset.insert (std::make_pair (name_propnameid, tl::Variant (reinterpret_cast (&net)))); } else { propset.insert (std::make_pair (name_propnameid, tl::Variant (net.expanded_name ()))); diff --git a/src/db/db/dbLayoutToNetlist.h b/src/db/db/dbLayoutToNetlist.h index 5f8529821..15a4824c7 100644 --- a/src/db/db/dbLayoutToNetlist.h +++ b/src/db/db/dbLayoutToNetlist.h @@ -727,6 +727,11 @@ public: * @brief Like NetNameOnly, but use a unique net ID (db::Net address actually) instead of name */ NetIDOnly, + + /** + * @brief Like NetNameOnly, but use a tuple of name and ID + */ + NetNameAndIDOnly, }; /**