Emmi Wyttenbach
03/03/2023, 9:45 PMTim Edwards
03/04/2023, 1:25 AMEmmi Wyttenbach
03/04/2023, 3:49 AMTim Edwards
03/04/2023, 3:45 PMEmmi Wyttenbach
03/04/2023, 3:59 PMTim Edwards
03/04/2023, 4:04 PMEmmi Wyttenbach
03/04/2023, 4:05 PMTim Edwards
03/04/2023, 4:06 PMEmmi Wyttenbach
03/04/2023, 4:09 PMTim Edwards
03/04/2023, 4:16 PMpdiode_100
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 Wyttenbach
03/04/2023, 4:21 PMTim Edwards
03/04/2023, 4:28 PMformat="@name @@p_side @@n_side @@psub @symname"
(I'm unable to see from your screenshots what you named the pins in xschem, so I'm assuming the same names p_side
, n_side
, and psub
that you used in the layout).Emmi Wyttenbach
03/04/2023, 4:41 PMTim Edwards
03/04/2023, 4:45 PMEmmi Wyttenbach
03/04/2023, 4:55 PMTim Edwards
03/04/2023, 5:01 PMpdiode_test_tb.spice
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 Wyttenbach
03/04/2023, 5:03 PMTim Edwards
03/04/2023, 5:11 PMsky130A.tech
file for magic, where the diode devices should be described like this:
# 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
This tech file has a "version" section at top with:
version 1.0.376-6-g3f9bdbd
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 Wyttenbach
03/04/2023, 5:20 PMTim Edwards
03/04/2023, 5:20 PMEmmi Wyttenbach
03/04/2023, 5:31 PM