Skip to content

Amend RFC #36 with a concrete concurrency model #64

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

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

whitequark
Copy link
Member

@whitequark whitequark added the area:core RFC affecting APIs in amaranth-lang/amaranth label Mar 23, 2024
@whitequark
Copy link
Member Author

Notwithstanding that there are no dependencies between any of these items, I have implemented most of the proposed concurrency model in amaranth-lang/amaranth#1231 and confirmed that it made it easier to reason about testbench concurrency.

@whitequark whitequark added the meta:nominated Nominated for discussion on the next relevant meeting label Mar 25, 2024
@whitequark whitequark force-pushed the rfc-36-update branch 2 times, most recently from 6c44415 to 98a8b50 Compare April 8, 2024 16:15
@whitequark
Copy link
Member Author

whitequark commented Apr 8, 2024

Note: I pushed some last-minute changes to until/repeat which were queued but not previously published (sorry about that!). In short, these methods now always advance the timeline. This is because it does not take away any expressive power (a single sim.get before the method doesn't add significant overhead even with an optimized implementation offloading the waiting to C++) but in turn reduces the likelihood of observing a glitch, no matter the context. Also, the stream use case is actually better served by the new API.

It also makes some intuitive sense that sim.tick().until(...) will perform strictly no less ticks than a bare sim.tick(), and seems like it'd be surprising otherwise.

@whitequark whitequark merged commit ecfcd6f into amaranth-lang:main Apr 8, 2024
@whitequark whitequark deleted the rfc-36-update branch April 8, 2024 17:23
@whitequark whitequark removed the meta:nominated Nominated for discussion on the next relevant meeting label Apr 8, 2024
@whitequark
Copy link
Member Author

We have discussed this RFC on the 2024-04-08 core subsystem meeting. The disposition was to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core RFC affecting APIs in amaranth-lang/amaranth
Development

Successfully merging this pull request may close these issues.

2 participants