Krzysztof Herman
01/02/2025, 5:49 PM<Library name="IHP 131 BiCmos components">
<Component name="Cmim" schematic_id = "C">
<Description>
SG13G2 MiM capacitor
</Description>
<Models>
<DefaultModel value = "cmim">
</DefaultModel>
<SpiceModel value = "cmim">
</SpiceModel>
</Models>
<Symbols>
<Symbol id="Standard">
<PortSym x="-30" y="0" type="1" angle="0" />
<Line x1="-4" y1="-11" x2="-4" y2="11" color="#000080" width="2" style="1" />
<Line x1="4" y1="-11" x2="4" y2="11" color="#000080" width="2" style="1" />
<Line x1="-30" y1="0" x2="-4" y2="0" color="#000080" width="2" style="1" />
<Line x1="4" y1="0" x2="30" y2="0" color="#000080" width="2" style="1" />
<PortSym x="30" y="0" type="2" angle="180"/>
</Symbol>
</Symbols>
<Parameters>
<Parameter name="w" unit="um" default_value="10.0" show="1">
<Description>Width</Description>
</Parameter>
<Parameter name="l" unit="um" default_value="10.0" show="1">
<Description>Length</Description>
</Parameter>
<Parameter name="m" unit="" default_value="1" show="1">
<Description>multiplier</Description>
</Parameter>
</Parameters>
</Component>
It would be a good idea to separate symbols and elements since the symbols of all three open sourced pdk's are pretty standard. The second thing is netlisting. Here we need a netlist function which will stream an entry in the netlist as follows:
prefixInstanceName1 port1 port2 ... ModelName parameter1=value parameter2=value parameter3=value
usually the prefix is set to X
since the elements are modeled as subcircuits. Also the location of the XML file should be standard and equal to ie. $PDK_ROOT/$PDK/libs.tech/qucs-s/symbols.xml.
I share here the xml file which should be placed in qucs/Libraries/
Right now it needs recompilation but maybe we can make the components dynamically loaded when qucs-s
is launched. Also some sections in Parameter
field like min
and `max`value of the parameter would be welcome in order to support respective checks when changing the values. The issue here is that the parameters depend on each other so it should be implemented using some callbacks.