Skip to content

Fix FET netlist multiplier calculation bug#49

Merged
msaligane merged 1 commit intoReaLLMASIC:mainfrom
aethernavshulkraven-allain:fix/fet-netlist-multiplier-bug
Sep 9, 2025
Merged

Fix FET netlist multiplier calculation bug#49
msaligane merged 1 commit intoReaLLMASIC:mainfrom
aethernavshulkraven-allain:fix/fet-netlist-multiplier-bug

Conversation

@aethernavshulkraven-allain
Copy link
Copy Markdown
Contributor

Problem

The fet_netlist function in src/glayout/primitives/fet.py contains an incorrect calculation for the transistor multiplier parameter that causes LVS verification failures and incorrect SPICE netlist generation.

Root Cause

Line 109 in fet_netlist function incorrectly divides the multiplier by 2:

'mult': mtop / 2,  # Incorrect

Where mtop = fingers * multipliers

Impact

  • LVS verification fails for single-finger transistors (e.g., width=3, fingers=1)
  • Automated netlist generation produces incorrect SPICE parameters
  • Upper-level design integration broken for certain transistor configurations

Solution

Remove the erroneous division by 2:

'mult': mtop,  # Correct

Verification

Test cases demonstrate the fix:

  • fingers=1, multipliers=1: mult=0.5 (before) → mult=1 (after)
  • fingers=4, multipliers=1: mult=2.0 (before) → mult=4 (after)
  • fingers=2, multipliers=2: mult=2.0 (before) → mult=4 (after)

Files Modified

  • src/glayout/primitives/fet.py: Core multiplier calculation fix
  • FET_MULTIPLIER_FIX.md: Technical documentation of the issue and resolution

This change ensures correct SPICE netlist generation and resolves LVS verification failures in automated design flows.

- Remove incorrect division by 2 in fet_netlist function
- mult parameter now correctly represents fingers * multipliers
- Fixes LVS verification failures for single finger transistors
- Resolves automated netlist generation issues in upper-level designs

Fixes issue where width=3,fingers=1 would generate mult=0.5 instead of mult=1
@msaligane
Copy link
Copy Markdown
Member

msaligane commented Aug 29, 2025

@Subhampal9 @Landflier, can you please review?

Comment thread FET_MULTIPLIER_FIX.md
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is not needed as part of the PR. Description in the github site for the PR is enough.
The only change required is in the actual source code file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked that this is an actual mistake. Thanks for noticing and submitting a PR.

@msaligane msaligane merged commit f0209ba into ReaLLMASIC:main Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants