PMOS channel-length modulation has the wrong sign: (1 + lambda*V_DS) with V_DS ≤ 0
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Start in src/Electrical/Analog/mosfets.jl: the PMOS channel-length modulation terms are on lines 160 and 162, and the NMOS form at lines 76-77 is the reference to match. Add a test that compares PMOS against a mirrored NMOS at nonzero lambda, then fix the sign in both PMOS branches. Also correct the PMOS docstring on line 90, which says N-type. Done when the mirrored comparison passes at lambda = 1/25.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🤖 Automated issue from an AI agent — not written or reviewed by @ChrisRackauckas.
PMOS in src/Electrical/Analog/mosfets.jl (lines 160 and 162 on main) applies channel-length modulation as (1 + lambda * V_DS). For a PMOS in conduction V_DS ≤ 0, so the factor is below 1 and the drain current falls as |V_DS| grows. The Sedra/Smith model cited in the docstring uses (1 + λ|v_DS|), as NMOS does (lines 76-77, where V_DS ≥ 0).
Consequence: the "PMOS with all node voltages negated carries the negated NMOS current" property from #521 holds at lambda = 0 but fails at the default lambda = 1/25. Checked by an independent reviewer on a grid of 8820 (vd, vg, vs) points with the leakage-sign fix from https://github.com/SciML/ModelingToolkitStandardLibrary.jl/pull/522 applied: mismatches at 4488 points; first mismatch (vd, vg, vs) = (-5, -5, -3), PMOS -0.0223 vs mirrored NMOS -0.0227.
Proposed fix: use (1 - lambda * V_DS) (equivalently 1 + lambda * |V_DS|) in both the triode and saturation branches of PMOS, with a test comparing PMOS against mirrored NMOS at nonzero lambda. This changes simulation results for every PMOS with lambda ≠ 0, so it needs a release note.
Also out of date: the PMOS docstring says "Creates an N-type MOSFET transistor" (line 90).
Split out of #521; https://github.com/SciML/ModelingToolkitStandardLibrary.jl/pull/522 fixes only the leakage sign.
🤖 Filed by an AI agent — harness: Claude Code, model: claude-opus-5-5[1m]. Session: https://claude.ai/code/session_01NdFVhANTF4nepTbqYxjfRP
- Lingua principale
- Julia
- Stelle
- 173
- Fork
- 52
- Merge medio
- 10h 9m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SciML/ModelingToolkitStandardLibrary.jl
-
EddyCurrent: rho, l and A have no effect, R = rho*l/A is evaluated once at constructionForse già presa @ChrisRackauckas-Claude l’ha presa 29 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
SciML/ModelingToolkitStandardLibrary.jl#529 · 1 commento ·
-
Hydraulic gas_pressure omits the reference-density offset, breaking roundtrips and the pressure joinForse già presa @jitendravjh l’ha presa 39 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
SciML/ModelingToolkitStandardLibrary.jl#518 · 1 commento ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 28/100
-
NPN/PNP: emission coefficients NF/NR are used in the diffusion capacitances but not in the transport currentsForse già presa @ChrisRackauckas-Claude l’ha presa 32 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
SciML/ModelingToolkitStandardLibrary.jl#527 · 2 commenti ·
Tutte le issue di SciML/ModelingToolkitStandardLibrary.jl
Issue simili
-
documentation priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
epiforecasts/BVDOutbreakSize#1260 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
TuringLang/Turing.jl#2917 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100