Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix chiplets bus #1664

Merged
merged 21 commits into from
Feb 20, 2025
Merged

Fix chiplets bus #1664

merged 21 commits into from
Feb 20, 2025

Conversation

plafer
Copy link
Contributor

@plafer plafer commented Feb 12, 2025

Closes: #1545

Our bus is quite hard to debug due to the lack of insight into which request/response were not matched when things go wrong. This PR

  • adds an infrastructure to help output all unmatched requests/responses (in test mode only, without affecting debug/release builds)
  • use this infrastructure to debug miden-base
  • add a failing test in this repo (from the failing tests in miden-base), and fix it
    • this is making sure we're testing an even and odd node_index in the mrupdate and mpverify tests. There were some tests failing in miden-base due to that, but I think it was a bug I introduced in the refactoring (which wasn't caught by our tests).

Some tests in miden-base still fail, but only due to a problem with rcombbase. Since it is going away with #1661, I didn't spend time debugging/fixing it - we should do that with #1661 (if there is still a problem).

Fun fact: with the new BusDebugger, identifying the problems with the bus was very quick 😄

@plafer plafer force-pushed the plafer-1545-fix-chiplets-bus branch from 4612598 to b60b521 Compare February 13, 2025 20:37
@plafer plafer marked this pull request as ready for review February 13, 2025 20:38
Copy link
Collaborator

@Al-Kindi-0 Al-Kindi-0 left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for adding the bus debugger !
Btw, I like the rstest effect on the tests too.

fn source(&self) -> &str;
}

/// Note: we use `Vec` internall instead of a `BTreeMap` as a workaround for field elements not
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo: internally

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! This is a great addition and I really like the concept of bus messages. I left a few comments inline with potential improvement suggestions.

Also, just to double check: does this have any noticeable impact on the performance of the auxiliary trace building step?

@plafer plafer force-pushed the plafer-1545-fix-chiplets-bus branch from 24a7e65 to 9fda218 Compare February 19, 2025 20:20
@plafer plafer requested a review from bobbinth February 19, 2025 22:43
Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks great! Thank you! I left a few small comments inline - but this is basically good to go.

@plafer plafer merged commit 533f5fa into next Feb 20, 2025
9 checks passed
@plafer plafer deleted the plafer-1545-fix-chiplets-bus branch February 20, 2025 14:47
@bobbinth bobbinth mentioned this pull request Feb 20, 2025
2 tasks
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.

3 participants