Public

Thread: Hmm, _might_ have found a bug in the LVS

7 Discord messages from πŸ“ - Designing/πŸ“-project-template/threads/hmm-might-have-found-a-bug-in-the-lvs.md.

Category: πŸ“ - Designing Parent channel: #πŸ“-project-template Thread ID: 1503418680451792966

Messages: 7

message-1503449602022703346

2026-05-11T17:31:57.865+00:00 β€” Leo Moser (mole99) (@mole99)

Reply/reference

<details> <summary>Reference data</summary>
{
  "channelId": "1423348662318272592",
  "guildId": "1361349522684510449",
  "messageId": "1503418680451792966"
}
</details>

Content

<details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {
    "mentions": [
      {
        "avatarUrl": "2026-05_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
        "color": null,
        "discriminator": "0000",
        "id": "384390069412429834",
        "isBot": false,
        "name": "polyfractal",
        "nickname": "BreakingTaps",
        "roles": []
      }
    ]
  }
}
</details>

message-1503449617964994681

2026-05-11T17:32:01.666+00:00 β€” Leo Moser (mole99) (@mole99)

Content

Thanks for the report!

Yes, it really seems `diode_connections.lvs` is the only place where `nwell` is used for the connection to the devices.
Everywhere else, i.e. `moscap_extraction.lvs/mos_extraction.lvs/mos_sab_extraction.lvs/res_extraction.lvs`, `nwell_con` is used.

If you take a look at `general_derivations.lvs` you can see that `nwell_con` is defined as:

```
nwell_con       = nwell.not(res_mk)
```
I think this is so that nwell resistors are correctly extracted. They are extracted as:

```
# NWELL
logger.info('Extracting NWELL device')
extract_devices(resistor_with_bulk('nwell', 1000, BResistor), { 'R' => nwell_res, 'C' => nwell_con, 'W' => sub })
```

You can find a description about the extractor here: https://www.klayout.de/doc/manual/lvs_device_extractors.html

Taking a look at the connectivity setup in `general_connections.lvs`, only `nwell_con` is connected to `ntap`:

```
# Inter-layer
connect(lvpwell_con, ptap)
connect(lvpwell_con, ptap_dw)
connect(dnwell, ntap_dw)
connect(nwell_con, ntap)
connect(ptap, contact)
...
```

That's the reason why you get anonymous pins with just `nwell`.

Long story short, I agree that `nwell_con` should be used :)
<details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
</details>

message-1503449680325902488

2026-05-11T17:32:16.534+00:00 β€” Leo Moser (mole99) (@mole99)

Content

If you would like to be credited, you can open a PR in the upstream repo: https://github.com/fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv
Otherwise, I will do it for you.
<details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {}
}
</details>

message-1503449828607397948

2026-05-11T17:32:51.887+00:00 β€” Leo Moser (mole99) (@mole99)

Content

You might want to use the LVS setup in this directory anyway, as @Clyde Laforge has made some important improvements around substrate cuts recently.

We are working on creating a new open_pdks PDK, which will allow us to switch from the current wafer.space PDK fork. However, this probably won't happen until next week, as I'll be at Hackaday Europe this weekend :)
<details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {
    "mentions": [
      {
        "avatarUrl": "2026-05_media/e9fd582c6cd4273d01cbf5dfd4bb3455-27807.png",
        "color": null,
        "discriminator": "0000",
        "id": "1401841055975870476",
        "isBot": false,
        "name": "scafir",
        "nickname": "Clyde Laforge",
        "roles": []
      }
    ]
  }
}
</details>

message-1503452466698522664

2026-05-11T17:43:20.857+00:00 β€” BreakingTaps (@polyfractal)

Content

Awesome, thanks for taking a look @Leo Moser (mole99)! No credit needed, probably easier/faster for you to make the fix than for me to cobble together a PR πŸ™‚

Will take a look at that LVS setup for my own experiments! and goodluck/have fun at hackaday conf πŸ™‚
<details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
    "discriminator": "0000",
    "isBot": false
  },
  "message": {
    "inlineEmojis": [
      {
        "code": "slight_smile",
        "id": "",
        "imageUrl": "2026-05_media/1f642-83E8A.svg",
        "isAnimated": false,
        "name": "πŸ™‚"
      }
    ],
    "mentions": [
      {
        "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
        "color": null,
        "discriminator": "0000",
        "id": "323371864074485771",
        "isBot": false,
        "name": "mole99",
        "nickname": "Leo Moser (mole99)",
        "roles": [
          {
            "color": null,
            "id": "1423020172595298314",
            "name": "Mod",
            "position": 4
          }
        ]
      }
    ]
  }
}
</details>

message-1503456962321322015

2026-05-11T18:01:12.697+00:00 β€” Leo Moser (mole99) (@mole99)

Content

PR is up: https://github.com/fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv/pull/20

Great, and thank you! πŸ˜ƒ

Embeds

<details> <summary>Embeds data</summary>
[
  {
    "color": "#1E2327",
    "description": "Discovered thanks to a report by Zachary.\ndiode_nw2ps_* used the wrong layer for the bulk connection. general_connections.lvs uses nwell_con to connect to ntap.",
    "fields": [],
    "images": [],
    "inlineEmojis": [],
    "timestamp": null,
    "title": "fix: diode_nw2ps_* connect to nwell_con by mole99 Β· Pull Request #...",
    "url": "https://github.com/fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv/pull/20"
  }
]
</details>

Reactions

<details> <summary>Reactions data</summary>
[
  {
    "count": 1,
    "emoji": {
      "code": "heart",
      "id": "",
      "imageUrl": "2026-05_media/2764-A3D25.svg",
      "isAnimated": false,
      "name": "❀️"
    },
    "users": [
      {
        "avatarUrl": "2026-05_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
        "color": null,
        "discriminator": "0000",
        "id": "384390069412429834",
        "isBot": false,
        "name": "polyfractal",
        "nickname": "BreakingTaps"
      }
    ]
  }
]
</details><details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
    "discriminator": "0000",
    "isBot": false,
    "roles": [
      {
        "color": null,
        "id": "1423020172595298314",
        "name": "Mod",
        "position": 4
      }
    ]
  },
  "message": {
    "inlineEmojis": [
      {
        "code": "smiley",
        "id": "",
        "imageUrl": "2026-05_media/1f603-5E531.svg",
        "isAnimated": false,
        "name": "πŸ˜ƒ"
      }
    ]
  }
}
</details>

message-1503461422171164772

2026-05-11T18:18:56.008+00:00 β€” BreakingTaps (@polyfractal)

Content

woo!

Reactions

<details> <summary>Reactions data</summary>
[
  {
    "count": 1,
    "emoji": {
      "code": "raised_hands",
      "id": "",
      "imageUrl": "2026-05_media/1f64c-7C820.svg",
      "isAnimated": false,
      "name": "πŸ™Œ"
    },
    "users": [
      {
        "avatarUrl": "2026-05_media/3c7c17f3225f6e56f4dccd83f14383f2-73F83.png",
        "color": null,
        "discriminator": "0000",
        "id": "323371864074485771",
        "isBot": false,
        "name": "mole99",
        "nickname": "Leo Moser (mole99)"
      }
    ]
  }
]
</details><details> <summary>Other message metadata</summary>
{
  "author": {
    "avatarUrl": "2026-05_media/8d8c1d8b8ad51d6cdb1a47512c39b297-42908.png",
    "discriminator": "0000",
    "isBot": false
  },
  "message": {}
}
</details>