Skip to content

Add ramp-based static INL/DNL analysis#51

Merged
Arcadia-1 merged 3 commits into
Arcadia-1:mainfrom
chenzc24:codex/issue-49-ramp-inl
Jun 23, 2026
Merged

Add ramp-based static INL/DNL analysis#51
Arcadia-1 merged 3 commits into
Arcadia-1:mainfrom
chenzc24:codex/issue-49-ramp-inl

Conversation

@chenzc24

@chenzc24 chenzc24 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add ramp-code histogram helpers for static DNL/INL analysis
  • expose analyze_inl_from_ramp and compute_inl_from_ramp through the public API
  • add a debug example plus user-guide docs for ramp-vs-sine assumptions and endpoint baselines
  • cover ideal ramps, missing codes, injected DNL, endpoint handling, validation, plotting, and guide snippets

INL/DNL convention

  • DNL is reported per output-code width in result['code']
  • INL is reported per transition level in result['transition_code'], so len(result['inl']) == len(result['dnl']) + 1
  • raw transition INL satisfies result['raw_inl'] == [0, cumsum(result['dnl'])], matching the standard relation INL[k] = sum(DNL[:k])
  • ramp INL defaults to endpoint='endpoints', so the endpoint-INL curve starts and ends at zero
  • endpoint='fit' remains available for best-fit INL, and endpoint='none' remains available for raw transition INL

Tests

  • uv run --with pytest pytest tests/unit/aout/test_inl_from_ramp.py -q
  • uv run --with pytest pytest tests/integration/test_user_guide_skill_examples.py -q
  • uv run --with pytest pytest tests/unit/aout -q
  • uv run --with pytest pytest tests/unit/test_skill_cli.py -q
  • uv run python src/adctoolbox/examples/04_debug_analog/exp_a33_inl_from_ramp.py
  • git diff --check

Closes #49
Closes #50

@Arcadia-1 Arcadia-1 merged commit 279fd89 into Arcadia-1:main Jun 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add example for ramp-based static INL/DNL analysis Add ramp-based static INL/DNL analysis for ADC simulations

2 participants