mirror of https://github.com/KLayout/klayout.git
WIP: introduced device combination support hints.
This commit is contained in:
parent
a7a2eea905
commit
9c9d99da7c
|
|
@ -812,8 +812,12 @@ void Circuit::combine_devices ()
|
||||||
tl_assert (netlist () != 0);
|
tl_assert (netlist () != 0);
|
||||||
|
|
||||||
for (Netlist::device_class_iterator dc = netlist ()->begin_device_classes (); dc != netlist ()->end_device_classes (); ++dc) {
|
for (Netlist::device_class_iterator dc = netlist ()->begin_device_classes (); dc != netlist ()->end_device_classes (); ++dc) {
|
||||||
combine_parallel_devices (*dc);
|
if (dc->supports_parallel_combination ()) {
|
||||||
combine_serial_devices (*dc);
|
combine_parallel_devices (*dc);
|
||||||
|
}
|
||||||
|
if (dc->supports_serial_combination ()) {
|
||||||
|
combine_serial_devices (*dc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1431,6 +1431,22 @@ public:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns true if the device class supports device combination in parallel mode
|
||||||
|
*/
|
||||||
|
virtual bool supports_parallel_combination () const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns true if the device class supports device combination in serial mode
|
||||||
|
*/
|
||||||
|
virtual bool supports_serial_combination () const
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class Netlist;
|
friend class Netlist;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ public:
|
||||||
|
|
||||||
virtual void parallel (Device *a, Device *b) const = 0;
|
virtual void parallel (Device *a, Device *b) const = 0;
|
||||||
virtual void serial (Device *a, Device *b) const = 0;
|
virtual void serial (Device *a, Device *b) const = 0;
|
||||||
|
virtual bool supports_parallel_combination () const { return true; }
|
||||||
|
virtual bool supports_serial_combination () const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -120,6 +122,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool combine_devices (Device *a, Device *b) const;
|
virtual bool combine_devices (Device *a, Device *b) const;
|
||||||
|
virtual bool supports_parallel_combination () const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -140,6 +143,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool combine_devices (Device *a, Device *b) const;
|
virtual bool combine_devices (Device *a, Device *b) const;
|
||||||
|
virtual bool supports_parallel_combination () const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -159,6 +163,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool combine_devices (Device *a, Device *b) const;
|
virtual bool combine_devices (Device *a, Device *b) const;
|
||||||
|
virtual bool supports_parallel_combination () const { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue