[circt-sim] Add missing EventScheduler::peekCurrentRegion and stepDeltaUpTo#71
Merged
thomasnormal merged 1 commit intomainfrom Mar 3, 2026
Merged
Conversation
…taUpTo ProcessScheduler.cpp (added in 827f185) calls peekCurrentRegion() and stepDeltaUpTo() on EventScheduler, but these methods were never declared in EventQueue.h or implemented in EventQueue.cpp, causing build failures. Add: - TimeWheel::peekCurrentRegion(): returns the next non-empty SchedulingRegion in the current delta without advancing the cursor (returns NumRegions if no events remain). - TimeWheel::processDeltaUpTo(limitRegion): processes all regions in the current delta up to and including limitRegion; advances the region cursor and cleans up empty queues. - EventScheduler::peekCurrentRegion(): thin wrapper around TimeWheel. - EventScheduler::stepDeltaUpTo(limitRegion): thin wrapper; updates stats.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProcessScheduler.cpp(introduced in827f1855f) callspeekCurrentRegion()andstepDeltaUpTo()onEventScheduler, but these methods were never declared inEventQueue.hor implemented inEventQueue.cpp, causing build failures.This PR adds the missing declarations and implementations:
TimeWheel::peekCurrentRegion(): Returns the next non-emptySchedulingRegionin the current delta without advancing the cursor. ReturnsNumRegionsif no events remain in the current delta.TimeWheel::processDeltaUpTo(limitRegion): Processes all regions in the current delta up to and includinglimitRegion; advances the region cursor past the limit and cleans up empty queues. Returns the number of events processed.EventScheduler::peekCurrentRegion(): Thin wrapper delegating toTimeWheel.EventScheduler::stepDeltaUpTo(limitRegion): Thin wrapper; updates event and delta-cycle stats.Test plan
check-circt-tools-circt-simlit tests pass🤖 Generated with Claude Code