I've been aligning the Qucs-S XML to the xschem lo...
# qucs-s
a
I've been aligning the Qucs-S XML to the xschem loading logic. With respect to the previous update: 1. The subcircuit definition was removed from the XML so the component model is directly pulled from the Ngspice lib (as xschem does). 2. The library includes were made relative to PDK_ROOT, defined in "Locations". 3. The component symbols are drawn from generic components. The component definition now looks like this: Resistors
Copy code
<Component name="Rsil" schematic_id = "Rsil">
        <Description>
            SG13G2 Salicide resistor
        </Description>
        <Netlists>
                <NgspiceNetlist value = 'Xrsil{PartCounter} {nets} rsil w={w} l={l} m={m}'>
                        <Include value=".LIB {PDK_ROOT}/ihp-sg13g2/libs.tech/ngspice/models/cornerRES.lib res_typ">
                        </Include>
                </NgspiceNetlist>
        </Netlists>
        <Symbols>
            <Symbol id="Standard" type="external"> <!-- Generic symbol from the "Lumped Components" library -->
               <File>{QUCS_S_COMPONENTS_LIBRARY}/Lumped_Component_Symbols/Resistor.sym</File>
            </Symbol>
        </Symbols>
        <Parameters>
            <Parameter name="w" unit="um" default_value="0.5" show="true">
                <Description>Width</Description>
            </Parameter>
            <Parameter name="l" unit="um" default_value="0.5" show="true">
                <Description>Length</Description>
            </Parameter>
            <Parameter name="m" unit="" default_value="1" show="true">
                <Description>multiplier</Description>
            </Parameter>
            <Parameter name="b" unit="" default_value="0" show="true">
                <Description>Number of bends</Description>
            </Parameter>
        </Parameters>
    </Component>
NMOS
Copy code
<Component name="LV-nMOS" schematic_id = "LV-nMOS">
        <Description>
            SG13G2 Low Voltage nMOS transistor
        </Description>
        <Netlists>
            <NgspiceNetlist value = 'Xsg13_lv_nmos{PartCounter} {nets} sg13_lv_nmos w={w} l={l} ng={ng} m={m} as={as} ad={ad} pd={pd} ps={ps} trise={trise} z1={z1} z2={z2} wmin={wmin} rfmode={rfmode} pre_layout=1'>
                    <Include value=".LIB {PDK_ROOT}/ihp-sg13g2/libs.tech/ngspice/models/cornerMOSlv.lib mos_tt">
                    </Include>
                    <OSDI value="{PDK_ROOT}/ihp-sg13g2/libs.tech/ngspice/openvaf/psp103_nqs.osdi">
                    </OSDI>
            </NgspiceNetlist>
        </Netlists>
        <Symbols>
            <Symbol id="Standard" type="external">
               <File>{QUCS_S_COMPONENTS_LIBRARY}/Nonlinear_Components_Symbols/NMOS.sym</File>
            </Symbol>
        </Symbols>
        <Parameters>
            <Parameter name="w" unit="um" default_value="0.35" show="true">
                <Description>Width</Description>
            </Parameter>
            <Parameter name="l" unit="um" default_value="0.34" show="true">
                <Description>Length</Description>
            </Parameter>
... more parameters
        </Parameters>
    </Component>
I've also moved the SG-13G2 XML library to [1] since it doesn't make sense to have it under the Qucs-S development tree. In order to reduce clutter, I've splitted the XML into two files: "IHP-SG13G2 Basic" and IHP-SG13G2 Nonlinear". [1] https://github.com/andresmmera/IHP-Open-PDK/tree/Qucs-S-XML-PDK