<@U01819B63HP>: I think that I don't have a metho...
# sky130
@User: I think that I don't have a method to put AD/AS/PD/PS into the subcircuit output, but it should be relatively straightforward to add. This was part of code I added to magic to handle output of subcircuits instead of low-level devices; as soon as you use X instead of M, for example, anything goes for the names of the parameters, so there has to be a way to map the parameter names in the device description in the magic techfile. It's mainly just bookkeeping. I added handling of width, length, area, and perimeter of the gate. Doing the same for the source and drain is straightforward enough. There is the one quirk that magic has, though, that is that it does not track what area and perimeter belongs to which device; it just counts the total area and perimeter of the node, which might be connected to multiple devices. Then the first device output gets all of the area and perimeter, and the remaining ones get zero. If all you're doing with those numbers is counting capacitance, then that's fine. I'm not sure it works entirely correctly with bsim models, especially fingered devices. There is an option to divide the area and perimeter equally among all devices connected to a node, but that's only really correct if all the devices on the same node are the same size.
✔️ 1
👍 1
When it tracks the total area and perimeter of the node, do you mean the total area/perimeter of the diffusion? If so, I can't (yet) think of a reason why that would not be ok, if that whole diffusion is entirely enclosed by the same well/substrate, so that the other end of the parasitic elements is the same node regardless of which fet the area and perimeter are assigned to. If the area and perimeter are only tracked for a given node even when the node includes multiple different source/drain diffusions that are not contiguous, then I would worry that the fets might be in different wells, and so assigning all of the area/perimeter-related parasitics to one device might make the other ends of the parasitic capacitors all end up on one well, which could be somewhat wrong, if for example the only some of the wells are driven with a signal or allowed to float via a high value resistor, and the others are not. If these parameters also affect the IV curve of the source/drain to bulk diodes then I'd expect more weirdness if the other ends of the parasitic diodes really should all be on the same well but are not modelled as such.
@Chris Jones: The area and perimeter are tracked separately for separate planes, but generally speaking, you're right; the total diffusion area and perimeter will be used, and that would include stretching to different wells; in fact, this is a challenge for the full parasitic extraction because the net gets broken up. I think maybe a more sophisticated accounting of source/drain area is needed in magic.