π BSIM4_ANALYZER_DC
Links
| Language | GitHub Pages π | GitHub π» |
|---|---|---|
| πΊπΈ English |
Automated DC Analysis Tool for BSIM4 MOSFET Models (VgβId / VdβId)
This tool was originally developed for semiconductor device engineering education,
but is also designed with future commercial MOSFET parameter analysis applications in mind.
The system currently supports 130nm CMOS (NMOS/PMOS).
The folder results/90nm/ is intentionally empty and reserved for future feature expansion.
Extending the current 130nm analysis flow to 90nm is straightforward.
π Features
- β Automated analysis pipeline: BSIM4 MOS model Γ ngspice Γ Python
- β DC characteristics for NMOS/PMOS (130nm): VgβId (VGID) / VdβId (VDID)
- β Automatic extraction of key parameters: Vth, gmmax, Idlin, Idsat
- β Auto-generated log/lin PNG plots
- β Suitable for education, compact modeling research, and commercial analysis tools
- β Easily extendable to 90nm using template duplication
π Directory Structure
BSIM4_ANALYZER_DC/
βββ models/
β βββ nmos130.sp
β βββ pmos130.sp
β
βββ templates/
β βββ template_vgid.cir
β βββ template_vdid.cir
β
βββ run/
β βββ run_vgid.py
β βββ run_vdid.py
β
βββ plot/
β βββ plot_vgid.py
β βββ plot_vdid.py
β
βββ results/
β βββ 130nm/
β β βββ vgid/
β β βββ vdid/
β βββ 90nm/ # β Reserved for future expansion
β
βββ bsim4.out
βββ README.md
π Usage
β Requirements
- Python 3.10+
- ngspice
- Required Python packages:
numpy matplotlib pandas (optional)
β Running Simulations
β VgβId (VGID)
python run/run_vgid.py
β VdβId (VDID)
python run/run_vdid.py
β Generating Plots
β VgβId
python plot/plot_vgid.py
β VdβId
python plot/plot_vdid.py
π Output Files (with extracted parameters)
The tool processes raw ngspice .dat files and automatically extracts
important DC parameters, saving them as CSV files.
β VGID Parameter Extraction (VgβId)
| Parameter | Description | Method |
|---|---|---|
| Vth (gmmax method) | Threshold voltage | Vg at gm maximum |
| gmmax | Maximum transconductance | max(dId/dVg) |
CSV example:
device,corner,Vth_gmmax,gmmax
nmos,HT,0.478,0.00123
pmos,RT,-0.512,0.00101
β VDID Parameter Extraction (VdβId)
| Parameter | Description | Method |
|---|---|---|
| Idlin | Linear-region Id | Low-Vd current (e.g., 50 mV) |
| Idsat | Saturation-region Id | High-Vd current (β Vdd) |
CSV example:
device,corner,Idlin,Idsat
nmos,LT,1.23e-5,2.88e-4
pmos,RT,-9.88e-6,-2.42e-4
π¦ Output File Types
.csvβ extracted parameters.datβ raw ngspice numeric output.pngβ plots (linear & log scale).cirβ executed circuit input file.logβ ngspice log
Example:
130nm_nmos_vgid_HT.csv
130nm_nmos_vgid_log.png
130nm_pmos_vdid_LT.csv
130nm_pmos_vgid_lin.png
π§© Parameter Extraction Algorithms
β Vth (gmmax method)
- Load IdβVg curve
- Compute gm = dId/dVg
- Identify Vg where gm is maximum β Vth
- Record gmmax
β Idlin / Idsat
- Idlin = Id at low Vd (linear region)
- Idsat = Id at high Vd (saturation region)
(Vd conditions defined intemplate_vdid.cir)
π§ 90nm Node (Future Extension)
results/90nm/ is reserved for expansion.
To add 90nm support, simply:
- Add 90nm models under
models/ - Duplicate cir templates and rename
- Modify run scripts for the new node
The structure is intentionally built for future commercial scalability.
π Example Plots Generated by BSIM4_ANALYZER_DC
The following figures are automatically produced by the
BSIM4 DC Analyzer (VgβId / VdβId) for 130nm NMOS/PMOS devices.
They demonstrate the toolβs ability to generate device characteristics
across temperature corners (LT / RT / HT).
βΆ NMOS β VgβId (VGID, Linear Region)
Shows the gate-voltage sweep (IdβVg) under linear Vd bias for NMOS,
revealing threshold voltage and mobility temperature dependence.

βΆ NMOS β VdβId (VDID)
Illustrates output characteristics (IdβVd) at fixed Vgs,
showing linear-to-saturation transition.

βΆ PMOS β VgβId (VGID, Linear Region)
The PMOS transfer curve, plotted with SPICE polarity,
showing temperature effects on |Vth| and hole mobility.

βΆ PMOS β VdβId (VDID)
PMOS output characteristics (IdβVd), SPICE-polarity plotted.
Useful for extracting Idlin/Idsat and channel-length modulation trends.

These plots serve as reference examples for BSIM4 parameter exploration,
educational MOSFET modeling exercises, and future integration into
commercial MOSFET analysis tools.
π Hybrid License
This repository adopts a Hybrid License model:
| Item | License | Description |
|---|---|---|
| Source Code | MIT License | Free to use, modify, and redistribute |
| Documentation / Text Materials | CC BY 4.0 | Attribution required |
| Figures / Plots / Generated Images | CC BY-NC 4.0 | Non-commercial use only |
| External References | Original license applies | Cite properly |
π To-Do / Future Development
- Official support for 90nm
- Additional extraction metrics (ΞΌeff, Ξ», ro, Vdsat, gm/Id, etc.)
- Temperature sweep support
- GUI edition (lecture / commercial use)
- Multi-process comparison tool
- BSIM parameter fitting engine
π€ Author
| π Item | Details |
|---|---|
| Name | Shinichi Samizo |
| GitHub |