Repository navigation
SimulatorAvr runs on past 71.6 minutes - #131
Merged
Merged
Conversation
The end of each stretch of simulated time was taken from simavr's own conversion, which takes the microseconds as a uint32_t: past 4294967 ms it wrapped, the end fell below the cycles already run, and Run() ran none. A run of the page or the control program lasts until Ctrl+C, so the AVR stood still after 71.6 minutes. The cycles are computed in 64 bits now, by a function of SimulatorAvr's own, which SimulatorAvrTest checks past the wrap; it fails with the old arithmetic. GetMillis(), which nothing called, goes.
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.
SimulatorAvrwith--web,--tcpor without--forruns until Ctrl+C. After 71.6 minutes of simulated time it stood still: the panel froze, and the page or the control program got no answers any more. Now it runs on. Nothing changes for a sketch or for the library.The simulated time to run to was converted into cycles through simavr's own helper, which takes the microseconds as a 32-bit number; past 4294967 ms that wrapped, and every stretch after it ended before it began. The cycles are computed in 64 bits now. Found in the review of the chapter Types of OIL item 41, though it is no rule of that chapter.
The simulated time as milliseconds, which nothing asked for, goes with it.
Checked:
simulator/SimulatorAvrTest.*, checks the cycles of a time past the wrap; with the old arithmetic put back it fails, with the fix it passes. It is built wherever simavr is, asSimulatorAvr, which CI installs.make checkpasses, the examples in simavr among it.