Skip to content

No metal1 layers at top of via stack are produced when instantiating either pfet or nfet #29

@jreeve-nl

Description

@jreeve-nl

Describe the bug

When comparing with the output of driving kayout with that of manually adding PCells for either plain vanilla pfet or nfet, there is no metal1 drawing at the top of via stacks. There is, however, outline drawn on layer COMP.

Compared to the manually created PCell based nfet and pfet, we have no metal1 drawing present above the via stacks. It appears this happens because some change to gf180mcu.cells.via_generator.via_stack means that a base_layer function argument is expected where compared to the PCell klayout code (I'm not sure if I'm describing this correctly) this layer is drawn on instead of metal1 by default. It's difficult for me to work out the intention of this base_layer argument as it seems reasonable to draw on metal1 when metal_level >= 1.

To Reproduce

import gdsfactory as gf

import gf180mcu # The new package name (previously gf180)

from gf180mcu import LAYER, PDK 

if __name__ == "__main__":
    
    PDK.activate()
    c = gf.Component()
    nfet_lv_m6 = c << gf180mcu.cells.nfet()

    gdspath = c.write_gds()
    gf.show(gdspath)

Expected behavior
metal1 drawn as part of the via stack

Suggested fix
In order to fix this I have made changes that draw on both base_layer and metal1 which for most via_stack instantiations from the fet and pfet, base_layer is COMP.

Environment (please complete the following information):

  • [O ] I have reviewed the documentation, discussions and issues and found no relevant solution.
  • [ O] I understand that this is an open-source project, and maintainers may not have the resources to address every issue. I am prepared to contribute by fixing the issue myself or hiring someone to do so, if needed, and accept that the issue may not be resolved otherwise.
  • [ O] I am using the latest version of GDSFactory, with Python 3.11, 3.12, or 3.13.

Please provide the output for the following code:

import sys
print(sys.version)
print(sys.executable)

import gdsfactory as gf
gf.config.print_version_plugins()
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions