PySpice-based BSIM4 dataset generation and multi-stage calibration workflow for 42 W/L device targets.
.
├── src/ # Core modules: simulation, optimization, plotting, targets, paths
├── scripts/ # Preferred executable entry points
├── data/targets/ # Input target CSV files
├── artifacts/ # Runtime-generated outputs, ignored by git
├── tests/ # Unit and smoke tests
├── docs/ # Specs and implementation plans
├── bsim4_dataset.py # Backward-compatible wrapper for dataset generation
└── run_calibration.py # Backward-compatible wrapper for calibration
Run dataset generation:
MPLCONFIGDIR=/tmp/mplconfig conda run -n spice python scripts/generate_bsim4_dataset.pyRun calibration:
MPLCONFIGDIR=/tmp/mplconfig conda run --no-capture-output -n spice python scripts/run_calibration.pyRun all tests:
MPLCONFIGDIR=/tmp/mplconfig conda run -n spice python -m unittest discover -s tests -v- Default target CSV:
data/targets/virtual_mosfet_metrics_perturbed_5pct.csv - Calibration outputs:
artifacts/calibration_output/ - Dataset outputs:
artifacts/dataset_generation/
- Core path defaults are centralized in
src/project_paths.py. - CLI entry points are centralized in
src/cli.py. - The current calibration pipeline is stable and tested, but the current best worst-case relative error is still about
5.1%, so the<3%target has not yet been reached.