Repository navigation
fix: clip DRAM coalescing to Simulator.run(until=) horizon - #4
Merged
Merged
Conversation
Coalesced ticks only consulted the next heap event, so an in-flight request could jump sim.now past until, drain dram.pending, and leave the completion callback unfired. Publish the inclusive run horizon and clip tick_until_progress bursts to it. Co-authored-by: chenshih <chenshih1@users.noreply.github.com>
Keep the horizon RuntimeError on one line for ruff. After an in-flight read completes under idle_refresh, idle ticks continue, so do not require sim.now to equal the depart time. Co-authored-by: chenshih <chenshih1@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/des-hotpath-coalesce-cf4c
branch
from
August 27, 2026 12:26
5ffed87 to
230c6bc
Compare
chenshih1
marked this pull request as ready for review
August 27, 2026 12:26
6 tasks done
chenshih1
added a commit
that referenced
this pull request
Aug 27, 2026
Cut 0.5.3 from master after PRs #1–#4: - DRAM empty-cycle coalescing and drive() drain accounting - idle-refresh backoff reset, drive(batch=0) hang, cancel accounting - coalescing clipped to Simulator.run(until=) - Pipe+FIFO+Dram composition example, occupancy, and issue-pipe refill Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: chenshih <chenshih1@users.noreply.github.com>
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
Clip coalesced DRAM ticks to the active
Simulator.run(until=)inclusive horizon so incremental windows cannot jumpsim.nowpast until, dropdram.pendingto 0, and leave the completion unfired.Rebased onto current
master(PR #1 squash8c3fb50+ PR #3 squash56cbafb). Coalescing itself is already on master; this PR keeps only the until-horizon clip.Changes
Simulator.run(until=)publishes an inclusive time horizon while it runs.Dram._max_tick_burstclips coalescedtick_until_progressbursts to that horizon, not only the next heap event._advance_torejects jumps past the active horizon.run()restores the previous horizon.Testing
ruff check pyramulator/ tests/ benchmarks/ examples/passesruff format --check pyramulator/ tests/ benchmarks/ examples/passesmypy pyramulator/passespytestpassespip install -e ".[dev]"from a clean checkout worksChangelog
Has
CHANGELOG.mdbeen updated for user-visible changes? Yes.