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

More accurate clock system #137

Merged
merged 1 commit into from
Feb 22, 2024
Merged

More accurate clock system #137

merged 1 commit into from
Feb 22, 2024

Conversation

urish
Copy link
Contributor

@urish urish commented Dec 16, 2023

The simulator clock was previously tied to the host system time. This causes inconsistency across simulation sessions, and also meant that the internal timer accuracy was low, as the timer resolution was limited by the host OS scheduling.

This changes the simulator clock to run independently from the system clock, and increases the internal clock resolution from microseconds to nanosecond.

It also introduces a new Simulator class, which manages the execution of the simulated core (previously, this functionality has been part of the RP2040 class).

@urish urish added the enhancement New feature or request label Dec 16, 2023
@urish urish self-assigned this Dec 16, 2023
@urish urish force-pushed the accurate-clock branch 4 times, most recently from cd07920 to 6b981e8 Compare February 22, 2024 18:43
The simulator clock was previously tied to the host system time. This causes inconsistency across simulation sessions, and also meant that the internal timer accuracy was low, as the timer resolution was limited by the host OS scheduling.

This changes the simulator clock to run independently from the system clock, and increases the internal clock resolution from microseconds to nanosecond.

It also introduces a new `Simulator` class, which manages the execution of the simulated core (previously, this functionality has been part of the `RP2040` class).
@urish urish marked this pull request as ready for review February 22, 2024 19:58
@urish urish merged commit 02bc892 into main Feb 22, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant