Skip to content

Test coverage: runtime simulation verification #59

Description

@robtaylor

Summary

The integration tests primarily verify compilation and OSDI descriptor generation, but runtime behavior testing is limited.

Current State

Only 2 runtime tests in openvaf/openvaf/tests/integration.rs:

  • test_limit() - Tests $limit function with mock simulation
  • test_noise() - Tests noise functions with mock simulation

These tests use a mock simulation framework (mock_sim.rs) but coverage is minimal.

Missing Runtime Coverage

Jacobian correctness

  • Verify Jacobian entries match analytical derivatives
  • Test Jacobian symmetry where expected
  • Test Jacobian sparsity patterns

Residual correctness

  • Compare residuals against analytical expressions
  • Test residual continuity across operating regions

Operating point variables

  • Verify $opvar values are correctly computed
  • Test operating point variable access via OSDI

Temperature handling

  • Test temperature-dependent model behavior
  • Verify $temperature and $vt usage

Limiting functions

  • Comprehensive $limit testing beyond basic diode
  • Test custom limit functions

Convergence aids

  • $bound_step effectiveness
  • Limiting function impact on convergence

Multi-instance

  • Multiple instances with different parameters
  • Instance isolation verification

Suggested Action

  1. Expand mock simulation framework
  2. Add runtime tests for each major compact model category
  3. Compare results against reference implementations where available
  4. Add numerical accuracy tests for Jacobian computation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions