kqcircuits.util.count_instances.count_instances_in_cell(cell, pcell_class)[source]

Returns the number of pcell instances of type pcell_class in cell.

The instances are counted from the entire hierarchy below cell, not only direct child instances. Also pcells with type derived from pcell_class are counted.

  • cell – cell from which the instances are counted

  • pcell_class – pcell class of the instances


The number of instances below cell for which isinstance(inst.cell.pcell_declaration(), pcell_class) == True.