# OpenVAF and OSDI OpenVAF compiles Verilog-A compact models into OSDI libraries. Monata keeps model preparation separate from simulation: registry/cache/compiler APIs can prepare explicit `.osdi` paths, and the native ngspice backend loads only the paths passed through `SimTask.osdi_paths`. ```python task = SimTask( circuit=circuit, analysis_spec=ACSpec(start=1, stop=1e9, points=100), output_names=["out"], osdi_paths=["models/bsimcmg.osdi"], ) ``` For each path, Monata emits a `pre_osdi ` command before the ngspice analysis command. Missing files fail before launching ngspice with `metadata["reason"] == "model_missing"`. ## Registry and Cache Use `ModelRegistry` for explicit model asset lookup: ```python from monata.models import ModelRegistry models = ModelRegistry() models.register("mos", "models/bsimcmg.osdi", module_name="bsimcmg") osdi_paths = models.osdi_paths("mos") ``` As a convenience, `ModelRegistry()` can discover existing `.osdi` files from `MONATA_OSDI_PATH` and selected installed-tool locations. For reproducible project workflows, prefer explicit registration or explicit search paths so the resolved model set is not an accident of the local shell environment. Discovered models must still be passed explicitly into `SimTask`. `ModelCompiler` wraps OpenVAF for explicit `.va` to `.osdi` compilation, and `ModelCache` stores content-hash-based outputs. Standard Monata tests use fake or mocked OpenVAF commands; real OpenVAF smoke checks are environment-gated. Still deferred: - implicit `.va` compilation during simulation - automatic PDK technology binding beyond explicit registry/search paths - simulator-specific plugin flows outside ngspice