Schematic symbol library¶
The editor loads its built-in symbol library from the symbols/ directory in
the repository: one <name>.toml sidecar plus its sibling <name>.svg
artwork file per symbol. Most SVG artwork is extracted from the
SchematicSymbolsSVG
collection (MIT, (c) 2023 Sam Gallagher); the waveform source, current source,
and inductor symbols are original OpenVLSI artwork. See symbols/ATTRIBUTION.md for
sources and modifications. No symbol artwork is hardcoded in the application.
Use Project → Place Device or press P in the editor. The device browser
groups devices into category tabs, supports name/category search, and shows an
SVG symbol preview plus the symbol’s default parameters. Symbols are stored in
the canonical schematic model with stable IDs and explicit pin IDs, so
placement, movement, deletion, and connections survive project save/reload.
Symbols¶
Symbol |
Source element |
Pins |
|---|---|---|
Resistor |
|
1, 2 |
Capacitor |
|
1, 2 |
Inductor |
original OpenVLSI artwork |
1, 2 |
Diode |
|
A, K |
Voltage Source |
|
+, - |
Pulse Voltage Source |
original OpenVLSI artwork |
+, - |
Sine Voltage Source |
original OpenVLSI artwork |
+, - |
Current Source |
original OpenVLSI artwork |
+, - |
Ground |
|
GND |
Op Amp |
|
+, -, OUT |
NMOS |
|
G, D, S, B |
Input |
original OpenVLSI artwork |
IN |
Output |
original OpenVLSI artwork |
OUT |
Pin |
original OpenVLSI artwork |
PIN |
Pin coordinates are integers in symbol units with the origin at the artwork center, so the GUI can center artwork of any size on the symbol origin and wires attach exactly at the artwork terminals.
Sidecar format¶
[symbol]
name = "resistor"
artwork = "resistor.svg"
# Or reference OpenVLSI's shared artwork from a package sidecar:
# artwork = "generic:resistor.svg"
category = "Passive"
label_x = 0
label_y = 20
[[pin]]
name = "1"
x = -16
y = 0
direction = "inout"
[[parameter]]
name = "resistance"
value = "1k"
artwork normally names a sibling SVG file. Package sidecars may instead use
artwork = "generic:<file>.svg" to reference OpenVLSI’s built-in symbol artwork
directory. Only a plain SVG filename is accepted after generic:; absolute
paths and parent-directory traversal are rejected.
label_x and label_y set the anchor for the centered instance label in
symbol coordinates, using the same origin (artwork center) and positive-Y-up
convention as pins. Both fields are optional but must be provided together;
symbols without them keep the legacy bottom-left label placement.
direction accepts input, output, or inout; the physical pin side is
derived from the pin position. The loader (openvlsi::SymbolLibrary::load) rejects
a sidecar whose artwork file is missing or unsafe (not an SVG document,
embedded scripts, external references), whose pin names are empty or
duplicated, whose coordinates are not integers, or whose symbol name
duplicates another file. Optional [[parameter]] entries seed default instance
parameters whenever the symbol is placed; users can edit them per instance in
the properties editor.
PDK symbol libraries¶
Each schematic stores the PDK it uses. The built-in Generic PDK exposes only
the generic library described above. A schematic linked to a package PDK also
loads that package’s own symbols/ directory, so the combined browser shows
generic symbols and PDK-specific symbols together. The IHP SG13G2, Sky130, and
GF180MCU packages provide NMOS/PMOS, bipolar, passive, and diode definitions and
merge them into the generic transistor, passive, and semiconductor categories.
Their sidecars reference OpenVLSI’s shared artwork with generic: values, so the
packages do not duplicate SVG files. PDK transistor and passive sidecars also
declare default model/size parameters, so newly placed instances start with
editable values such as model, w, l, and m. There are no built-in IHP,
Sky130, or GF180MCU symbol definitions in OpenVLSI.
Semiconductor symbols¶
Drawn transistor, diode, and subcircuit symbols participate in netlisting:
NMOS/PMOS —
M<name> <drain> <gate> <source> <bulk> <model> [W=.. L=.. M=..]on the Generic PDK. When the schematic uses a package PDK and the instance has amodelparameter, OpenVLSI emits anXsubcircuit call instead because IHP, Sky130, and GF180MCU provide MOS devices as SPICE subcircuits.NPN/PNP/BJT —
Q<name> <collector> <base> <emitter> [<substrate>] <model> [M=..]. Package-PDK BJTs useXsubcircuit calls; a missing substrate pin is tied to node0.Diode —
D<name> <anode> <cathode> <model> [AREA=..].Op Amp —
X<name> <+> <-> <out> <model>.
Device pin order is read from the pin names (D/G/S/B, C/B/E, A/K,
+/-/OUT) rather than the symbol’s visual pin order. If a model parameter is
missing, OpenVLSI emits a commented note and a sensible fallback model name
(NMOS, PMOS, NPN, PNP, Dmodel, or OPAMP).
Source symbols¶
The source symbols share the same two-pin vertical layout and are distinguished in the netlist by their symbol name and instance parameters:
Voltage Source — constant DC value from the
voltageparameter.Pulse Voltage Source —
initial_voltage,pulsed_voltage,delay_time,rise_time,fall_time,pulse_width,period, andpulse_count; emitted asPULSE(v1 v2 td tr tf pw per ncycles). Apulse_countof0means a continuous pulse train.Sine Voltage Source —
offset_voltage,amplitude,frequency,delay_time,damping_factor, andphase; emitted asSIN(vo va freq td theta phi).Current Source — constant DC value from the
currentparameter.
The waveform sources also accept the short SPICE aliases (v1, v2, td,
tr, tf, pw, per, vo, va, freq, theta, phi) when reading
existing projects or hand-edited parameter tables. The pulse count also accepts
number_of_pulses, cycles, or ncycles.
Each symbol seeds those parameters when placed, and they can be edited per
instance in the properties dialog. A parameter named value is emitted
verbatim as a raw SPICE source expression and overrides the structured fields.
Lookup¶
At startup the GUI searches symbols/ next to the executable, the
compile-time source directory (so development builds work from any working
directory), the current working directory, and /usr/share/openvlsi/symbols.
Placing a symbol without a resolvable library is an explicit error, not a
silent fallback.