Skip to content

83 add golden waveform testing ala ibis 80#85

Open
capn-freako wants to merge 9 commits into
masterfrom
83-add-golden-waveform-testing-ala-ibis-80
Open

83 add golden waveform testing ala ibis 80#85
capn-freako wants to merge 9 commits into
masterfrom
83-add-golden-waveform-testing-ala-ibis-80

Conversation

@capn-freako

Copy link
Copy Markdown
Owner

Hi David,

This seems a little to easy to believe.
So, would you mind checking it from an unbiased perspective?

I just used Claude Code to implement the change needed for the new Issue #83
It appears to have worked, but I'm skeptical.
(Check the sub-issue #84 for the prompts I used.)
Can you believe this?!

Thanks,
-db

capn-freako and others added 2 commits June 7, 2026 18:15
Implements section 10.11 of the IBIS 8.0 spec, which lets model makers
embed golden input/output data directly in .ibs files so any EDA tool
can verify a model produces its intended output.

- ibis/parser.py: new `ami_tc_param`, `ami_test_config`, and `algo_model`
  parsers; `[Algorithmic Model]` now returns {"executables": [...],
  "test_configs": {...}} instead of a bare executor list
- ibis/model.py: unpack the new dict, expose `test_configs` and
  `executables` properties on `Model`
- testing/ami_test_config.py: `run_ami_test_config()` / `run_all_ami_test_configs()`
  load the referenced files, call AMI_Init (and AMI_GetWave for
  Time_domain), and compare against the golden IR / waveform /
  params_out with configurable tolerances
- tests/: parser fixture + 2 parser tests; 12 runner tests covering
  Statistical pass/fail, Time_domain pass/fail, optional golden IR,
  missing config, and the run_all convenience wrapper

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  2. review test_runs/example_rx/example_rx/pyami_test_def_channel_type_sweep.py to understand how test definitions are written
  3. read section 10.11 of local/ver8_0.pdf to understand the new test we need to add
  4. try ver8_0_sec_10_11.txt
  5. yes, start with the parser extension
  6. continue, but use 'uv run' as a prefix for all Bash commands
  7. now write the test runner
  8. now write a test for the test runner
@capn-freako capn-freako linked an issue Jun 7, 2026 that may be closed by this pull request
@capn-freako capn-freako requested a review from jdpatt June 7, 2026 22:47
@capn-freako

Copy link
Copy Markdown
Owner Author

Hey David,

Checkout the recently auto-generated (by Claude) CLAUDE.md file.

-db

@capn-freako capn-freako left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only red flags I see in Claude's work are a couple places where it's been unnecessarily redundant, failing to make use of functionality already in the library.
And that shouldn't be too hard to clean up.

Given the time it saved me, I think we should give agentic coding a try for a while.
What say the rest of you?

Note: Upon further review, there was actually just one place where Claude had repeated existing code. And it was quite minor and not its fault. (The definition it repeated was buried inside a function, not defined at the top level.)

Comment thread src/pyibisami/testing/ami_test_config.py
Comment thread src/pyibisami/ibis/parser.py Outdated
capn-freako and others added 2 commits June 9, 2026 09:21
Exposes the IBIS 8.0 §10.11 test runner as a first-class command-line
tool so model developers can verify golden data directly from the shell
or CI without writing Python.

- ami_test_config.py: add `main()` Click entry point; parses the .ibs
  file, selects the target model (auto or via -m), and runs all configs
  (or one via -c) with configurable IR/waveform tolerances; exits 1 on
  any failure
- pyproject.toml: register `check-ami` script entry point
- CLAUDE.md: note the new CLI entry point

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@capn-freako

Copy link
Copy Markdown
Owner Author

Commit 49cf729 was written by Claude in response to the following prompt:

❯ Add a new command to the project for invoking this new test on a model.

@capn-freako capn-freako left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Waiting on @jdpatt to review.

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 Golden Waveform Testing ala IBIS 8.0

1 participant