Copying of pcell content issues

Noticed unexpected behavior when copying cells containing PCells. In the worst case, some layout content (structures and layers) is missing after the copy operation.

The test file is a GDS containing a top cell and several sub-cells, including both standard cells and PCells. The maximum hierarchy depth is 3.

Test Cases

1) Using Cell Copy into a New Layout

  • Right-click on a cell -> Copy -> Deep Copy
  • Create a new layout
  • Paste the copied cell into the new layout

=> PCell content is not copied.

2) Using Cell Copy within the Current Layout

  • Right-click on a cell -> Copy -> Deep Copy
  • Paste the copied cell

=> Newly added standard cells receive a "$1" suffix.
=> Newly added PCells are not copied. They do not receive the "$1" suffix and remain referenced to the source cells.

3) Selecting All Shapes

  • Draw a selection box around the layout while KLayout is in "Select Mode"
  • Press [CTRL]+C (Copy) or [CTRL]+X (Cut, all shapes disappear)
  • Create a new layout
  • Press [CTRL]+V (Paste) in the new layout

=> PCell content is not copied.

Observations

  • Flattening the layout preserves the PCell content (although the resulting cell is, of course, flattened).
  • KLayout 0.26.x does not show this behavior. All three test cases work as expected in that version. The results were verified using an external XOR tool.
  • Newer KLayout versions provide the option:
    File -> Setup -> Application -> Selection -> "PCell content is selectable"
    (disabled by default).

  • When this option is enabled, it becomes possible to select and copy PCell geometry as described in Test Case 3.

  • However, the procedure described in Test Case 1 still does not copy the PCell content.

Has anyone observed the same behavior?
Is this a known bug?

Sign In or Register to comment.