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

[arcilator] Add clock divider integration test #7705

Open
wants to merge 1 commit into
base: fschuiki/arc-remove-clock-trees
Choose a base branch
from

Conversation

fabianschuiki
Copy link
Contributor

Add a test to check that arcilator can simulate a simple clock divider. This exercises a corner case of arcilator's simulation model scheduling, where a state updating its value can trigger other states and module outptus to update their values. In this case, a cascade of clock edges is generated by feeding one state's output into the clock input of the next state.

@fabianschuiki fabianschuiki added the Arc Involving the `arc` dialect label Oct 14, 2024
@fabianschuiki fabianschuiki force-pushed the fschuiki/arc-remove-legalization branch from 1427a02 to 57b6019 Compare October 14, 2024 17:07
@fabianschuiki fabianschuiki force-pushed the fschuiki/arc-remove-clock-trees branch 2 times, most recently from 2c1bc29 to 7da872c Compare October 14, 2024 17:40
@fabianschuiki fabianschuiki force-pushed the fschuiki/arc-remove-legalization branch from 57b6019 to 9d3e32a Compare October 14, 2024 17:40
Copy link
Contributor

@fzi-hielscher fzi-hielscher left a comment

Choose a reason for hiding this comment

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

This needs #7703 to work correctly, doesn't it?

Independently of that, it is currently blasting through the C calling conventions, giving me this output locally:

0 0 2191024128 1808528296
0 0 2191024128 1808528296
0 0 2191024128 1808528296
[...]

The changes below should fix that.

integration_test/arcilator/JIT/clock-divider.mlir Outdated Show resolved Hide resolved
integration_test/arcilator/JIT/clock-divider.mlir Outdated Show resolved Hide resolved
@fabianschuiki
Copy link
Contributor Author

Uh oh, damn calling conventions 🙈. Thanks for the fixes @fzi-hielscher 🥳.

Copy link
Member

@uenoku uenoku left a comment

Choose a reason for hiding this comment

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

Cool, it's impressive that ClockDiv just works!

Copy link
Member

@maerhart maerhart left a comment

Choose a reason for hiding this comment

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

Really nice that this just works!

integration_test/arcilator/JIT/clock-divider.mlir Outdated Show resolved Hide resolved
Add a test to check that arcilator can simulate a simple clock divider.
This exercises a corner case of arcilator's simulation model scheduling,
where a state updating its value can trigger other states and module
outptus to update their values. In this case, a cascade of clock edges
is generated by feeding one state's output into the clock input of the
next state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arc Involving the `arc` dialect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants