Repository navigation
Renode boards in lockstep with the engine (opt-in) - #789
Merged
Merged
Conversation
A13xB0
force-pushed
the
feat-774-renode-lockstep
branch
from
October 30, 2026 17:00
9c67194 to
a6f8f90
Compare
With MESHBENCH_RENODE_LOCKSTEP=1 a clock entry in the machine's virtual time ticks the chip each millisecond and holds the CPU until the engine grants the next one; idle time is skipped and Renode's random numbers are seeded from the node. Two idle runs of two RAK_4631 repeaters gave identical event logs. Console input still reaches the UART on the wall clock, so emulated runs stay reported as not reproducible. For #774.
…ard with no engine still runs
A13xB0
force-pushed
the
feat-774-renode-lockstep
branch
from
October 30, 2026 17:43
a6f8f90 to
43d9205
Compare
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.
For #774. Stacked on #788; retarget to main once that merges.
With
MESHBENCH_RENODE_LOCKSTEP=1, an nRF52 board under Renode stops running free on the host clock:Advanceonly grants time and waits for the CPU to reach it.emulation SetAdvanceImmediately true, so idle time is skipped rather than waited out.emulation SetSeed, derived from the node, because the nRF52 RNG peripheral (MeshCore's jitter source) otherwise draws a fresh stream every run.This needs no change to the Renode fork, only our peripheral and script.
Measured. Two RAK_4631 repeaters, adverts placed with
at_ms:irq_reads/busy_readsper node.Why it stays opt-in, and
sim.statestill says not reproducible. Console input reaches Renode's UART over a socket on the wall clock. So boot provisioning andconsole.typeland wherever the machine is. A run with all 12 cores busy diverged for exactly that reason; the console port did not even open in time. Lockstep also costs about 5× real time for two boards here.Remaining on #774:
-icount, plus a hold in the fork's SX1262 device.NotReproducible, with the idle-versus-loaded check.