xPDK GDS Layer - multi layer operations

Multi-layer derived

Derived layer operations are common in chip design to simplify work for designers and make their work more efficient and less error-prone. This holds for both single-layer and multi-layer operations.

The implementations of these operations vary strongly per software so efficiency (cpu, runtime, memory) will be different per software. In general a tool-specific set of operations can be much (> 10x) faster then a generic / converted deck and (optimal) runtime may easily be hours of wallclock-time, see also
DRC.

Multi-layer derived layers look like the single-layer operations, they mainly differ in the amount of layers that are used.
For the input of the operations there are two flavors - the named layers A, B and sometimes C. And the layer list via a list of layer fields. The first option is used if order of layers is relevant, for example in a layerAnotB. Changing the A & B layers will lead to very different results.

The layer-list is suitable in case many layers can be used and ordering is not important. This option like in layerIsCoveredBy do use a list of layers like in the Cover and In fields, which combine like an “or”.

The output of the operation is (for derived layers) stored in the Tgt layer, which can be a gds layer or an applayer.
full file

<!-- some base layser -->
<layer name="layer1">
 <gds_number>0</gds_number> <gds_datatype>0</gds_datatype>
</layer>

<layer name="layer2">
 <gds_number>1</gds_number> <gds_datatype>0</gds_datatype>
</layer>

<layer name="layer3">
 <gds_number>2</gds_number> <gds_datatype>0</gds_datatype>
</layer>

<layer name="layer4">
 <gds_number>4</gds_number> <gds_datatype>0</gds_datatype>

  <layerAnotB A="layer1" B="layer3"/>

  <layerOr><layer>layer1</layer><layer>layer3</layer></layerOr>

  <layerAnd A="layer1" B="layer3"/>

  <layerXor A="layer1" B="layer3"/>
</layer>

<layer name="layerA0">
 <gds_number>0</gds_number> <gds_datatype>2</gds_datatype>
</layer>

<layer name="layerA1">
 <gds_number>0</gds_number> <gds_datatype>4</gds_datatype>

 <layerOffset>
   <doc>Some combined output</doc>
   <In>
     <layer>layer1</layer> <layer>layer2</layer> <layer>layerA0</layer>
   </In>
   <dist>2.0</dist>
 </layerOffset>

 <layerIsCoveredBy>
   <doc>Some combined output</doc>
   <Cover>
     <layer>layer1</layer> <layer>layer2</layer>
   </Cover>
   <In>
     <layer>layer1</layer> <layer>layer2</layer> <layer>layerA0</layer>
   </In>
   <how>partly_including</how>
 </layerIsCoveredBy>
</layer>

Derived layers (single & multiple) are often needed to be able do define DRC rules more precisely as they tend to have clauses like “if this & that, then the rule is so&so”. This this&that and so&so are both often derived layers.

Multi-layer DRC

That extends these a bit with more layer references and some more values.
full file

<!-- some base layser -->
<layer name="layer1">
 <gds_number>0</gds_number> <gds_datatype>0</gds_datatype>
  <drcNoOverlap drcExclude="layer3">
   <doc>Just a msg</doc>
  </drcNoOverlap>
</layer>

<layer name="layer2">
 <gds_number>1</gds_number> <gds_datatype>0</gds_datatype>
</layer>

<layer name="layer3">
 <gds_number>2</gds_number> <gds_datatype>0</gds_datatype>
</layer>

  <!-- Define multi-layer operations -->
  <drcA_NoOverlap_B rule="1" A="layer1" B="layer3" drcExclude="layer2">
   <msg>triple</msg>
   <doc>Do something more exclusive here?</doc>
  </drcA_NoOverlap_B>

  <drcMinSpacingA_to_B rule="2" A="layer1" B="layer3">
   <msg>Keep some distance</msg>
   <value>5</value>
  </drcMinSpacingA_to_B>

  <drcOverlapOf_A_by_B rule="3" A="layer1" B="layer2">
   <msg>Need some overlap</msg>
   <value unit="um">5</value>
  </drcOverlapOf_A_by_B>

Derived layers

layerOr