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

ipc: Handle failing RTL simulations #97

Merged
merged 1 commit into from
Feb 22, 2024
Merged

ipc: Handle failing RTL simulations #97

merged 1 commit into from
Feb 22, 2024

Conversation

colluca
Copy link
Collaborator

@colluca colluca commented Feb 15, 2024

Bug diagnosis

If the SnitchSim instance is waiting on a read() from the pipe to the simulation, and the RTL simulation terminates prematurely (e.g. due to a fatal assertion failure), the SnitchSim instance would block on the read() and any verification script based on it would not terminate.

Fix

When the simulation subprocess is spawned, a separate thread is created to monitor it. If the simulation terminates prematurely, the monitor will notice and send a SIGINT signal to interrupt the read(). The signal is handled by the main thread which will stop the simulation monitor, communicate the cause of the failure and gracefully terminate the verification script.

@colluca colluca merged commit 4b3f76e into main Feb 22, 2024
27 checks passed
@colluca colluca deleted the fix/ipc branch February 22, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants