Emmi Wyttenbach03/03/2023, 9:45 PM
Tim Edwards03/04/2023, 1:25 AM
Emmi Wyttenbach03/04/2023, 3:49 AM
Tim Edwards03/04/2023, 3:45 PM
Tim Edwards03/04/2023, 4:04 PM
Emmi Wyttenbach03/04/2023, 4:05 PM
Tim Edwards03/04/2023, 4:06 PM
Emmi Wyttenbach03/04/2023, 4:09 PM
Tim Edwards03/04/2023, 4:16 PM
is being instantiated in the netlist with a port order that is different from the one generated by extraction from magic. The tools (xschem and magic) are independent, so they don't know what the other one is doing, and because the diode is defined in the PDK as a subcircuit, there's no obvious order for the pins. Your two choices are: (1) Use the "@@" notation in the format line of the symbol to declare the port names individually, and make them match the order in the layout (2) Use the "port index" command in magic to set the port indexes in the order that they are being output by xschem.
Emmi Wyttenbach03/04/2023, 4:21 PM
Tim Edwards03/04/2023, 4:28 PM
(I'm unable to see from your screenshots what you named the pins in xschem, so I'm assuming the same names
format="@name @@p_side @@n_side @@psub @symname"
that you used in the layout).
Emmi Wyttenbach03/04/2023, 4:41 PM
Tim Edwards03/04/2023, 4:45 PM
Emmi Wyttenbach03/04/2023, 4:55 PM
Tim Edwards03/04/2023, 5:01 PM
you should get a normal-looking diode curve (you may need to change the path in the .lib line in the testbench netlist first).
Emmi Wyttenbach03/04/2023, 5:03 PM
Tim Edwards03/04/2023, 5:11 PM
file for magic, where the diode devices should be described like this:
This tech file has a "version" section at top with:
# NOTE: SkyWater diode models have bizarre units requiring bizarre scaling device pdiode sky130_fd_pr__diode_pd2nw_05v5 *pdiode nwell a=area*1E12 p=pj*1E6
which means that it was created by open_pdks version 1.0.376. The diode area and perimeter values were corrected in open_pdks version 1.0.350 (October 27, 2022).
Emmi Wyttenbach03/04/2023, 5:20 PM
Tim Edwards03/04/2023, 5:20 PM
Emmi Wyttenbach03/04/2023, 5:31 PM