mirror of https://github.com/KLayout/klayout.git
WIP: multiple tech stacks for net tracer, first steps
This commit is contained in:
parent
4236360620
commit
293f26ddc0
|
|
@ -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<std::string> &used_symbols) const
|
||||
NetTracerLayerExpressionInfo::get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerConnectivity &tech, const std::set<std::string> &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<std::string> 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<std::string> us;
|
||||
return get (layout, tech, us);
|
||||
}
|
||||
|
||||
NetTracerLayerExpression *
|
||||
NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set<std::string> &used_symbols) const
|
||||
NetTracerLayerExpressionInfo::get (const db::Layout &layout, const NetTracerConnectivity &tech, const std::set<std::string> &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<NetTracerLayerExpression> 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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<std::string> &used_symbols) const;
|
||||
NetTracerLayerExpression *get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerTechnologyComponent &tech, const std::set<std::string> &used_symbols) const;
|
||||
NetTracerLayerExpression *get (const db::Layout &layout, const NetTracerConnectivity &tech, const std::set<std::string> &used_symbols) const;
|
||||
NetTracerLayerExpression *get_expr (const db::LayerProperties &lp, const db::Layout &layout, const NetTracerConnectivity &tech, const std::set<std::string> &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<NetTracerConnectionInfo>::const_iterator const_iterator;
|
||||
|
|
@ -366,9 +365,29 @@ public:
|
|||
typedef std::vector<NetTracerSymbolInfo>::const_iterator const_symbol_iterator;
|
||||
typedef std::vector<NetTracerSymbolInfo>::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<NetTracerConnectionInfo> m_connections;
|
||||
std::vector<NetTracerSymbolInfo> m_symbols;
|
||||
std::string m_name, m_description;
|
||||
};
|
||||
|
||||
class DB_PLUGIN_PUBLIC NetTracerTechnologyComponent
|
||||
: public db::TechnologyComponent
|
||||
{
|
||||
public:
|
||||
typedef std::vector<NetTracerConnectivity>::const_iterator const_iterator;
|
||||
typedef std::vector<NetTracerConnectivity>::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<NetTracerConnectionInfo> m_connections;
|
||||
std::vector<NetTracerSymbolInfo> m_symbols;
|
||||
std::vector<NetTracerConnectivity> m_connectivity;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,33 @@ namespace tl
|
|||
};
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
template <class Value>
|
||||
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<Value> 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<NetTracerTechnologyComponent> (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<NetTracerConnectionInfo, NetTracerTechnologyComponent, tl::XMLMemberDummyReadAdaptor <NetTracerConnectionInfo, NetTracerTechnologyComponent>, FallbackXMLWriteAdapator <NetTracerConnectionInfo>, tl::XMLStdConverter <NetTracerConnectionInfo> > (
|
||||
tl::XMLMemberDummyReadAdaptor <NetTracerConnectionInfo, NetTracerTechnologyComponent> (),
|
||||
FallbackXMLWriteAdapator <NetTracerConnectionInfo> (&NetTracerConnectivity::add), "connection") +
|
||||
tl::XMLMember<NetTracerSymbolInfo, NetTracerTechnologyComponent, tl::XMLMemberDummyReadAdaptor <NetTracerSymbolInfo, NetTracerTechnologyComponent>, FallbackXMLWriteAdapator <NetTracerSymbolInfo>, tl::XMLStdConverter <NetTracerSymbolInfo> > (
|
||||
tl::XMLMemberDummyReadAdaptor <NetTracerSymbolInfo, NetTracerTechnologyComponent> (),
|
||||
FallbackXMLWriteAdapator <NetTracerSymbolInfo> (&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")
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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<db::TechnologyComponent> &decl_dbTechnologyComponent ();
|
||||
|
||||
gsi::Class<db::NetTracerTechnologyComponent> decl_NetTracerTechnology (decl_dbTechnologyComponent (), "db", "NetTracerTechnology",
|
||||
gsi::Class<db::NetTracerConnectivity> 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<db::NetTracerTechnologyComponent> 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<db::NetTracerTechnologyComponent> 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 <const db::NetTracerTechnologyComponent *> (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 <const db::NetTracerTechnologyComponent *> (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<db::NetTracerShape> 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<db::NetTracer> 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<db::NetTracer> 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<db::NetTracer> 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."
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<ui version="4.0" >
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>NetTracerTechComponentEditor</class>
|
||||
<widget class="QWidget" name="NetTracerTechComponentEditor" >
|
||||
<property name="geometry" >
|
||||
<widget class="QWidget" name="NetTracerTechComponentEditor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
|
|
@ -9,324 +10,221 @@
|
|||
<height>449</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QSplitter" name="splitter" >
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
<widget class="QSplitter" name="splitter">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<widget class="QFrame" name="frame_6" >
|
||||
<property name="frameShape" >
|
||||
<widget class="QFrame" name="frame_5">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="4" column="4">
|
||||
<widget class="QToolButton" name="move_down_pb">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../icons/icons.qrc">
|
||||
<normaloff>:/down_16px.png</normaloff>:/down_16px.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="help_label" >
|
||||
<property name="text" >
|
||||
<string><html>Connectivity (<a href="int:/about/connectivity.xml">See here for details</a>)</html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_5" >
|
||||
<property name="frameShape" >
|
||||
<item row="4" column="2">
|
||||
<widget class="QToolButton" name="del_pb">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../icons/icons.qrc">
|
||||
<normaloff>:/del_16px.png</normaloff>:/del_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QToolButton" name="move_up_pb">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../icons/icons.qrc">
|
||||
<normaloff>:/up_16px.png</normaloff>:/up_16px.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="5">
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="6">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Double-click to edit text</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" rowspan="2" colspan="6">
|
||||
<widget class="QTreeWidget" name="stack_tree">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QToolButton" name="move_conductor_down_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/down_16px.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QToolButton" name="del_conductor_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/del_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="5" row="0" column="0" >
|
||||
<widget class="QTableWidget" name="connectivity_table" >
|
||||
<property name="editTriggers" >
|
||||
<set>QAbstractItemView::AllEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionBehavior" >
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="columnCount" >
|
||||
<number>3</number>
|
||||
</property>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QToolButton" name="add_conductor_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/add_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Return</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QToolButton" name="move_conductor_up_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/up_16px.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="5">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>157</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QToolButton" name="add_pb">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../../icons/icons.qrc">
|
||||
<normaloff>:/add_16px.png</normaloff>:/add_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Return</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="6">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Technology Stacks</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QFrame" name="frame_4" >
|
||||
<property name="frameShape" >
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="margin" >
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Connectivity</string>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="symbol_help_label" >
|
||||
<property name="text" >
|
||||
<string><html>Computed and symbolic layers (<a href="int:/about/symbolic_layers.xml">See here for details</a>)</html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame" >
|
||||
<property name="frameShape" >
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
<widget class="lay::NetTracerConnectivityEditor" name="connectivity_editor_widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>1</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="frameShadow" >
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" >
|
||||
<property name="margin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="3" column="1" >
|
||||
<widget class="QToolButton" name="move_symbol_down_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/down_16px.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QToolButton" name="del_symbol_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/del_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Del</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="5" row="0" column="0" >
|
||||
<widget class="QTableWidget" name="symbol_table" >
|
||||
<property name="editTriggers" >
|
||||
<set>QAbstractItemView::AllEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionBehavior" >
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="columnCount" >
|
||||
<number>2</number>
|
||||
</property>
|
||||
<column/>
|
||||
<column/>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QToolButton" name="add_symbol_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/add_16px.png</iconset>
|
||||
</property>
|
||||
<property name="shortcut" >
|
||||
<string>Return</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>131</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1" >
|
||||
<widget class="QToolButton" name="move_symbol_up_pb" >
|
||||
<property name="text" >
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="icon" >
|
||||
<iconset resource="layResources.qrc" >:/up_16px.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>lay::NetTracerConnectivityEditor</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>layNetTracerConnectivityEditor.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../../icons/icons.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
|||
|
|
@ -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 <db::NetTracerTechnologyComponent *> (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 <db::NetTracerTechnologyComponent *> (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) {
|
||||
|
||||
|
|
@ -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 ();
|
||||
};
|
||||
|
|
@ -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 <const db::NetTracerTechnologyComponent *> (tech->component_by_name (db::net_tracer_component_name ()));
|
||||
const db::NetTracerConnectivity *tech_component = dynamic_cast <const db::NetTracerConnectivity *> (tech->component_by_name (db::net_tracer_component_name ()));
|
||||
if (! tech_component) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "dbNetTracerIO.h"
|
||||
|
||||
#include "layNetTracerIO.h"
|
||||
#include "layNetTracerTechComponentEditor.h"
|
||||
#include "layNetTracerDialog.h"
|
||||
#include "layNetTracerConfig.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
|
|
|||
|
|
@ -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"));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue