Support for VIARULE LEF/DEF Constructs

Hello,

I am encountering an issue with imported LEF/DEF files that use VIARULE statements. The LEF contains the following VIARULE:

VIARULE Via1Array-0 GENERATE
  LAYER metal1 ;
    ENCLOSURE 0.035 0.035 ;
  LAYER metal2 ;
    ENCLOSURE 0.035 0.035 ;
  LAYER via1 ;
    RECT -0.035 -0.035 0.035 0.035 ;
    SPACING 0.15 BY 0.15 ;
END Via1Array-0

The DEF contains the following VIA:

VIAS 6 ;
- via1_960x340
+ VIARULE Via1Array-0
  + CUTSIZE 140 140
  + LAYERS metal1 metal2 via1
  + CUTSPACING 160 160
  + ENCLOSURE 110 100 110 100
  + ROWCOL 1 3
;

And the VIA is used in the following section (other vias omitted for brevity):

SPECIALNETS 2 ;
- VDD ( * VDD )
ROUTED metal1 0 + SHAPE STRIPE ( 24140 95200 ) via1_960x340
+ USE POWER ;

When importing this LEF/DEF into KLayout, it unexpectedly creates a single via which is the same size as the metal:

However when I load the LEF/DEF in a commercial tool, it produces the expected via array:

Is this the expected behavior?

KLayout version: 0.26.3
OS: CentOS 6

Comments

  • edited March 2020

    Hi,

    thanks for providing this information. Of course, the behaviour should be to deliver the desired layout.

    However, I need some more information. VIARULE statements are supported in KLayout only inside a VIA definition (or VIAS in DEF). So can you provide a complete (reduced) sample, which indicates how VIARULE is used?

    From the specification I see that a VIARULE outside VIA is to automatically generate a VIA when two routine layers overlap. My understanding however was that this rule is executed by the P&R tool when generating the DEF file, not while reading it. My reasoning is that DEF was hardly a well-defined layout format if the reader first had to analyze the layout in fairly complex ways before it could decide where to generate vias.

    So right now, I'm ignoring the VIARULE from the LEF.

    But still in your case, the VIARULE from the DEF should be read. I'll check this.

    Matthias

  • edited March 2020

    I think you sample isn't quite correct. Here is the one I think shows the problem:

    VERSION 5.6 ;
    NAMESCASESENSITIVE ON ;
    DIVIDERCHAR "/" ;
    BUSBITCHARS "<>" ;
    DESIGN SMALL ;
    UNITS DISTANCE MICRONS 100 ;
    
    DIEAREA ( -30 -30 ) ( 1030 1030 ) ;
    
    VIAS 1 ;
    - via1_960x340
    + VIARULE Via1Array-0
      + CUTSIZE 140 140
      + LAYERS metal1 via1 metal2 
      + CUTSPACING 160 160
      + ENCLOSURE 110 100 110 100
      + ROWCOL 1 3
    ;
    END VIAS
    
    SPECIALNETS 1 ;
    - VDD ( * VDD )
    + ROUTED metal1 0 + SHAPE STRIPE ( 500 500 ) via1_960x340
    + USE POWER ;
    END SPECIALNETS
    
    END DESIGN
    

    Please note the "+" before "ROUTED" and via1 which is put between metal1 and metal2 in the LAYERS statement.

    The actual issue is that VIARULE's are only implemented with PATTERN currently. I have created a ticket for this: https://github.com/KLayout/klayout/issues/517

    Matthias

  • Hi Matthias,

    Yes, you are correct. My DEF had many statements in them and I tried to trim it down to just one example, but I dropped the '+' that was needed.

    I see that this fix made it into the 0.26.4 release. I have run a few different tests using the release and they all come out correct. Thanks!

    Best,
    Austin

  • Hi Austin,

    very good! Thanks for letting me know.

    Regards,

    Matthias

Sign In or Register to comment.