From 293f26ddc0bce77f959f6cd13ad792148f97445e Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 25 Sep 2022 00:35:59 +0200 Subject: [PATCH] WIP: multiple tech stacks for net tracer, first steps --- .../net_tracer/db_plugin/dbNetTracerIO.cc | 46 +- .../net_tracer/db_plugin/dbNetTracerIO.h | 104 +++- .../net_tracer/db_plugin/dbNetTracerPlugin.cc | 41 +- .../db_plugin/gsiDeclDbNetTracer.cc | 95 +++- .../NetTracerTechComponentEditor.ui | 450 +++++++----------- ...O.cc => layNetTracerConnectivityEditor.cc} | 66 ++- ...rIO.h => layNetTracerConnectivityEditor.h} | 24 +- .../lay_plugin/layNetTracerDialog.cc | 2 +- .../lay_plugin/layNetTracerPlugin.cc | 2 +- .../net_tracer/lay_plugin/lay_plugin.pro | 7 +- .../net_tracer/unit_tests/dbNetTracerTests.cc | 46 +- .../net_tracer/unit_tests/dbTraceAllNets.cc | 26 +- 12 files changed, 495 insertions(+), 414 deletions(-) rename src/plugins/tools/net_tracer/lay_plugin/{layNetTracerIO.cc => layNetTracerConnectivityEditor.cc} (92%) rename src/plugins/tools/net_tracer/lay_plugin/{layNetTracerIO.h => layNetTracerConnectivityEditor.h} (75%) diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc index 2da4268f5..8aa4697b9 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.cc @@ -182,9 +182,9 @@ NetTracerLayerExpressionInfo::compile (const std::string &s) } NetTracerLayerExpression * -NetTracerLayerExpressionInfo::get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set &used_symbols) const +NetTracerLayerExpressionInfo::get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerConnectivity &tech, const std::set &used_symbols) const { - for (NetTracerTechnologyComponent::const_symbol_iterator s = tech.begin_symbols (); s != tech.end_symbols (); ++s) { + for (NetTracerConnectivity::const_symbol_iterator s = tech.begin_symbols (); s != tech.end_symbols (); ++s) { if (s->symbol ().log_equal (lp)) { std::set us = used_symbols; if (! us.insert (s->symbol ().to_string ()).second) { @@ -204,14 +204,14 @@ NetTracerLayerExpressionInfo::get_expr (const db::LayerProperties &lp, const db: } NetTracerLayerExpression * -NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerTechnologyComponent &tech) const +NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerConnectivity &tech) const { std::set us; return get (layout, tech, us); } NetTracerLayerExpression * -NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set &used_symbols) const +NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerConnectivity &tech, const std::set &used_symbols) const { NetTracerLayerExpression *e = 0; @@ -252,7 +252,7 @@ NetTracerConnectionInfo::NetTracerConnectionInfo (const NetTracerLayerExpression // .. nothing yet .. } -static int get_layer_id (const NetTracerLayerExpressionInfo &e, const db::Layout &layout, const NetTracerTechnologyComponent &tech, NetTracerData *data) +static int get_layer_id (const NetTracerLayerExpressionInfo &e, const db::Layout &layout, const NetTracerConnectivity &tech, NetTracerData *data) { std::unique_ptr expr_in (NetTracerLayerExpressionInfo::compile (e.to_string ()).get (layout, tech)); int l = expr_in->alias_for (); @@ -266,7 +266,7 @@ static int get_layer_id (const NetTracerLayerExpressionInfo &e, const db::Layout } NetTracerConnection -NetTracerConnectionInfo::get (const db::Layout &layout, const NetTracerTechnologyComponent &tech, NetTracerData &data) const +NetTracerConnectionInfo::get (const db::Layout &layout, const NetTracerConnectivity &tech, NetTracerData &data) const { int la = get_layer_id (m_la, layout, tech, &data); int lb = get_layer_id (m_lb, layout, tech, &data); @@ -490,30 +490,40 @@ NetTracerNet::define_layer (unsigned int l, const db::LayerProperties &lp, const NetTracerTechnologyComponent::NetTracerTechnologyComponent () : db::TechnologyComponent (net_tracer_component_name (), tl::to_string (tr ("Connectivity"))) +{ + // .. nothing yet .. +} + +// ----------------------------------------------------------------------------------- +// NetTracerConnectivity implementation + +NetTracerConnectivity::NetTracerConnectivity () { // .. nothing yet .. } -NetTracerTechnologyComponent::NetTracerTechnologyComponent (const NetTracerTechnologyComponent &d) - : db::TechnologyComponent (net_tracer_component_name (), tl::to_string (tr ("Connectivity"))) +NetTracerConnectivity::NetTracerConnectivity (const NetTracerConnectivity &d) { - m_connections = d.m_connections; - m_symbols = d.m_symbols; + operator= (d); } -NetTracerTechnologyComponent &NetTracerTechnologyComponent::operator= (const NetTracerTechnologyComponent &d) +NetTracerConnectivity &NetTracerConnectivity::operator= (const NetTracerConnectivity &d) { - m_connections = d.m_connections; - m_symbols = d.m_symbols; + if (this != &d) { + m_connections = d.m_connections; + m_symbols = d.m_symbols; + m_name = d.m_name; + m_description = d.m_description; + } return *this; } NetTracerData -NetTracerTechnologyComponent::get_tracer_data (const db::Layout &layout) const +NetTracerConnectivity::get_tracer_data (const db::Layout &layout) const { // test run on the expressions to verify their syntax int n = 1; - for (NetTracerTechnologyComponent::const_iterator c = begin (); c != end (); ++c, ++n) { + for (NetTracerConnectivity::const_iterator c = begin (); c != end (); ++c, ++n) { if (c->layer_a ().to_string ().empty ()) { throw tl::Exception (tl::to_string (tr ("Missing first layer specification on connectivity specification #%d")), n); } @@ -523,7 +533,7 @@ NetTracerTechnologyComponent::get_tracer_data (const db::Layout &layout) const } n = 1; - for (NetTracerTechnologyComponent::const_symbol_iterator s = begin_symbols (); s != end_symbols (); ++s, ++n) { + for (NetTracerConnectivity::const_symbol_iterator s = begin_symbols (); s != end_symbols (); ++s, ++n) { if (s->symbol ().to_string ().empty ()) { throw tl::Exception (tl::to_string (tr ("Missing symbol name on symbol specification #%d")), n); } @@ -540,12 +550,12 @@ NetTracerTechnologyComponent::get_tracer_data (const db::Layout &layout) const NetTracerData data; // register a logical layer for each original one as alias and one for each expression with a new ID - for (db::NetTracerTechnologyComponent::const_symbol_iterator s = begin_symbols (); s != end_symbols (); ++s) { + for (db::NetTracerConnectivity::const_symbol_iterator s = begin_symbols (); s != end_symbols (); ++s) { db::NetTracerLayerExpression *expr = db::NetTracerLayerExpressionInfo::compile (s->expression ()).get (layout, *this); data.register_logical_layer (expr, s->symbol ().to_string ().c_str ()); } - for (db::NetTracerTechnologyComponent::const_iterator c = begin (); c != end (); ++c) { + for (db::NetTracerConnectivity::const_iterator c = begin (); c != end (); ++c) { data.add_connection (c->get (layout, *this, data)); } diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h index b0f760256..82dedb2c1 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerIO.h @@ -32,7 +32,7 @@ namespace db { -class NetTracerTechnologyComponent; +class NetTracerConnectivity; DB_PLUGIN_PUBLIC std::string net_tracer_component_name (); @@ -57,7 +57,7 @@ public: return m_expression; } - NetTracerLayerExpression *get (const db::Layout &layout, const NetTracerTechnologyComponent &tech) const; + NetTracerLayerExpression *get (const db::Layout &layout, const NetTracerConnectivity &tech) const; private: std::string m_expression; @@ -70,8 +70,8 @@ private: static NetTracerLayerExpressionInfo parse_mult (tl::Extractor &ex); static NetTracerLayerExpressionInfo parse_atomic (tl::Extractor &ex); - NetTracerLayerExpression *get (const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set &used_symbols) const; - NetTracerLayerExpression *get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set &used_symbols) const; + NetTracerLayerExpression *get (const db::Layout &layout, const NetTracerConnectivity &tech, const std::set &used_symbols) const; + NetTracerLayerExpression *get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerConnectivity &tech, const std::set &used_symbols) const; }; class DB_PLUGIN_PUBLIC NetTracerConnectionInfo @@ -81,7 +81,7 @@ public: NetTracerConnectionInfo (const NetTracerLayerExpressionInfo &la, const NetTracerLayerExpressionInfo &lb); NetTracerConnectionInfo (const NetTracerLayerExpressionInfo &la, const NetTracerLayerExpressionInfo &via, const NetTracerLayerExpressionInfo &lb); - NetTracerConnection get (const db::Layout &layout, const NetTracerTechnologyComponent &tech, NetTracerData &data) const; + NetTracerConnection get (const db::Layout &layout, const NetTracerConnectivity &tech, NetTracerData &data) const; std::string to_string () const; void parse (tl::Extractor &ex); @@ -357,8 +357,7 @@ private: void define_layer (unsigned int l, const db::LayerProperties &lp, const db::LayerProperties &lp_representative); }; -class DB_PLUGIN_PUBLIC NetTracerTechnologyComponent - : public db::TechnologyComponent +class DB_PLUGIN_PUBLIC NetTracerConnectivity { public: typedef std::vector::const_iterator const_iterator; @@ -366,9 +365,29 @@ public: typedef std::vector::const_iterator const_symbol_iterator; typedef std::vector::iterator symbol_iterator; - NetTracerTechnologyComponent (); - NetTracerTechnologyComponent (const NetTracerTechnologyComponent &d); - NetTracerTechnologyComponent &operator= (const NetTracerTechnologyComponent &d); + NetTracerConnectivity (); + NetTracerConnectivity (const NetTracerConnectivity &d); + NetTracerConnectivity &operator= (const NetTracerConnectivity &d); + + const std::string &name () const + { + return m_name; + } + + void set_name (const std::string &n) + { + m_name = n; + } + + const std::string &description () const + { + return m_description; + } + + void set_description (const std::string &d) + { + m_description = d; + } const_iterator begin () const { @@ -458,14 +477,73 @@ public: NetTracerData get_tracer_data (const db::Layout &layout) const; - db::TechnologyComponent *clone () const +private: + std::vector m_connections; + std::vector m_symbols; + std::string m_name, m_description; +}; + +class DB_PLUGIN_PUBLIC NetTracerTechnologyComponent + : public db::TechnologyComponent +{ +public: + typedef std::vector::const_iterator const_iterator; + typedef std::vector::iterator iterator; + + NetTracerTechnologyComponent (); + + size_t size () const + { + return m_connectivity.size (); + } + + void push_back (const db::NetTracerConnectivity &c) + { + m_connectivity.push_back (c); + } + + void clear () + { + m_connectivity.clear (); + } + + void erase (iterator i) + { + m_connectivity.erase (i); + } + + void insert (iterator i, const db::NetTracerConnectivity &c) + { + m_connectivity.insert (i, c); + } + + const_iterator begin () const + { + return m_connectivity.begin (); + } + + const_iterator end () const + { + return m_connectivity.begin (); + } + + iterator begin () + { + return m_connectivity.begin (); + } + + iterator end () + { + return m_connectivity.begin (); + } + + db::NetTracerTechnologyComponent *clone () const { return new NetTracerTechnologyComponent (*this); } private: - std::vector m_connections; - std::vector m_symbols; + std::vector m_connectivity; }; } diff --git a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc index d0793d4be..4c5632c23 100644 --- a/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/db_plugin/dbNetTracerPlugin.cc @@ -65,6 +65,33 @@ namespace tl }; } +namespace +{ + +template +struct FallbackXMLWriteAdapator +{ + FallbackXMLWriteAdapator (void (db::NetTracerConnectivity::*member) (const Value &)) + : mp_member (member) + { + // .. nothing yet .. + } + + void operator () (db::NetTracerTechnologyComponent &owner, tl::XMLReaderState &reader) const + { + if (owner.size () == 0) { + owner.push_back (db::NetTracerConnectivity ()); + } + tl::XMLObjTag tag; + ((*owner.begin ()).*mp_member) (*reader.back (tag)); + } + +private: + void (db::NetTracerConnectivity::*mp_member) (const Value &); +}; + +} + namespace db { @@ -86,8 +113,18 @@ public: virtual tl::XMLElementBase *xml_element () const { return new db::TechnologyComponentXMLElement (net_tracer_component_name (), - tl::make_member ((NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::begin, (NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::end, &NetTracerTechnologyComponent::add, "connection") + - tl::make_member ((NetTracerTechnologyComponent::const_symbol_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::begin_symbols, (NetTracerTechnologyComponent::const_symbol_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::end_symbols, &NetTracerTechnologyComponent::add_symbol, "symbols") + // Fallback readers for migrating pre-0.28 setups to 0.28 + tl::XMLMember, FallbackXMLWriteAdapator , tl::XMLStdConverter > ( + tl::XMLMemberDummyReadAdaptor (), + FallbackXMLWriteAdapator (&NetTracerConnectivity::add), "connection") + + tl::XMLMember, FallbackXMLWriteAdapator , tl::XMLStdConverter > ( + tl::XMLMemberDummyReadAdaptor (), + FallbackXMLWriteAdapator (&NetTracerConnectivity::add_symbol), "symbols") + + // 0.28 definitions + tl::make_element ((NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::begin, (NetTracerTechnologyComponent::const_iterator (NetTracerTechnologyComponent::*) () const) &NetTracerTechnologyComponent::end, (void (NetTracerTechnologyComponent::*) (const NetTracerConnectivity &)) &NetTracerTechnologyComponent::push_back, "connectivity", + tl::make_member ((NetTracerConnectivity::const_iterator (NetTracerConnectivity::*) () const) &NetTracerConnectivity::begin, (NetTracerConnectivity::const_iterator (NetTracerConnectivity::*) () const) &NetTracerConnectivity::end, &NetTracerConnectivity::add, "connection") + + tl::make_member ((NetTracerConnectivity::const_symbol_iterator (NetTracerConnectivity::*) () const) &NetTracerConnectivity::begin_symbols, (NetTracerConnectivity::const_symbol_iterator (NetTracerConnectivity::*) () const) &NetTracerConnectivity::end_symbols, &NetTracerConnectivity::add_symbol, "symbols") + ) ); } }; diff --git a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc index ff1f6b5a0..e14be4dcf 100644 --- a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc +++ b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc @@ -32,14 +32,14 @@ namespace gsi // ----------------------------------------------------------------------------------- // GSI binding -static void def_connection2 (db::NetTracerTechnologyComponent *tech, const std::string &la, const std::string &lb) +static void def_connection2 (db::NetTracerConnectivity *tech, const std::string &la, const std::string &lb) { db::NetTracerLayerExpressionInfo la_info = db::NetTracerLayerExpressionInfo::compile (la); db::NetTracerLayerExpressionInfo lb_info = db::NetTracerLayerExpressionInfo::compile (lb); tech->add (db::NetTracerConnectionInfo (la_info, lb_info)); } -static void def_connection3 (db::NetTracerTechnologyComponent *tech, const std::string &la, const std::string &via, const std::string &lb) +static void def_connection3 (db::NetTracerConnectivity *tech, const std::string &la, const std::string &via, const std::string &lb) { db::NetTracerLayerExpressionInfo la_info = db::NetTracerLayerExpressionInfo::compile (la); db::NetTracerLayerExpressionInfo via_info = db::NetTracerLayerExpressionInfo::compile (via); @@ -47,14 +47,26 @@ static void def_connection3 (db::NetTracerTechnologyComponent *tech, const std:: tech->add (db::NetTracerConnectionInfo (la_info, via_info, lb_info)); } -static void def_symbol (db::NetTracerTechnologyComponent *tech, const std::string &name, const std::string &expr) +static void def_symbol (db::NetTracerConnectivity *tech, const std::string &name, const std::string &expr) { tech->add_symbol (db::NetTracerSymbolInfo (db::LayerProperties (name), expr)); } -gsi::Class &decl_dbTechnologyComponent (); - -gsi::Class decl_NetTracerTechnology (decl_dbTechnologyComponent (), "db", "NetTracerTechnology", +gsi::Class decl_NetTracerConnectivity ("db", "NetTracerConnectivity", + gsi::method ("name", &db::NetTracerConnectivity::name, + "@brief Gets the name of the connectivty definition\n" + "The name is an optional string defining the formal name for this definition.\n" + ) + + gsi::method ("name=", &db::NetTracerConnectivity::set_name, gsi::arg ("n"), + "@brief Sets the name of the connectivty definition\n" + ) + + gsi::method ("description", &db::NetTracerConnectivity::description, + "@brief Gets the description text of the connectivty definition\n" + "The description is an optional string giving a human-readable description for this definition." + ) + + gsi::method ("description=", &db::NetTracerConnectivity::set_description, gsi::arg ("d"), + "@brief Sets the description of the connectivty definition\n" + ) + gsi::method_ext ("connection", &def_connection2, gsi::arg("a"), gsi::arg("b"), "@brief Defines a connection between two materials\n" "See the class description for details about this method." @@ -68,7 +80,7 @@ gsi::Class decl_NetTracerTechnology (decl_dbTe "Defines a sub-expression to be used in further symbols or material expressions. " "For the detailed notation of the expression see the description of the net tracer feature." ), - "@brief A technology description for the net tracer\n" + "@brief A connectivity description for the net tracer\n" "\n" "This object represents the technology description for the net tracer (represented by the \\NetTracer class).\n" "A technology description basically consists of connection declarations.\n" @@ -83,16 +95,17 @@ gsi::Class decl_NetTracerTechnology (decl_dbTe "\n" "For details about the expressions see the description of the net tracer feature.\n" "\n" - "This class has been introduced in version 0.25.\n" + "This class has been introduced in version 0.28 and replaces the 'NetTracerTechnology' class which " + "has been generalized.\n" ); -static void trace1 (db::NetTracer *net_tracer, const db::NetTracerTechnologyComponent &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer) +static void trace1 (db::NetTracer *net_tracer, const db::NetTracerConnectivity &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer) { db::NetTracerData tracer_data = tech.get_tracer_data (layout); net_tracer->trace (layout, cell, start_point, start_layer, tracer_data); } -static void trace2 (db::NetTracer *net_tracer, const db::NetTracerTechnologyComponent &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer, const db::Point &stop_point, unsigned int stop_layer) +static void trace2 (db::NetTracer *net_tracer, const db::NetTracerConnectivity &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer, const db::Point &stop_point, unsigned int stop_layer) { db::NetTracerData tracer_data = tech.get_tracer_data (layout); net_tracer->trace (layout, cell, start_point, start_layer, stop_point, stop_layer, tracer_data); @@ -106,7 +119,31 @@ static db::NetTracerData get_tracer_data_from_tech (const std::string &tech_name const db::NetTracerTechnologyComponent *tech_component = dynamic_cast (tech->component_by_name (db::net_tracer_component_name ())); tl_assert (tech_component != 0); - return tech_component->get_tracer_data (layout); + if (tech_component->size () < 1) { + throw tl::Exception (tl::to_string (tr ("No connectivity setup exists for technology '%s'")), tech_name); + } + if (tech_component->size () > 1) { + throw tl::Exception (tl::to_string (tr ("Multiple connectivity setups exist for technology '%s' - specify a name")), tech_name); + } + + return tech_component->begin ()->get_tracer_data (layout); +} + +static db::NetTracerData get_tracer_data_from_tech (const std::string &tech_name, const std::string &name, const db::Layout &layout) +{ + const db::Technology *tech = db::Technologies::instance ()->technology_by_name (tech_name); + tl_assert (tech != 0); + + const db::NetTracerTechnologyComponent *tech_component = dynamic_cast (tech->component_by_name (db::net_tracer_component_name ())); + tl_assert (tech_component != 0); + + for (auto t = tech_component->begin (); t != tech_component->end (); ++t) { + if (t->name () == name) { + return t->get_tracer_data (layout); + } + } + + throw tl::Exception (tl::to_string (tr ("No connectivity setup exists with name '%s' for technology '%s'")), name, tech_name); } static void trace1_tn (db::NetTracer *net_tracer, const std::string &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer) @@ -115,12 +152,24 @@ static void trace1_tn (db::NetTracer *net_tracer, const std::string &tech, const net_tracer->trace (layout, cell, start_point, start_layer, tracer_data); } +static void trace1_tn2 (db::NetTracer *net_tracer, const std::string &tech, const std::string &name, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer) +{ + db::NetTracerData tracer_data = get_tracer_data_from_tech (tech, name, layout); + net_tracer->trace (layout, cell, start_point, start_layer, tracer_data); +} + static void trace2_tn (db::NetTracer *net_tracer, const std::string &tech, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer, const db::Point &stop_point, unsigned int stop_layer) { db::NetTracerData tracer_data = get_tracer_data_from_tech (tech, layout); net_tracer->trace (layout, cell, start_point, start_layer, stop_point, stop_layer, tracer_data); } +static void trace2_tn2 (db::NetTracer *net_tracer, const std::string &tech, const std::string &name, const db::Layout &layout, const db::Cell &cell, const db::Point &start_point, unsigned int start_layer, const db::Point &stop_point, unsigned int stop_layer) +{ + db::NetTracerData tracer_data = get_tracer_data_from_tech (tech, name, layout); + net_tracer->trace (layout, cell, start_point, start_layer, stop_point, stop_layer, tracer_data); +} + gsi::Class decl_NetElement ("db", "NetElement", gsi::method ("trans", &db::NetTracerShape::trans, "@brief Gets the transformation to apply for rendering the shape in the original top cell\n" @@ -178,7 +227,7 @@ gsi::Class decl_NetTracer ("db", "NetTracer", "A path extraction version is provided as well which will extract one (the presumably shortest) path between two " "points.\n" "\n" - "@param tech The technology definition\n" + "@param tech The connectivity definition\n" "@param layout The layout on which to run the extraction\n" "@param cell The cell on which to run the extraction (child cells will be included)\n" "@param start_point The start point from which to start extraction of the net\n" @@ -194,7 +243,7 @@ gsi::Class decl_NetTracer ("db", "NetTracer", "\n" "This version runs a path extraction and will deliver elements forming one path leading from the start to the end point.\n" "\n" - "@param tech The technology definition\n" + "@param tech The connectivity definition\n" "@param layout The layout on which to run the extraction\n" "@param cell The cell on which to run the extraction (child cells will be included)\n" "@param start_point The start point from which to start extraction of the net\n" @@ -205,13 +254,31 @@ gsi::Class decl_NetTracer ("db", "NetTracer", gsi::method_ext ("trace", &trace1_tn, gsi::arg ("tech"), gsi::arg ("layout"), gsi::arg ("cell"), gsi::arg ("start_point"), gsi::arg ("start_layer"), "@brief Runs a net extraction taking a predefined technology\n" "This method behaves identical as the version with a technology object, except that it will look for a technology " - "with the given name to obtain the extraction setup." + "with the given name to obtain the extraction setup.\n" + "The technology is looked up by technology name. A version of this method exists where it is possible " + "to specify the name of the particular connectivity to use in case there are multiple definitions available." + ) + + gsi::method_ext ("trace", &trace1_tn2, gsi::arg ("tech"), gsi::arg ("connectivity_name"), gsi::arg ("layout"), gsi::arg ("cell"), gsi::arg ("start_point"), gsi::arg ("start_layer"), + "@brief Runs a net extraction taking a predefined technology\n" + "This method behaves identical as the version with a technology object, except that it will look for a technology " + "with the given name to obtain the extraction setup. " + "This version allows specifying the name of the connecvitiy setup.\n" + "\n" + "This method variant has been introduced in version 0.28." ) + gsi::method_ext ("trace", &trace2_tn, gsi::arg ("tech"), gsi::arg ("layout"), gsi::arg ("cell"), gsi::arg ("start_point"), gsi::arg ("start_layer"), gsi::arg ("stop_point"), gsi::arg ("stop_layer"), "@brief Runs a path extraction taking a predefined technology\n" "This method behaves identical as the version with a technology object, except that it will look for a technology " "with the given name to obtain the extraction setup." ) + + gsi::method_ext ("trace", &trace2_tn2, gsi::arg ("tech"), gsi::arg ("connectivity_name"), gsi::arg ("layout"), gsi::arg ("cell"), gsi::arg ("start_point"), gsi::arg ("start_layer"), gsi::arg ("stop_point"), gsi::arg ("stop_layer"), + "@brief Runs a path extraction taking a predefined technology\n" + "This method behaves identical as the version with a technology object, except that it will look for a technology " + "with the given name to obtain the extraction setup." + "This version allows specifying the name of the connecvitiy setup.\n" + "\n" + "This method variant has been introduced in version 0.28." + ) + gsi::iterator ("each_element", &db::NetTracer::begin, &db::NetTracer::end, "@brief Iterates over the elements found during extraction\n" "The elements are available only after the extraction has been performed." diff --git a/src/plugins/tools/net_tracer/lay_plugin/NetTracerTechComponentEditor.ui b/src/plugins/tools/net_tracer/lay_plugin/NetTracerTechComponentEditor.ui index 188969569..8ee37634a 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/NetTracerTechComponentEditor.ui +++ b/src/plugins/tools/net_tracer/lay_plugin/NetTracerTechComponentEditor.ui @@ -1,7 +1,8 @@ - + + NetTracerTechComponentEditor - - + + 0 0 @@ -9,324 +10,221 @@ 449 - + Form - - - 9 - - - 6 - + - - - Qt::Vertical + + + Qt::Horizontal - - + + QFrame::NoFrame - + QFrame::Raised - - + + 0 - - 6 + + 0 - - - - QFrame::NoFrame + + 0 + + + 0 + + + + + ... - - QFrame::Raised + + + :/down_16px.png:/down_16px.png - - - 0 - - - 6 - - - - - <html>Connectivity (<a href="int:/about/connectivity.xml">See here for details</a>)</html> - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - + + + + ... + + + + :/del_16px.png:/del_16px.png + + + Del + + + + + + + ... + + + + :/up_16px.png:/up_16px.png + + + + + + QFrame::NoFrame - + QFrame::Raised - - - 0 + + + + + + + true + + + + Double-click to edit text + + + + + + + + 0 + 1 + + + + + Name - - 6 + + + + Description - - - - ... - - - :/down_16px.png - - - - - - - ... - - - :/del_16px.png - - - Del - - - - - - - QAbstractItemView::AllEditTriggers - - - true - - - QAbstractItemView::SelectRows - - - 3 - - - - - - - - - - ... - - - :/add_16px.png - - - Return - - - - - - - Qt::Vertical - - - - 20 - 131 - - - - - - - - ... - - - :/up_16px.png - - - - + + + + + + + Qt::Horizontal + + + + 157 + 20 + + + + + + + + ... + + + + :/add_16px.png:/add_16px.png + + + Return + + + + + + + Technology Stacks + - - + + + + 1 + 0 + + + QFrame::NoFrame - + QFrame::Raised - - + + 0 - - 6 + + 0 + + + 0 + + + 0 - - - QFrame::NoFrame + + + Connectivity - - QFrame::Raised - - - - 0 - - - 6 - - - - - <html>Computed and symbolic layers (<a href="int:/about/symbolic_layers.xml">See here for details</a>)</html> - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - QFrame::NoFrame + + + + 0 + 1 + - - QFrame::Raised - - - - 0 - - - 6 - - - - - ... - - - :/down_16px.png - - - - - - - ... - - - :/del_16px.png - - - Del - - - - - - - QAbstractItemView::AllEditTriggers - - - true - - - QAbstractItemView::SelectRows - - - 2 - - - - - - - - - ... - - - :/add_16px.png - - - Return - - - - - - - Qt::Vertical - - - - 20 - 131 - - - - - - - - ... - - - :/up_16px.png - - - - + + + + Qt::Vertical + + + + 20 + 0 + + + + - + + + lay::NetTracerConnectivityEditor + QWidget +
layNetTracerConnectivityEditor.h
+ 1 +
+
+ + +
diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.cc similarity index 92% rename from src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.cc rename to src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.cc index 752e9dabb..83e935546 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.cc @@ -21,7 +21,7 @@ */ -#include "layNetTracerIO.h" +#include "layNetTracerConnectivityEditor.h" #include "layNetTracerConfig.h" #include "layConfigurationDialog.h" @@ -56,7 +56,7 @@ class NetTracerConnectivityColumnDelegate : public QItemDelegate { public: - NetTracerConnectivityColumnDelegate (QWidget *parent, db::NetTracerTechnologyComponent *data) + NetTracerConnectivityColumnDelegate (QWidget *parent, db::NetTracerConnectivity *data) : QItemDelegate (parent), mp_data (data) { // .. nothing yet .. @@ -148,7 +148,7 @@ public: } private: - db::NetTracerTechnologyComponent *mp_data; + db::NetTracerConnectivity *mp_data; }; // ----------------------------------------------------------------------------------------- @@ -158,7 +158,7 @@ class NetTracerConnectivitySymbolColumnDelegate : public QItemDelegate { public: - NetTracerConnectivitySymbolColumnDelegate (QWidget *parent, db::NetTracerTechnologyComponent *data) + NetTracerConnectivitySymbolColumnDelegate (QWidget *parent, db::NetTracerConnectivity *data) : QItemDelegate (parent), mp_data (data) { // .. nothing yet .. @@ -262,16 +262,16 @@ public: } private: - db::NetTracerTechnologyComponent *mp_data; + db::NetTracerConnectivity *mp_data; }; // ----------------------------------------------------------------------------------- // NetTracerTechComponentEditor implementation -NetTracerTechComponentEditor::NetTracerTechComponentEditor (QWidget *parent) - : TechnologyComponentEditor (parent) +NetTracerConnectivityEditor::NetTracerConnectivityEditor (QWidget *parent) + : QWidget (parent) { - Ui::NetTracerTechComponentEditor::setupUi (this); + Ui::NetTracerConnectivityEditor::setupUi (this); connect (add_conductor_pb, SIGNAL (clicked ()), this, SLOT (add_clicked ())); connect (del_conductor_pb, SIGNAL (clicked ()), this, SLOT (del_clicked ())); @@ -293,26 +293,16 @@ NetTracerTechComponentEditor::NetTracerTechComponentEditor (QWidget *parent) symbol_table->verticalHeader ()->hide (); } -void -NetTracerTechComponentEditor::commit () +const db::NetTracerConnectivity & +NetTracerConnectivityEditor::get_connectiviy () { - db::NetTracerTechnologyComponent *data = dynamic_cast (tech_component ()); - if (! data) { - return; - } - - *data = m_data; + return m_data; } void -NetTracerTechComponentEditor::setup () +NetTracerConnectivityEditor::set_connectivity (const db::NetTracerConnectivity &data) { - db::NetTracerTechnologyComponent *data = dynamic_cast (tech_component ()); - if (! data) { - return; - } - - m_data = *data; + m_data = data; for (int c = 0; c < 3; ++c) { if (connectivity_table->itemDelegateForColumn (c) != 0) { @@ -332,7 +322,7 @@ NetTracerTechComponentEditor::setup () } void -NetTracerTechComponentEditor::add_clicked () +NetTracerConnectivityEditor::add_clicked () { // removes focus from the tree view - commits the data add_conductor_pb->setFocus (); @@ -351,7 +341,7 @@ NetTracerTechComponentEditor::add_clicked () } void -NetTracerTechComponentEditor::del_clicked () +NetTracerConnectivityEditor::del_clicked () { // removes focus from the tree view - commits the data del_conductor_pb->setFocus (); @@ -374,7 +364,7 @@ NetTracerTechComponentEditor::del_clicked () } void -NetTracerTechComponentEditor::move_up_clicked () +NetTracerConnectivityEditor::move_up_clicked () { // removes focus from the tree view - commits the data move_conductor_up_pb->setFocus (); @@ -391,7 +381,7 @@ NetTracerTechComponentEditor::move_up_clicked () connectivity_table->setCurrentIndex (QModelIndex ()); int n = 0; - for (db::NetTracerTechnologyComponent::iterator l = m_data.begin (); l != m_data.end (); ++l, ++n) { + for (db::NetTracerConnectivity::iterator l = m_data.begin (); l != m_data.end (); ++l, ++n) { if (selected_rows.find (n + 1) != selected_rows.end () && selected_rows.find (n) == selected_rows.end ()) { std::swap (m_data.begin () [n + 1], m_data.begin () [n]); selected_rows.erase (n + 1); @@ -415,7 +405,7 @@ NetTracerTechComponentEditor::move_up_clicked () } void -NetTracerTechComponentEditor::move_down_clicked () +NetTracerConnectivityEditor::move_down_clicked () { // removes focus from the tree view - commits the data move_conductor_down_pb->setFocus (); @@ -432,7 +422,7 @@ NetTracerTechComponentEditor::move_down_clicked () connectivity_table->setCurrentIndex (QModelIndex ()); int n = int (m_data.size ()); - for (db::NetTracerTechnologyComponent::iterator l = m_data.end (); l != m_data.begin (); ) { + for (db::NetTracerConnectivity::iterator l = m_data.end (); l != m_data.begin (); ) { --l; --n; if (selected_rows.find (n - 1) != selected_rows.end () && selected_rows.find (n) == selected_rows.end ()) { @@ -458,7 +448,7 @@ NetTracerTechComponentEditor::move_down_clicked () } void -NetTracerTechComponentEditor::symbol_add_clicked () +NetTracerConnectivityEditor::symbol_add_clicked () { // removes focus from the tree view - commits the data add_symbol_pb->setFocus (); @@ -477,7 +467,7 @@ NetTracerTechComponentEditor::symbol_add_clicked () } void -NetTracerTechComponentEditor::symbol_del_clicked () +NetTracerConnectivityEditor::symbol_del_clicked () { // removes focus from the tree view - commits the data del_symbol_pb->setFocus (); @@ -500,7 +490,7 @@ NetTracerTechComponentEditor::symbol_del_clicked () } void -NetTracerTechComponentEditor::symbol_move_up_clicked () +NetTracerConnectivityEditor::symbol_move_up_clicked () { // removes focus from the tree view - commits the data move_symbol_up_pb->setFocus (); @@ -517,7 +507,7 @@ NetTracerTechComponentEditor::symbol_move_up_clicked () symbol_table->setCurrentIndex (QModelIndex ()); int n = 0; - for (db::NetTracerTechnologyComponent::symbol_iterator l = m_data.begin_symbols (); l != m_data.end_symbols (); ++l, ++n) { + for (db::NetTracerConnectivity::symbol_iterator l = m_data.begin_symbols (); l != m_data.end_symbols (); ++l, ++n) { if (selected_rows.find (n + 1) != selected_rows.end () && selected_rows.find (n) == selected_rows.end ()) { std::swap (m_data.begin_symbols () [n + 1], m_data.begin_symbols () [n]); selected_rows.erase (n + 1); @@ -541,7 +531,7 @@ NetTracerTechComponentEditor::symbol_move_up_clicked () } void -NetTracerTechComponentEditor::symbol_move_down_clicked () +NetTracerConnectivityEditor::symbol_move_down_clicked () { // removes focus from the tree view - commits the data move_symbol_down_pb->setFocus (); @@ -558,7 +548,7 @@ NetTracerTechComponentEditor::symbol_move_down_clicked () symbol_table->setCurrentIndex (QModelIndex ()); int n = int (m_data.symbols ()); - for (db::NetTracerTechnologyComponent::symbol_iterator l = m_data.end_symbols (); l != m_data.begin_symbols (); ) { + for (db::NetTracerConnectivity::symbol_iterator l = m_data.end_symbols (); l != m_data.begin_symbols (); ) { --l; --n; if (selected_rows.find (n - 1) != selected_rows.end () && selected_rows.find (n) == selected_rows.end ()) { @@ -584,7 +574,7 @@ NetTracerTechComponentEditor::symbol_move_down_clicked () } void -NetTracerTechComponentEditor::update () +NetTracerConnectivityEditor::update () { QStringList labels; int n; @@ -600,7 +590,7 @@ NetTracerTechComponentEditor::update () connectivity_table->setHorizontalHeaderLabels (labels); n = 0; - for (db::NetTracerTechnologyComponent::iterator l = m_data.begin (); l != m_data.end (); ++l, ++n) { + for (db::NetTracerConnectivity::iterator l = m_data.begin (); l != m_data.end (); ++l, ++n) { for (int c = 0; c < 3; ++c) { @@ -652,7 +642,7 @@ NetTracerTechComponentEditor::update () symbol_table->setHorizontalHeaderLabels (labels); n = 0; - for (db::NetTracerTechnologyComponent::symbol_iterator l = m_data.begin_symbols (); l != m_data.end_symbols (); ++l, ++n) { + for (db::NetTracerConnectivity::symbol_iterator l = m_data.begin_symbols (); l != m_data.end_symbols (); ++l, ++n) { for (int c = 0; c < 2; ++c) { diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.h b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.h similarity index 75% rename from src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.h rename to src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.h index fcb48e989..64377b4a1 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerIO.h +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerConnectivityEditor.h @@ -22,10 +22,10 @@ -#ifndef HDR_layNetTracerIO -#define HDR_layNetTracerIO +#ifndef HDR_layNetTracerConnectivityEditor +#define HDR_layNetTracerConnectivityEditor -#include "ui_NetTracerTechComponentEditor.h" +#include "ui_NetTracerConnectivityEditor.h" #include "dbNetTracer.h" #include "dbNetTracerIO.h" @@ -42,25 +42,23 @@ namespace db { - class NetTracerTechnologyComponent; + class NetTracerConnectivity; } namespace lay { -class FileDialog; - -class NetTracerTechComponentEditor - : public lay::TechnologyComponentEditor, - public Ui::NetTracerTechComponentEditor +class NetTracerConnectivityEditor + : public QWidget, + public Ui::NetTracerConnectivityEditor { Q_OBJECT public: - NetTracerTechComponentEditor (QWidget *parent); + NetTracerConnectivityEditor (QWidget *parent); - void commit (); - void setup (); + void set_connectivity (const db::NetTracerConnectivity &data); + const db::NetTracerConnectivity &get_connectiviy(); public slots: void add_clicked (); @@ -73,7 +71,7 @@ public slots: void symbol_move_down_clicked (); private: - db::NetTracerTechnologyComponent m_data; + db::NetTracerConnectivity m_data; void update (); }; diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc index d33a14748..454f58330 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerDialog.cc @@ -290,7 +290,7 @@ NetTracerDialog::get_net_tracer_setup (const lay::CellView &cv, db::NetTracerDat if (! tech) { return false; } - const db::NetTracerTechnologyComponent *tech_component = dynamic_cast (tech->component_by_name (db::net_tracer_component_name ())); + const db::NetTracerConnectivity *tech_component = dynamic_cast (tech->component_by_name (db::net_tracer_component_name ())); if (! tech_component) { return false; } diff --git a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc index 7cc918cd9..d4aa6d75a 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc +++ b/src/plugins/tools/net_tracer/lay_plugin/layNetTracerPlugin.cc @@ -22,7 +22,7 @@ #include "dbNetTracerIO.h" -#include "layNetTracerIO.h" +#include "layNetTracerTechComponentEditor.h" #include "layNetTracerDialog.h" #include "layNetTracerConfig.h" diff --git a/src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro b/src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro index 7f05e1cc4..1216f559a 100644 --- a/src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro +++ b/src/plugins/tools/net_tracer/lay_plugin/lay_plugin.pro @@ -14,17 +14,20 @@ LIBS += -L$$DESTDIR/../db_plugins -lnet_tracer HEADERS = \ layNetTracerConfig.h \ + layNetTracerConnectivityEditor.h \ layNetTracerDialog.h \ - layNetTracerIO.h \ + layNetTracerTechComponentEditor.h SOURCES = \ layNetTracerConfig.cc \ + layNetTracerConnectivityEditor.cc \ layNetTracerDialog.cc \ layNetTracerPlugin.cc \ - layNetTracerIO.cc \ + layNetTracerTechComponentEditor.cc FORMS = \ NetTracerConfigPage.ui \ + NetTracerConnectivityEditor.ui \ NetTracerDialog.ui \ NetTracerTechComponentEditor.ui \ diff --git a/src/plugins/tools/net_tracer/unit_tests/dbNetTracerTests.cc b/src/plugins/tools/net_tracer/unit_tests/dbNetTracerTests.cc index 52375e61f..e0fa275a5 100644 --- a/src/plugins/tools/net_tracer/unit_tests/dbNetTracerTests.cc +++ b/src/plugins/tools/net_tracer/unit_tests/dbNetTracerTests.cc @@ -76,21 +76,21 @@ static db::NetTracerShape find_shape (const db::Layout &layout, const db::Cell & } #endif -static db::NetTracerNet trace (db::NetTracer &tracer, const db::Layout &layout, const db::Cell &cell, const db::NetTracerTechnologyComponent &tc, unsigned int l_start, const db::Point &p_start) +static db::NetTracerNet trace (db::NetTracer &tracer, const db::Layout &layout, const db::Cell &cell, const db::NetTracerConnectivity &tc, unsigned int l_start, const db::Point &p_start) { db::NetTracerData tracer_data = tc.get_tracer_data (layout); tracer.trace (layout, cell, p_start, l_start, tracer_data); return db::NetTracerNet (tracer, db::ICplxTrans (), layout, cell.cell_index (), std::string (), std::string (), tracer_data); } -static db::NetTracerNet trace (db::NetTracer &tracer, const db::Layout &layout, const db::Cell &cell, const db::NetTracerTechnologyComponent &tc, unsigned int l_start, const db::Point &p_start, unsigned int l_stop, const db::Point &p_stop) +static db::NetTracerNet trace (db::NetTracer &tracer, const db::Layout &layout, const db::Cell &cell, const db::NetTracerConnectivity &tc, unsigned int l_start, const db::Point &p_start, unsigned int l_stop, const db::Point &p_stop) { db::NetTracerData tracer_data = tc.get_tracer_data (layout); tracer.trace (layout, cell, p_start, l_start, p_stop, l_stop, tracer_data); return db::NetTracerNet (tracer, db::ICplxTrans (), layout, cell.cell_index (), std::string (), std::string (), tracer_data); } -void run_test (tl::TestBase *_this, const std::string &file, const db::NetTracerTechnologyComponent &tc, const db::LayerProperties &lp_start, const db::Point &p_start, const std::string &file_au, const char *net_name = 0, size_t depth = 0) +void run_test (tl::TestBase *_this, const std::string &file, const db::NetTracerConnectivity &tc, const db::LayerProperties &lp_start, const db::Point &p_start, const std::string &file_au, const char *net_name = 0, size_t depth = 0) { db::Manager m (false); @@ -130,7 +130,7 @@ void run_test (tl::TestBase *_this, const std::string &file, const db::NetTracer db::compare_layouts (_this, layout_net, fn, db::WriteOAS); } -void run_test2 (tl::TestBase *_this, const std::string &file, const db::NetTracerTechnologyComponent &tc, const db::LayerProperties &lp_start, const db::Point &p_start, const db::LayerProperties &lp_stop, const db::Point &p_stop, const std::string &file_au, const char *net_name = 0) +void run_test2 (tl::TestBase *_this, const std::string &file, const db::NetTracerConnectivity &tc, const db::LayerProperties &lp_start, const db::Point &p_start, const db::LayerProperties &lp_stop, const db::Point &p_stop, const std::string &file_au, const char *net_name = 0) { db::Manager m (false); @@ -169,7 +169,7 @@ TEST(1) std::string file = "t1.oas.gz"; std::string file_au = "t1_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -180,7 +180,7 @@ TEST(1b) std::string file = "t1.oas.gz"; std::string file_au = "t1b_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); // point is off net ... @@ -192,7 +192,7 @@ TEST(1c) std::string file = "t1.oas.gz"; std::string file_au = "t1_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add_symbol (symbol ("a", "1/0")); tc.add_symbol (symbol ("c", "cc")); tc.add_symbol (symbol ("cc", "3/0")); @@ -206,7 +206,7 @@ TEST(1d) std::string file = "t1.oas.gz"; std::string file_au = "t1d_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "10/0", "11/0")); // some layers are non-existing @@ -218,7 +218,7 @@ TEST(2) std::string file = "t2.oas.gz"; std::string file_au = "t2_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); run_test2 (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), db::LayerProperties (3, 0), db::Point (4000, -20000), file_au, "THE_NAME"); @@ -229,7 +229,7 @@ TEST(3) std::string file = "t3.oas.gz"; std::string file_au = "t3_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); std::string msg; @@ -246,7 +246,7 @@ TEST(4) std::string file = "t4.oas.gz"; std::string file_au = "t4_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, ""); @@ -257,7 +257,7 @@ TEST(4b) std::string file = "t4.oas.gz"; std::string file_au = "t4b_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -268,7 +268,7 @@ TEST(5) std::string file = "t5.oas.gz"; std::string file_au = "t5_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0*10/0", "2/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -279,7 +279,7 @@ TEST(5b) std::string file = "t5.oas.gz"; std::string file_au = "t5b_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0*10/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -290,7 +290,7 @@ TEST(5c) std::string file = "t5.oas.gz"; std::string file_au = "t5c_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0-11/0", "3/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, ""); @@ -301,7 +301,7 @@ TEST(5d) std::string file = "t5.oas.gz"; std::string file_au = "t5d_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0-12/0", "2/0", "3/0-12/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -312,7 +312,7 @@ TEST(5e) std::string file = "t5.oas.gz"; std::string file_au = "t5e_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0-12/0", "2/0", "3/0-12/0")); run_test (_this, file, tc, db::LayerProperties (1, 0), db::Point (7000, 1500), file_au, "THE_NAME"); @@ -323,7 +323,7 @@ TEST(5f) std::string file = "t5.oas.gz"; std::string file_au = "t5f_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add_symbol (symbol ("x", "3-14")); tc.add (connection ("10-13", "x")); tc.add (connection ("x", "2", "1+13")); @@ -336,7 +336,7 @@ TEST(6) std::string file = "t6.oas.gz"; std::string file_au = "t6_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1-10", "2", "3")); tc.add (connection ("3", "4", "5")); @@ -348,7 +348,7 @@ TEST(6b) std::string file = "t6.oas.gz"; std::string file_au = "t6b_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1-10", "2", "3")); tc.add (connection ("3", "4", "5")); @@ -360,7 +360,7 @@ TEST(7) std::string file = "t7.oas.gz"; std::string file_au = "t7_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("15", "14", "2-7")); tc.add (connection ("15", "14", "7")); @@ -373,7 +373,7 @@ TEST(8) std::string file = "t8.oas.gz"; std::string file_au = "t8_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("15", "14", "7")); run_test (_this, file, tc, db::LayerProperties (15, 0), db::Point (4000, 10000), file_au, ""); @@ -384,7 +384,7 @@ TEST(9) std::string file = "t9.oas.gz"; std::string file_au = "t9_net.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add_symbol (symbol ("a", "8-12")); tc.add_symbol (symbol ("b", "a+7")); tc.add_symbol (symbol ("c", "15*26")); diff --git a/src/plugins/tools/net_tracer/unit_tests/dbTraceAllNets.cc b/src/plugins/tools/net_tracer/unit_tests/dbTraceAllNets.cc index 53b674871..2ed796f0c 100644 --- a/src/plugins/tools/net_tracer/unit_tests/dbTraceAllNets.cc +++ b/src/plugins/tools/net_tracer/unit_tests/dbTraceAllNets.cc @@ -50,7 +50,7 @@ static db::NetTracerSymbolInfo symbol (const std::string &s, const std::string & return db::NetTracerSymbolInfo (s, e); } -void run_test (tl::TestBase *_this, const std::string &file, const db::NetTracerTechnologyComponent &tc, const std::string &file_au) +void run_test (tl::TestBase *_this, const std::string &file, const db::NetTracerConnectivity &tc, const std::string &file_au) { db::Manager m (false); @@ -93,7 +93,7 @@ TEST(1) std::string file = "t1.oas.gz"; std::string file_au = "t1_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); run_test (_this, file, tc, file_au); @@ -104,7 +104,7 @@ TEST(1c) std::string file = "t1.oas.gz"; std::string file_au = "t1_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add_symbol (symbol ("a", "1/0")); tc.add_symbol (symbol ("c", "cc")); tc.add_symbol (symbol ("cc", "3/0")); @@ -118,7 +118,7 @@ TEST(1d) std::string file = "t1.oas.gz"; std::string file_au = "t1d_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "10/0", "11/0")); // some layers are non-existing @@ -130,7 +130,7 @@ TEST(4) std::string file = "t4.oas.gz"; std::string file_au = "t4_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0", "3/0")); run_test (_this, file, tc, file_au); @@ -141,7 +141,7 @@ TEST(4b) std::string file = "t4.oas.gz"; std::string file_au = "t4b_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "3/0")); run_test (_this, file, tc, file_au); @@ -152,7 +152,7 @@ TEST(5) std::string file = "t5.oas.gz"; std::string file_au = "t5_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0*10/0", "2/0", "3/0")); run_test (_this, file, tc, file_au); @@ -163,7 +163,7 @@ TEST(5b) std::string file = "t5.oas.gz"; std::string file_au = "t5b_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0*10/0", "3/0")); run_test (_this, file, tc, file_au); @@ -174,7 +174,7 @@ TEST(5c) std::string file = "t5.oas.gz"; std::string file_au = "t5c_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0", "2/0-11/0", "3/0")); run_test (_this, file, tc, file_au); @@ -185,7 +185,7 @@ TEST(5d) std::string file = "t5.oas.gz"; std::string file_au = "t5d_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1/0-12/0", "2/0", "3/0-12/0")); run_test (_this, file, tc, file_au); @@ -196,7 +196,7 @@ TEST(5f) std::string file = "t5.oas.gz"; std::string file_au = "t5f_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add_symbol (symbol ("x", "3-14")); tc.add (connection ("10-13", "x")); tc.add (connection ("x", "2", "1+13")); @@ -209,7 +209,7 @@ TEST(6) std::string file = "t6.oas.gz"; std::string file_au = "t6_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("1-10", "2", "3")); tc.add (connection ("3", "4", "5")); @@ -221,7 +221,7 @@ TEST(7) std::string file = "t7.oas.gz"; std::string file_au = "t7_all_nets.oas.gz"; - db::NetTracerTechnologyComponent tc; + db::NetTracerConnectivity tc; tc.add (connection ("15", "14", "2-7")); tc.add (connection ("15", "14", "7"));