Stefan Schippers
12/08/2020, 2:57 AM.subckt sky130_fd_pr__nfet_01v8_lvt d g s b
+
.param l = 1 w = 1 nf = 1.0 ad = 0 as = 0 pd = 0 ps = 0 nrd = 0 nrs = 0 sa = 0 sb = 0 sd = 0 mult = 1
msky130_fd_pr__nfet_01v8_lvt d g s b sky130_fd_pr__nfet_01v8_lvt__model l = {l} w = {w} nf = {nf} ad = {ad} as = {as} pd = {pd} ps = {ps} nrd = {nrd} nrs = {nrs} sa = {sa} sb = {sb} sd = {sd}
.model sky130_fd_pr__nfet_01v8_lvt__model.0 nmos
...
...
After doing this change in the pdk i was able to simulate a mos transistor defined as follows:
XM8 net1 G1v8 S B sky130_fd_pr__nfet_01v8_lvt W=2 L=0.15 nf=2
+ ad='int((nf+1)/2) * W/nf * 0.29'
+ pd='2*int((nf+1)/2) * (W/nf + 0.29)'
+ as='int((nf+2)/2) * W/nf * 0.29'
+ ps='2*int((nf+2)/2) * (W/nf + 0.29)'
+ nrd='0.29 / W'
+ nrs='0.29 / W' sa=0
+ sb=0 sd=0 mult=1 m=1
the equations are reduced to numbers at netlist parsing time (no runtime penalties) and results in a correct evaluation of source / drain diffusion capacitances even for multi-fingered devices. It was really tough to figure this out.... :-)