Design using Qucs-S ===================================== Qucs-S (Quite Universal Circuit Simulator - SPICE) is a fork of the Qucs project that integrates SPICE simulation capabilities. Unlike the original Qucs, which uses its own solver, Qucs-S allows users to simulate circuits using a variety of SPICE engines like Ngspice, XYCE, or any other SPICE-compatible simulator. This makes it versatile for both analog and digital circuit simulation. Qucs-S maintains the same graphical user interface (GUI) as Qucs, enabling schematic capture, simulation, and waveform viewing in a user-friendly environment, but with the added flexibility of SPICE simulation. Qucs-S has also a "look & feel" like a proprietary Keysight ADS tool. Since 2025 we use a dedicated branch, hosted `on qucs repository `_ to integrate and maintain Qucs-S with IHP PDKs. This branch introduces support for devices and schematic objects defined using XML schema. It supports geometrical primitives and allows to use different parameters and netlisting options. More details about Qucs-S XML devices can be found `here `_. Adding a new library and objects to Qucs-S via XML interface ----------- At the moment all the symbols and devices shall be placed in a ``$PDK_ROOT/$PDK/libs.tech/qucs/symbols`` directory. The supported geometry primitives, which can be used to create symbols are the following: .. code-block:: xml .. note:: Add rectangle and arrow from linux laptop The majority of the geometry primitives are conditional, what means that it can be shown or hidden depending on the particular condition defined in the XML file. This feature allows to create a single symbol for different device types, e.g. nmos, pmos, etc. where the majority of the shapes are shared. .. warning:: The PortSym geometry primitive is used to define the device ports. The port order in the netlist corresponds to the order of the PortSym definitions in the ``.sym`` file. The XML device definition file can define one or multiple devices of the same class. Each device is defined using the following preamble .. code-block:: xml The ``library`` attribute defines the library name that will be shown in the Qucs-S library tree. The ``names`` attribute defines the device name that will be shown in the library and on the schematic. The ``schematic_id`` attribute defines the unique identifier of the device class that will be used during netlisting. .. note:: The ``Component.xsd`` file is located in the ``$QUCS_S_ROOT/library/components/`` directory and defines the XML schema for Qucs-S components. The parameters can be defined by the user using the ```` block as shown below: .. code-block:: xml Modelname Spice prefix Width Length Multiplier Also the multiple values can be defined for a single parameter using the ```` block as shown below: .. code-block:: xml [R,X] The parameters support also equation definition in order to calculate the value of a parameter based on other parameters. This can be done using the ``equation`` statement as shown below: .. code-block:: xml Model name Width Length Number of bends Multiplier Resistance value The equations are implemented using `muparser `_ library and support a variety of mathematical functions and operators. Netlisting can be customized using the ```` block as shown below: .. code-block:: xml The values in the curly brackets ``{}`` correspond to the parameter names defined in the ```` block. There are also some checks implemented to avoid empty parameters in the netlist. The ``PartCounter`` variable is iterated along the schematic during netlisting in order to assign unique instance names to each device. The ``{nets}`` variable is replaced during netlisting with the actual net names connected to the device ports defined using ``PortSym`` geometry primitives in the symbol file. Using Qucs-S with IHP-Open-PDK -------- Use the Strong ARM latch example here .. image:: ../_static/analog_flow_horizontal_ihp-OpenPDK-600.png :align: center :alt: IHP Analog/RF flow proposal. :width: 600