Open file with X/Y offset value

edited January 2010 in General
Hi Matthias,

Is it possible to add a function to open a file with X/Y offset value?

Sometimes we hope to overlap more than one file in same panel to check the difference and not always these files were on the same X/Y base.

Best Regards,
--
chi-hsiang-hung

Comments

  • edited January 2010

    Hi,

    it is possible to adjust the way how the layouts are drawn. This provides a way to adjust the location of one layout vs. another without having to modify the geometrical data.

    This is the recipe:

    • Load the two layouts into the same panel.
    • In the layer list, choose "Regroup layer views", "By Layout Index" from the context menu (right mouse button).
      In effect, you have two groups of layers: one for the first layout (@1) and one for the second (@2). Both groups are shown as individual trees in the layer list. You can expand the groups by clicking at the "+" Symbol and work as usual with the layers.
    • Select on the root entry (the one with the "+" Symbol) of the layout you want to shift (i.e. "@1").
    • Choose "Select Source" from the layout list's context menu. A dialog will appear with a text: "*/*@1". This basically says that
      the group will show any layer from layout 1.
    • In this edit box, in addition to the layer filter, you can specify a lot more, in our case a displacement.
      Add the shift vector in the form (x,y) to this text, i.e. "*/*@1 (1000,5000)" will show the first layout shifted by 1000 micron to the right and 5000 micron upwards. The transformation specification can include a rotation, i.e. "*/*@1 (r90 1000,5000)" which will rotate the first layout 90 degree counterclockwise before shifting it.
    • Hit "Ok".

    The source specification is actually much more powerful. A description of this feature can be found here. For example, it is possible to specify that a layout is drawn multiple times. This allows to simulate stitching of blocks without having to create a top cell with multiple instances.

    Best regards,

    Matthias

  • edited 12:48AM
    Hi Matthias,

    The "Select Source" is good for coordinate offset, it really fits our requirement,
    however I am not able to understand the function of the "*/*", does it mean the
    source of "layer/type" ? I tried to modified the "*/*" to "1/0"(one layer) and
    nothing happened.

    Best Regards,
    --
    chi-hsiang-hung
  • edited February 2010

    Hi,

    I think this need some explanation.

    When you have a hierarchy of layer specs, you can think of a tree with branches and leafs.
    The leafs are the layers which are shown on the canvas. The path leading from the root node of the tree to the leaf
    determine how the layer is shown. For this, KLayout "sums up" the properties along the path from the root to the leaf.

    Along this path, it collects colors, fill pattern, visibility, transformations (which you have been using) and specifications
    about the source of the layer (layer, datatype, layout file index) and others. For each properties, certain rules apply how
    the properties are "summed up". For transformation, all transformations along the path are accumulated. For visibility, one
    node in the path must be visible to have the layer visible. Basically this is similar how CSS computes the effective style of
    an element.

    The layer spec (layer or datatype) is "summed up" by taking the most specific one along the path. Specs closer to the leaf override
    specs further up in the path. In your particular example, the layer specs along the path sum up this way:

    "*/*@1" + "1/0@*" => "1/0@1"
    

    If you just change the spec of the root node, you won't see an effect since the lower level spec wins.

    Layer hierarchies are a very powerful feature and if fully understood can be employed in manyfold ways to organize layers
    such that special views on a layout are created. A brief explanation of the feature can be found here.

    Hopefully this is helpful.

    Best regards,

    Matthias

Sign In or Register to comment.