Add logic to address threading issues with writing from memory access#115
Merged
snideto merged 3 commits intojuergenH87:masterfrom Feb 4, 2026
Merged
Conversation
writing from memoery access
mattculler
reviewed
Jan 29, 2026
| mem_data = self.data_queue.get(block=True, timeout=max_timeout) | ||
| except queue.Empty: | ||
| self.reset_server() | ||
| raise RuntimeError("No data received from DM16 within timeout period") |
Contributor
Author
There was a problem hiding this comment.
I made it say dm16 since that's the message for the data sending part of the transaction. Probably a slight abstraction leak though so I can remove it
There was a problem hiding this comment.
Nah I just wasn't reading closely enough, looking again and it's clearly in the WAIT_FOR_DM16 case.
snideto
approved these changes
Feb 4, 2026
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.
We discovered a pretty nasty bug in the memory access class when it came to responding to write requests. We were never receiving the data to be written even though it was being seen on the bus. Turns out the blocking get in the dm14 sever was blocking the reception of the data. This is because the memory access _listen for dm14 was being called from the receive thread of the bus, but then the notifiy function (which was calling the respond method) was also being called from within the receive thread which then led to that thread getting blocked when we wait for the data. So the patch for that issue was to make a servicer thread that monitors when to call the notify function so that it will be called from a different thread and not block the receive thread.