tnt
04/07/2024, 9:01 PMStefan Schippers
04/08/2024, 8:46 AM.subckt tt_asw_1v8 VPWR ctrl mod bus VGND
`.PININFO VPWR:B VGND:B mod:B bus:B ctrl:I`*
XM4 tgon tgon_n VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 m=1
XM3 tgon tgon_n VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 m=1
XM2 tgon_n ctrl VGND VGND sky130_fd_pr__nfet_01v8 L=0.15 W=1.5 nf=1 m=1
XM1 tgon_n ctrl VPWR VPWR sky130_fd_pr__pfet_01v8 L=0.15 W=3 nf=2 m=1
XM6 bus tgon mod VGND sky130_fd_pr__nfet_01v8_lvt L=0.5 W='12 * 4 ' nf=4 m=1
XM5 bus tgon_n mod VPWR sky130_fd_pr__pfet_01v8_lvt L=0.5 W='21 * 7 ' nf=7 m=1
.ends
in the xschem installation (.../share/xschem/make_sym_from_spice.awk
) there is a script. Given a spice netlist containing one or more subckts it will create the related sym files:
.../.../make_sym_from_spice.awk opamp.spice
if opamp.spice
contains an opamp
subcircuit a opamp.sym
file will be created.
However if netlist does not provide information on pin direction the symbols will be generated with all ports declared as '`inout`' and all on the right. You can quickly edit the symbol to reposition pins. see short video.