Skip to content

iss: Add conditional exit of cosimulation based on instruction address and memory writes#705

Merged
Jozott00 merged 5 commits intomasterfrom
feat/cosim-exit-flags
Mar 1, 2026
Merged

iss: Add conditional exit of cosimulation based on instruction address and memory writes#705
Jozott00 merged 5 commits intomasterfrom
feat/cosim-exit-flags

Conversation

@Giftzwerg02
Copy link
Contributor

This PR adds new configuration options to tell the Co-Simulation broker to stop Co-Simulation before the clients finished executing. It is now possible to exit if a certain address is reached or if a memory write at some address (and some written value) occurred. These addresses / values can either be constant values or symbols based on the input file.

For example, if you want to exit on the label cosim_exit (assume that this label has a fixed location of 0x12345678), given some assembly:

_start:
    insn1...
    insn2...
    insn3...
cosim_exit:
    insn4...
    insn5...

Either set the following flag when executing the broker:

  • --exit-on-exec "cosim_exit" (by label/symbol name)
  • --exit-on-exec "0x12345678" (by hex value)
  • --exit-on-exec "305419896" (by decimal value)

Or through the config file under [testing.exit_condition]:

  • on_address = 0x12345678
  • on_address = 305419896
  • on_label = "cosim_exit" (setting on_label overrides on_address)

Checking memory writes is still WIP ( @Jozott00 )

@Giftzwerg02 Giftzwerg02 self-assigned this Feb 9, 2026
@github-actions github-actions bot added the enhancement New feature or request label Feb 9, 2026
@Giftzwerg02 Giftzwerg02 requested a review from Jozott00 February 9, 2026 00:13
Copy link
Contributor

@Jozott00 Jozott00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! I think once the exit on write with value is implemented, we can merge this.

@Giftzwerg02 Giftzwerg02 force-pushed the feat/cosim-exit-flags branch from fad149b to b381a7a Compare February 26, 2026 12:06
@Giftzwerg02 Giftzwerg02 marked this pull request as ready for review February 26, 2026 12:06
@Giftzwerg02 Giftzwerg02 requested a review from Jozott00 February 26, 2026 12:06
@Giftzwerg02 Giftzwerg02 force-pushed the feat/cosim-exit-flags branch from 9e4f460 to 793f6ac Compare February 27, 2026 17:59
@Giftzwerg02 Giftzwerg02 force-pushed the feat/cosim-exit-flags branch from 793f6ac to ad93158 Compare March 1, 2026 16:55
@Jozott00 Jozott00 enabled auto-merge March 1, 2026 16:58
@Jozott00 Jozott00 disabled auto-merge March 1, 2026 18:23
@Jozott00 Jozott00 merged commit a4edbb5 into master Mar 1, 2026
7 checks passed
@Jozott00 Jozott00 deleted the feat/cosim-exit-flags branch March 1, 2026 18:23
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.

2 participants