diff --git a/src/db/db/dbNetlistDeviceClasses.cc b/src/db/db/dbNetlistDeviceClasses.cc index f0525d286..232f4736d 100644 --- a/src/db/db/dbNetlistDeviceClasses.cc +++ b/src/db/db/dbNetlistDeviceClasses.cc @@ -144,6 +144,30 @@ void DeviceClassResistor::serial (Device *a, Device *b) const a->set_parameter_value (2, pa + pb); } +// ------------------------------------------------------------------------------------ +// DeviceClassResistorWithBulk implementation + +DB_PUBLIC size_t DeviceClassResistorWithBulk::terminal_id_W = 2; + +DeviceClassResistorWithBulk::DeviceClassResistorWithBulk () + : DeviceClassResistor () +{ + add_terminal_definition (db::DeviceTerminalDefinition ("W", "Terminal W (well, bulk)")); +} + +bool DeviceClassResistorWithBulk::combine_devices (Device *a, Device *b) const +{ + db::Net *nab = a->net_for_terminal (2); + db::Net *nbb = b->net_for_terminal (2); + + if (nab == nbb && DeviceClassResistor::combine_devices (a, b)) { + a->join_terminals (2, b, 2); + return true; + } else { + return false; + } +} + // ------------------------------------------------------------------------------------ // DeviceClassCapacitor implementation @@ -196,6 +220,30 @@ void DeviceClassCapacitor::parallel (Device *a, Device *b) const a->set_parameter_value (2, pa + pb); } +// ------------------------------------------------------------------------------------ +// DeviceClassCapacitorWithBulk implementation + +DB_PUBLIC size_t DeviceClassCapacitorWithBulk::terminal_id_W = 2; + +DeviceClassCapacitorWithBulk::DeviceClassCapacitorWithBulk () + : DeviceClassCapacitor () +{ + add_terminal_definition (db::DeviceTerminalDefinition ("W", "Terminal W (well, bulk)")); +} + +bool DeviceClassCapacitorWithBulk::combine_devices (Device *a, Device *b) const +{ + db::Net *nab = a->net_for_terminal (2); + db::Net *nbb = b->net_for_terminal (2); + + if (nab == nbb && DeviceClassCapacitor::combine_devices (a, b)) { + a->join_terminals (2, b, 2); + return true; + } else { + return false; + } +} + // ------------------------------------------------------------------------------------ // DeviceClassInductor implementation @@ -386,4 +434,55 @@ bool DeviceClassMOS4Transistor::combine_devices (Device *a, Device *b) const return false; } +// ------------------------------------------------------------------------------------ +// DeviceClassBipolarTransistor implementation + +DB_PUBLIC size_t DeviceClassBipolarTransistor::param_id_AE = 0; +DB_PUBLIC size_t DeviceClassBipolarTransistor::param_id_PE = 1; + +DB_PUBLIC size_t DeviceClassBipolarTransistor::terminal_id_C = 0; +DB_PUBLIC size_t DeviceClassBipolarTransistor::terminal_id_B = 1; +DB_PUBLIC size_t DeviceClassBipolarTransistor::terminal_id_E = 2; + +DeviceClassBipolarTransistor::DeviceClassBipolarTransistor () +{ + add_terminal_definition (db::DeviceTerminalDefinition ("C", "Collector")); + add_terminal_definition (db::DeviceTerminalDefinition ("B", "Base")); + add_terminal_definition (db::DeviceTerminalDefinition ("E", "Emitter")); + + add_parameter_definition (db::DeviceParameterDefinition ("AE", "Emitter area (square micrometer)", 0.0, false)); + add_parameter_definition (db::DeviceParameterDefinition ("PE", "Emitter perimeter (micrometer)", 0.0, false)); +} + +bool DeviceClassBipolarTransistor::combine_devices (Device *a, Device *b) const +{ + const db::Net *nac = a->net_for_terminal (0); + const db::Net *nab = a->net_for_terminal (1); + const db::Net *nae = a->net_for_terminal (2); + const db::Net *nbc = b->net_for_terminal (0); + const db::Net *nbb = b->net_for_terminal (1); + const db::Net *nbe = b->net_for_terminal (2); + + // parallel transistors can be combined into one + if (nac == nbc && nae == nbe && nab == nbb) { + + combine_parameters (a, b); + + a->join_terminals (0, b, 0); + a->join_terminals (1, b, 1); + a->join_terminals (2, b, 2); + + return true; + + } + + return false; +} + +void DeviceClassBipolarTransistor::combine_parameters (Device *a, Device *b) const +{ + a->set_parameter_value (0, a->parameter_value (0) + b->parameter_value (0)); + a->set_parameter_value (1, a->parameter_value (1) + b->parameter_value (1)); +} + } diff --git a/src/db/db/dbNetlistDeviceClasses.h b/src/db/db/dbNetlistDeviceClasses.h index 57c43820f..fc90ef368 100644 --- a/src/db/db/dbNetlistDeviceClasses.h +++ b/src/db/db/dbNetlistDeviceClasses.h @@ -76,6 +76,27 @@ public: } }; +/** + * @brief A resistor device class with a bulk terminal (well, bulk) + * In addition to DeviceClassResistor, this class defines a third terminal + * ("W") for the bulk or well connection. + */ +class DB_PUBLIC DeviceClassResistorWithBulk + : public db::DeviceClassResistor +{ +public: + DeviceClassResistorWithBulk (); + + virtual db::DeviceClass *clone () const + { + return new DeviceClassResistorWithBulk (*this); + } + + static size_t terminal_id_W; + + virtual bool combine_devices (Device *a, Device *b) const; +}; + /** * @brief A basic capacitor device class * A capacitor defines a single parameter, "C", which is the capacitance in Farad. @@ -102,12 +123,33 @@ public: virtual void parallel (Device *a, Device *b) const; virtual void serial (Device *a, Device *b) const; - virtual size_t normalize_terminal_id (size_t) const + virtual size_t normalize_terminal_id (size_t id) const { - return terminal_id_A; + return id == terminal_id_B ? terminal_id_A : id; } }; +/** + * @brief A capacitor device class with a bulk terminal (well, bulk) + * In addition to DeviceClassCapacitor, this class defines a third terminal + * ("W") for the bulk or well connection. + */ +class DB_PUBLIC DeviceClassCapacitorWithBulk + : public db::DeviceClassCapacitor +{ +public: + DeviceClassCapacitorWithBulk (); + + virtual db::DeviceClass *clone () const + { + return new DeviceClassCapacitorWithBulk (*this); + } + + static size_t terminal_id_W; + + virtual bool combine_devices (Device *a, Device *b) const; +}; + /** * @brief A basic inductor device class * An inductor defines a single parameter, "L", which is the inductance in Henry. @@ -132,9 +174,9 @@ public: virtual void parallel (Device *a, Device *b) const; virtual void serial (Device *a, Device *b) const; - virtual size_t normalize_terminal_id (size_t) const + virtual size_t normalize_terminal_id (size_t id) const { - return terminal_id_A; + return id == terminal_id_B ? terminal_id_A : id; } }; @@ -230,6 +272,37 @@ public: virtual bool combine_devices (Device *a, Device *b) const; }; +/** + * @brief A bipolar transistor device class with three terminals + * A MOSFET defines two parameters: "AE" for the emitter area in square micrometers and "PE" for the emitter perimeter + * in micrometers. + * The bipolar transistor defines three terminals, "C", "B" and "E" for collector, base and emitter. + */ +class DB_PUBLIC DeviceClassBipolarTransistor + : public db::DeviceClass +{ +public: + DeviceClassBipolarTransistor (); + + static size_t param_id_AE; + static size_t param_id_PE; + + static size_t terminal_id_C; + static size_t terminal_id_B; + static size_t terminal_id_E; + + virtual db::DeviceClass *clone () const + { + return new DeviceClassBipolarTransistor (*this); + } + + virtual bool combine_devices (Device *a, Device *b) const; + virtual bool supports_parallel_combination () const { return true; } + +protected: + void combine_parameters (Device *a, Device *b) const; +}; + } #endif diff --git a/src/db/db/dbNetlistDeviceExtractor.cc b/src/db/db/dbNetlistDeviceExtractor.cc index 4d66c23eb..8216eb425 100644 --- a/src/db/db/dbNetlistDeviceExtractor.cc +++ b/src/db/db/dbNetlistDeviceExtractor.cc @@ -521,6 +521,21 @@ Device *NetlistDeviceExtractor::create_device () return device; } +void NetlistDeviceExtractor::define_terminal (Device *device, size_t terminal_id, size_t layer_index, const db::Region ®ion) +{ + tl_assert (mp_layout != 0); + tl_assert (geometry_index < m_layers.size ()); + unsigned int layer_index = m_layers [geometry_index]; + + std::pair &dd = m_new_devices[device->id ()]; + dd.first = device; + std::vector &geo = dd.second[terminal_id][layer_index]; + + for (db::Region::const_iterator p = region.begin_merged (); !p.at_end (); ++p) { + geo.push_back (db::PolygonRef (*p, mp_layout->shape_repository ())); + } +} + void NetlistDeviceExtractor::define_terminal (Device *device, size_t terminal_id, size_t geometry_index, const db::Polygon &polygon) { tl_assert (mp_layout != 0); diff --git a/src/db/db/dbNetlistDeviceExtractor.h b/src/db/db/dbNetlistDeviceExtractor.h index ecf68c2cf..1cec36080 100644 --- a/src/db/db/dbNetlistDeviceExtractor.h +++ b/src/db/db/dbNetlistDeviceExtractor.h @@ -388,6 +388,11 @@ public: */ Device *create_device (); + /** + * @brief Defines a device terminal in the layout (a region) + */ + void define_terminal (Device *device, size_t terminal_id, size_t layer_index, const db::Region ®ion); + /** * @brief Defines a device terminal in the layout (a polygon) */ diff --git a/src/db/db/dbNetlistDeviceExtractorClasses.cc b/src/db/db/dbNetlistDeviceExtractorClasses.cc index 343047ea3..08f2336c2 100644 --- a/src/db/db/dbNetlistDeviceExtractorClasses.cc +++ b/src/db/db/dbNetlistDeviceExtractorClasses.cc @@ -280,6 +280,33 @@ void NetlistDeviceExtractorResistor::extract_devices (const std::vector C + define_layer ("tB", 1, "B terminal output"); // #4 -> C + define_layer ("tW", 2, "W terminal output"); // #5 -> W + + register_device_class (new db::DeviceClassResistorWithBulk ()); +} + +void NetlistDeviceExtractorResistorWithBulk::modify_device (const db::Polygon &res, const std::vector & /*layer_geometry*/, db::Device *device) +{ + unsigned int bulk_terminal_geometry_index = 5; + define_terminal (device, db::DeviceClassResistorWithBulk::terminal_id_W, bulk_terminal_geometry_index, res); +} + // --------------------------------------------------------------------------------- // NetlistDeviceExtractorCapacitor implementation @@ -355,4 +382,126 @@ void NetlistDeviceExtractorCapacitor::extract_devices (const std::vector P1 + define_layer ("tB", 1, "B terminal output"); // #4 -> P2 + define_layer ("tW", 2, "W terminal output"); // #5 -> W + + register_device_class (new db::DeviceClassCapacitorWithBulk ()); +} + +void NetlistDeviceExtractorCapacitorWithBulk::modify_device (const db::Polygon &cap, const std::vector & /*layer_geometry*/, db::Device *device) +{ + unsigned int bulk_terminal_geometry_index = 5; + define_terminal (device, db::DeviceClassCapacitorWithBulk::terminal_id_W, bulk_terminal_geometry_index, cap); +} + +// --------------------------------------------------------------------------------- +// NetlistDeviceExtractorBipolarTransistor implementation + +NetlistDeviceExtractorBipolarTransistor::NetlistDeviceExtractorBipolarTransistor (const std::string &name) + : db::NetlistDeviceExtractor (name) +{ + // .. nothing yet .. +} + +void NetlistDeviceExtractorBipolarTransistor::setup () +{ + define_layer ("C", "Collector"); // #0 + define_layer ("B", "Base"); // #1 + define_layer ("E", "Emitter"); // #2 + + // terminal output + define_layer ("tC", 0, "Collector terminal output"); // #3 -> C + define_layer ("tB", 1, "Base terminal output"); // #4 -> B + define_layer ("tE", 2, "Emitter terminal output"); // #5 -> E + + register_device_class (new db::DeviceClassBipolarTransistor ()); +} + +db::Connectivity NetlistDeviceExtractorBipolarTransistor::get_connectivity (const db::Layout & /*layout*/, const std::vector &layers) const +{ + tl_assert (layers.size () >= 3); + + unsigned int collector = layers [0]; + unsigned int base = layers [1]; + unsigned int emitter = layers [2]; + + db::Connectivity conn; + // collect all connected base shapes. Join polygons. + conn.connect (base, base); + // collect all collector and emitter shapes connected with base + conn.connect (base, collector); + conn.connect (base, emitter); + return conn; +} + +void NetlistDeviceExtractorBipolarTransistor::extract_devices (const std::vector &layer_geometry) +{ + unsigned int collector_geometry_index = 0; + unsigned int base_geometry_index = 1; + unsigned int emitter_geometry_index = 2; + unsigned int collector_terminal_geometry_index = 3; + unsigned int base_terminal_geometry_index = 4; + unsigned int emitter_terminal_geometry_index = 5; + + const db::Region &rbases = layer_geometry [base_geometry_index]; + const db::Region &rcollectors = layer_geometry [collector_geometry_index]; + const db::Region &remitters = layer_geometry [emitter_geometry_index]; + + for (db::Region::const_iterator p = rbases.begin_merged (); !p.at_end (); ++p) { + + db::Region rbase (*p); + rbase.set_base_verbosity (rbases.base_verbosity ()); + + db::Region rcollector2base = rbase & rcollectors; + if (rcollector2base.empty ()) { + rcollector2base = rbase; + } + + db::Region remitter2base = rbase & remitters; + + if (remitter2base.empty ()) { + error (tl::to_string (tr ("Base shape without emitters - ignored")), *p); + } else { + + for (db::Region::const_iterator pe = remitter2base.begin_merged (); !pe.at_end (); ++pe) { + + db::Device *device = create_device (); + + device->set_trans (db::DCplxTrans ((pe->box ().center () - db::Point ()) * dbu ())); + + device->set_parameter_value (db::DeviceClassBipolarTransistor::param_id_AE, dbu () * dbu () * pe->area ()); + device->set_parameter_value (db::DeviceClassBipolarTransistor::param_id_PE, dbu () * pe->perimeter ()); + + define_terminal (device, db::DeviceClassBipolarTransistor::terminal_id_C, collector_terminal_geometry_index, rcollector2base); + define_terminal (device, db::DeviceClassBipolarTransistor::terminal_id_B, base_terminal_geometry_index, *p); + define_terminal (device, db::DeviceClassBipolarTransistor::terminal_id_E, emitter_terminal_geometry_index, *pe); + + // allow derived classes to modify the device + modify_device (*p, layer_geometry, device); + + // output the device for debugging + device_out (device, rcollector2base, rbase, *pe); + + } + + } + + } +} + } diff --git a/src/db/db/dbNetlistDeviceExtractorClasses.h b/src/db/db/dbNetlistDeviceExtractorClasses.h index 42c669d77..95426e893 100644 --- a/src/db/db/dbNetlistDeviceExtractorClasses.h +++ b/src/db/db/dbNetlistDeviceExtractorClasses.h @@ -141,6 +141,22 @@ private: double m_sheet_rho; }; +/** + * @brief A device extractor for a two-terminal resistor with a bulk terminal + * + * Extracts a resistor like NetlistDeviceExtractorResistor, but adds one more terminal + * for the bulk or well the resistor is embedded in. + */ +class DB_PUBLIC NetlistDeviceExtractorResistorWithBulk + : public db::NetlistDeviceExtractorResistor +{ +public: + NetlistDeviceExtractorResistorWithBulk (const std::string &name, double sheet_rho); + + virtual void setup (); + virtual void modify_device (const db::Polygon &res, const std::vector & /*layer_geometry*/, db::Device *device); +}; + /** * @brief A device extractor for a planar capacitor * @@ -190,6 +206,73 @@ private: double m_area_cap; }; +/** + * @brief A device extractor for a two-terminal capacitor with a bulk terminal + * + * Extracts a resistor like NetlistDeviceExtractorCapacitor, but adds one more terminal + * for the bulk or well the capacitor is embedded in. + */ +class DB_PUBLIC NetlistDeviceExtractorCapacitorWithBulk + : public db::NetlistDeviceExtractorCapacitor +{ +public: + NetlistDeviceExtractorCapacitorWithBulk (const std::string &name, double cap_area); + + virtual void setup (); + virtual void modify_device (const db::Polygon &cap, const std::vector & /*layer_geometry*/, db::Device *device); +}; + +/** + * @brief A device extractor for a bipolar transistor + * + * This class supplies the generic extractor for a bipolar transistor device. + * Extraction of vertical and lateral transistors is supported through a generic geometry model: + * + * The basic area is the base area. A marker shape must be provided for this area. + * The emitter of the transistor is defined by emitter layer shapes inside the base area. + * Multiple emitter shapes can be present. In this case, multiple transistor devices sharing the + * same base and collector are generated. + * + * Finally, a collector layer can be given. If non-empty, the parts inside the base region will define + * the collector terminals. If empty, the collector is formed by the substrate. In this case, the base + * region will be output to the 'tC' terminal output layer. This layer then needs to be connected to a global net + * to form the net connection. + * + * The device class produced by this extractor is \\DeviceClassBipolarTransistor. + * The extractor extracts the two parameters of this class: AE and PE. + * + * The device recognition layer names are 'C' (collector), 'B' (base) and 'E' (emitter). + * The terminal output layer names are 'tC' (collector), 'tB' (base) and 'tE' (emitter). + */ +class DB_PUBLIC NetlistDeviceExtractorBipolarTransistor + : public db::NetlistDeviceExtractor +{ +public: + NetlistDeviceExtractorBipolarTransistor (const std::string &name); + + virtual void setup (); + virtual db::Connectivity get_connectivity (const db::Layout &layout, const std::vector &layers) const; + virtual void extract_devices (const std::vector &layer_geometry); + +protected: + /** + * @brief A callback when the device is produced + * This callback is provided as a debugging port + */ + virtual void device_out (const db::Device * /*device*/, const db::Region & /*collector*/, const db::Region & /*base*/, const db::Polygon & /*emitter*/) + { + // .. no specific implementation .. + } + + /** + * @brief Allow derived classes to modify the device + */ + virtual void modify_device (const db::Polygon & /*emitter*/, const std::vector & /*layer_geometry*/, db::Device * /*device*/) + { + // .. no specific implementation .. + } +}; + } namespace tl @@ -213,12 +296,30 @@ template<> struct type_traits : public tl:: typedef tl::false_tag has_default_constructor; }; +template<> struct type_traits : public tl::type_traits +{ + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; + template<> struct type_traits : public tl::type_traits { typedef tl::false_tag has_copy_constructor; typedef tl::false_tag has_default_constructor; }; +template<> struct type_traits : public tl::type_traits +{ + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; + +template<> struct type_traits : public tl::type_traits +{ + typedef tl::false_tag has_copy_constructor; + typedef tl::false_tag has_default_constructor; +}; + } #endif diff --git a/src/db/db/gsiDeclDbNetlistDeviceClasses.cc b/src/db/db/gsiDeclDbNetlistDeviceClasses.cc index 4bd11a670..934ef9590 100644 --- a/src/db/db/gsiDeclDbNetlistDeviceClasses.cc +++ b/src/db/db/gsiDeclDbNetlistDeviceClasses.cc @@ -39,7 +39,7 @@ Class decl_dbDeviceClassResistor (decl_dbDeviceClass, " "@brief A constant giving the parameter ID for parameter R" ), "@brief A device class for a resistor.\n" - "This class can be used to describe resistors. Resistors are defined by their combination behavior and " + "This class describes a resistor. Resistors are defined by their combination behavior and " "the basic parameter 'R' which is the resistance in Ohm.\n" "\n" "A resistor has two terminals, A and B.\n" @@ -47,6 +47,26 @@ Class decl_dbDeviceClassResistor (decl_dbDeviceClass, " "This class has been introduced in version 0.26." ); +Class decl_dbDeviceClassResistorWithBulk (decl_dbDeviceClass, "db", "DeviceClassResistorWithBulk", + gsi::constant ("TERMINAL_A", db::DeviceClassResistorWithBulk::terminal_id_A, + "@brief A constant giving the terminal ID for terminal A" + ) + + gsi::constant ("TERMINAL_B", db::DeviceClassResistorWithBulk::terminal_id_B, + "@brief A constant giving the terminal ID for terminal B" + ) + + gsi::constant ("TERMINAL_W", db::DeviceClassResistorWithBulk::terminal_id_W, + "@brief A constant giving the terminal ID for terminal W (well, bulk)" + ) + + gsi::constant ("PARAM_R", db::DeviceClassResistorWithBulk::param_id_R, + "@brief A constant giving the parameter ID for parameter R" + ), + "@brief A device class for a resistor with a bulk terminal (substrate, well).\n" + "This class is similar to \\DeviceClassResistor, but provides an additional terminal (BULK) for the " + "well or substrate the resistor is embedded in.\n" + "\n" + "This class has been introduced in version 0.26." +); + Class decl_dbDeviceClassCapacitor (decl_dbDeviceClass, "db", "DeviceClassCapacitor", gsi::constant ("TERMINAL_A", db::DeviceClassCapacitor::terminal_id_A, "@brief A constant giving the terminal ID for terminal A" @@ -58,7 +78,7 @@ Class decl_dbDeviceClassCapacitor (decl_dbDeviceClass, "@brief A constant giving the parameter ID for parameter C" ), "@brief A device class for a capacitor.\n" - "This class can be used to describe capacitors. Capacitors are defined by their combination behavior and " + "This describes a capacitor. Capacitors are defined by their combination behavior and " "the basic parameter 'C' which is the capacitance in Farad.\n" "\n" "A capacitor has two terminals, A and B.\n" @@ -66,6 +86,26 @@ Class decl_dbDeviceClassCapacitor (decl_dbDeviceClass, "This class has been introduced in version 0.26." ); +Class decl_dbDeviceClassCapacitorWithBulk (decl_dbDeviceClass, "db", "DeviceClassCapacitorWithBulk", + gsi::constant ("TERMINAL_A", db::DeviceClassCapacitorWithBulk::terminal_id_A, + "@brief A constant giving the terminal ID for terminal A" + ) + + gsi::constant ("TERMINAL_B", db::DeviceClassCapacitorWithBulk::terminal_id_B, + "@brief A constant giving the terminal ID for terminal B" + ) + + gsi::constant ("TERMINAL_W", db::DeviceClassCapacitorWithBulk::terminal_id_W, + "@brief A constant giving the terminal ID for terminal W (well, bulk)" + ) + + gsi::constant ("PARAM_C", db::DeviceClassCapacitorWithBulk::param_id_C, + "@brief A constant giving the parameter ID for parameter C" + ), + "@brief A device class for a capacitor with a bulk terminal (substrate, well).\n" + "This class is similar to \\DeviceClassCapacitor, but provides an additional terminal (BULK) for the " + "well or substrate the capacitor is embedded in.\n" + "\n" + "This class has been introduced in version 0.26." +); + Class decl_dbDeviceClassInductor (decl_dbDeviceClass, "db", "DeviceClassInductor", gsi::constant ("TERMINAL_A", db::DeviceClassInductor::terminal_id_A, "@brief A constant giving the terminal ID for terminal A" @@ -77,7 +117,7 @@ Class decl_dbDeviceClassInductor (decl_dbDeviceClass, " "@brief A constant giving the parameter ID for parameter L" ), "@brief A device class for an inductor.\n" - "This class can be used to describe inductors. Inductors are defined by their combination behavior and " + "This class describes an inductor. Inductors are defined by their combination behavior and " "the basic parameter 'L' which is the inductance in Henry.\n" "\n" "An inductor has two terminals, A and B.\n" @@ -96,7 +136,7 @@ Class decl_dbDeviceClassDiode (decl_dbDeviceClass, "db", " "@brief A constant giving the parameter ID for parameter A" ), "@brief A device class for a diode.\n" - "This class can be used to describe diodes. Diodes are defined by their combination behavior and " + "This class descibes a diode. Diodes are defined by their combination behavior and " "the basic parameter 'A' which is their area in square micrometers.\n" "\n" "Diodes only combine when parallel and in the same direction. In this case, their areas are added." @@ -106,6 +146,30 @@ Class decl_dbDeviceClassDiode (decl_dbDeviceClass, "db", " "This class has been introduced in version 0.26." ); +Class decl_DeviceClassBipolarTransistor (decl_dbDeviceClass, "db", "DeviceClassBipolarTransistor", + gsi::constant ("TERMINAL_C", db::DeviceClassBipolarTransistor::terminal_id_C, + "@brief A constant giving the terminal ID for terminal C (collector)" + ) + + gsi::constant ("TERMINAL_B", db::DeviceClassBipolarTransistor::terminal_id_B, + "@brief A constant giving the terminal ID for terminal B (base)" + ) + + gsi::constant ("TERMINAL_E", db::DeviceClassBipolarTransistor::terminal_id_E, + "@brief A constant giving the terminal ID for terminal E (emitter)" + ) + + gsi::constant ("PARAM_AE", db::DeviceClassBipolarTransistor::param_id_AE, + "@brief A constant giving the parameter ID for parameter AE (emitter area)" + ) + + gsi::constant ("PARAM_PE", db::DeviceClassBipolarTransistor::param_id_PE, + "@brief A constant giving the parameter ID for parameter PE (emitter perimeter)" + ), + "@brief A device class for a bipolar transistor.\n" + "This class describes a bipolar transistor. Bipolar transistors have tree terminals: the collector (C), the base (B) and the emitter (E).\n" + "Multi-emitter transistors are resolved in individual devices. The basic parameter of a transistor is the emitter area (AE). " + "In addition, the emitter perimeter is extracted too (PE)." + "\n" + "This class has been introduced in version 0.26." +); + Class decl_dbDeviceClassMOS3Transistor (decl_dbDeviceClass, "db", "DeviceClassMOS3Transistor", gsi::constant ("TERMINAL_S", db::DeviceClassMOS3Transistor::terminal_id_S, "@brief A constant giving the terminal ID for terminal S" @@ -135,7 +199,7 @@ Class decl_dbDeviceClassMOS3Transistor (decl_dbDe "@brief A constant giving the parameter ID for parameter PD" ), "@brief A device class for a 3-terminal MOS transistor.\n" - "This class can be used to describe MOS transistors without a bulk terminal. " + "This class describes a MOS transistor without a bulk terminal. " "A device class for a MOS transistor with a bulk terminal is \\DeviceClassMOS4Transistor. " "MOS transistors are defined by their combination behavior and the basic parameters.\n" "\n" @@ -183,7 +247,7 @@ Class decl_dbDeviceClassMOS4Transistor (decl_dbDe "@brief A constant giving the parameter ID for parameter PD" ), "@brief A device class for a 4-terminal MOS transistor.\n" - "This class can be used to describe MOS transistors with a bulk terminal. " + "This class describes a MOS transistor with a bulk terminal. " "A device class for a MOS transistor without a bulk terminal is \\DeviceClassMOS3Transistor. " "MOS transistors are defined by their combination behavior and the basic parameters.\n" "\n" diff --git a/src/db/db/gsiDeclDbNetlistDeviceExtractor.cc b/src/db/db/gsiDeclDbNetlistDeviceExtractor.cc index e1266cb4f..c5769d143 100644 --- a/src/db/db/gsiDeclDbNetlistDeviceExtractor.cc +++ b/src/db/db/gsiDeclDbNetlistDeviceExtractor.cc @@ -411,7 +411,10 @@ Class decl_NetlistDeviceExtractorMOS3T "conductive layer.\n" "\n" "The device class produced by this extractor is \\DeviceClassMOS3Transistor.\n" - "The extractor extracts the four parameters of this class: L, W, AS and AD.\n" + "The extractor extracts the six parameters of this class: L, W, AS, AD, PS and PD.\n" + "\n" + "The device recognition layer names are 'SD' (source/drain) and 'G' (gate).\n" + "The terminal output layer names are 'tS' (source), 'tG' (gate) and 'tD' (drain).\n" "\n" "The diffusion area is distributed on the number of gates connecting to\n" "the particular source or drain area.\n" @@ -442,11 +445,14 @@ Class decl_NetlistDeviceExtractorMOS4T "conductive layer.\n" "\n" "The bulk terminal layer can be an empty layer representing the substrate.\n" - "In this use mode the bulk terminal shapes will be produced there. This\n" - "layer then needs to be connected to a global net to establish the net.\n" + "In this use mode the bulk terminal shapes will be produced on the 'tB' layer. This\n" + "layer then needs to be connected to a global net to establish the net connection.\n" "\n" "The device class produced by this extractor is \\DeviceClassMOS4Transistor.\n" - "The extractor extracts the four parameters of this class: L, W, AS and AD.\n" + "The extractor extracts the six parameters of this class: L, W, AS, AD, PS and PD.\n" + "\n" + "The device recognition layer names are 'SD' (source/drain), 'G' (gate) and 'W' (well, bulk).\n" + "The terminal output layer names are 'tS' (source), 'tG' (gate), 'tD' (drain) and 'tB' (bulk).\n" "\n" "The diffusion area is distributed on the number of gates connecting to\n" "the particular source or drain area.\n" @@ -480,6 +486,43 @@ Class decl_NetlistDeviceExtractorResistor (d "Using the given sheet resistance, the resistance value is computed by " "'R = L / W * sheet_rho'.\n" "\n" + "The device class produced by this extractor is \\DeviceClassResistor.\n" + "The extractor extracts the three parameters of this class: R, A and P.\n" + "\n" + "The device recognition layer names are 'R' (resistor) and 'C' (contacts).\n" + "The terminal output layer names are 'tA' (terminal A) and 'tB' (terminal B).\n" + "\n" + "This class is a closed one and methods cannot be reimplemented. To reimplement " + "specific methods, see \\DeviceExtractor.\n" + "\n" + "This class has been introduced in version 0.26." +); + +db::NetlistDeviceExtractorResistorWithBulk *make_res_with_bulk_extractor (const std::string &name, double sheet_rho) +{ + return new db::NetlistDeviceExtractorResistorWithBulk (name, sheet_rho); +} + +Class decl_NetlistDeviceExtractorResistorWithBulk (decl_dbNetlistDeviceExtractor, "db", "DeviceExtractorResistorWithBulk", + gsi::constructor ("new", &make_res_with_bulk_extractor, gsi::arg ("name"), gsi::arg ("sheet_rho"), + "@brief Creates a new device extractor with the given name." + ), + "@brief A device extractor for a resistor with a bulk terminal\n" + "\n" + "This class supplies the generic extractor for a resistor device including a bulk terminal.\n" + "The device is defined the same way than devices are defined for \\DeviceExtractorResistor.\n" + "\n" + "In addition, a bulk terminal layer must be provided.\n" + "The bulk terminal layer can be an empty layer representing the substrate.\n" + "In this use mode the bulk terminal shapes will be produced on the 'tW' layer. This\n" + "layer then needs to be connected to a global net to establish the net connection.\n" + "\n" + "The device class produced by this extractor is \\DeviceClassResistorWithBulk.\n" + "The extractor extracts the three parameters of this class: R, A and P.\n" + "\n" + "The device recognition layer names are 'R' (resistor), 'C' (contacts) and 'W' (well, bulk).\n" + "The terminal output layer names are 'tA' (terminal A), 'tB' (terminal B) and 'tW' (well, bulk).\n" + "\n" "This class is a closed one and methods cannot be reimplemented. To reimplement " "specific methods, see \\DeviceExtractor.\n" "\n" @@ -502,6 +545,77 @@ Class decl_NetlistDeviceExtractorCapacitor "The capacitance is computed from the overlapping area of the plates " "using 'C = A * area_cap' (area_cap is the capacitance per square micrometer area).\n" "\n" + "The device class produced by this extractor is \\DeviceClassCapacitor.\n" + "The extractor extracts the three parameters of this class: C, A and P.\n" + "\n" + "The device recognition layer names are 'P1' (plate 1) and 'P2' (plate 2).\n" + "The terminal output layer names are 'tA' (terminal A) and 'tB' (terminal B).\n" + "\n" + "This class is a closed one and methods cannot be reimplemented. To reimplement " + "specific methods, see \\DeviceExtractor.\n" + "\n" + "This class has been introduced in version 0.26." +); + +db::NetlistDeviceExtractorCapacitorWithBulk *make_cap_with_bulk_extractor (const std::string &name, double area_cap) +{ + return new db::NetlistDeviceExtractorCapacitorWithBulk (name, area_cap); +} + +Class decl_NetlistDeviceExtractorCapacitorWithBulk (decl_dbNetlistDeviceExtractor, "db", "DeviceExtractorCapacitorWithBulk", + gsi::constructor ("new", &make_cap_with_bulk_extractor, gsi::arg ("name"), gsi::arg ("sheet_rho"), + "@brief Creates a new device extractor with the given name." + ), + "@brief A device extractor for a capacitor with a bulk terminal\n" + "\n" + "This class supplies the generic extractor for a capacitor device including a bulk terminal.\n" + "The device is defined the same way than devices are defined for \\DeviceExtractorCapacitor.\n" + "\n" + "In addition, a bulk terminal layer must be provided.\n" + "The bulk terminal layer can be an empty layer representing the substrate.\n" + "In this use mode the bulk terminal shapes will be produced on the 'tW' layer. This\n" + "layer then needs to be connected to a global net to establish the net connection.\n" + "\n" + "The device class produced by this extractor is \\DeviceClassCapacitorWithBulk.\n" + "The extractor extracts the three parameters of this class: C, A and P.\n" + "\n" + "The device recognition layer names are 'P1' (plate 1), 'P2' (plate 2) and 'W' (well, bulk).\n" + "The terminal output layer names are 'tA' (terminal A), 'tB' (terminal B) and 'tW' (well, bulk).\n" + "\n" + "This class is a closed one and methods cannot be reimplemented. To reimplement " + "specific methods, see \\DeviceExtractor.\n" + "\n" + "This class has been introduced in version 0.26." +); + +db::NetlistDeviceExtractorBipolarTransistor *make_bjt_extractor (const std::string &name) +{ + return new db::NetlistDeviceExtractorBipolarTransistor (name); +} + +Class decl_NetlistDeviceExtractorBipolarTransistor (decl_dbNetlistDeviceExtractor, "db", "DeviceExtractorBipolarTransistor", + gsi::constructor ("new", &make_bjt_extractor, gsi::arg ("name"), + "@brief Creates a new device extractor with the given name." + ), + "@brief A device extractor for a bipolar transistor\n" + "\n" + "This class supplies the generic extractor for a bipolar transistor device.\n" + "Extraction of vertical and lateral transistors is supported through a generic geometry model: " + "The basic area is the base area. A marker shape must be provided for this area. " + "The emitter of the transistor is defined by emitter layer shapes inside the base area. " + "Multiple emitter shapes can be present. In this case, multiple transistor devices sharing the " + "same base and collector are generated.\n" + "Finally, a collector layer can be given. If non-empty, the parts inside the base region will define " + "the collector terminals. If empty, the collector is formed by the substrate. In this case, the base " + "region will be output to the 'tC' terminal output layer. This layer then needs to be connected to a global net " + "to form the net connection.\n" + "\n" + "The device class produced by this extractor is \\DeviceClassBipolarTransistor.\n" + "The extractor extracts the two parameters of this class: AE and PE.\n" + "\n" + "The device recognition layer names are 'C' (collector), 'B' (base) and 'E' (emitter).\n" + "The terminal output layer names are 'tC' (collector), 'tB' (base) and 'tE' (emitter).\n" + "\n" "This class is a closed one and methods cannot be reimplemented. To reimplement " "specific methods, see \\DeviceExtractor.\n" "\n"