Subkernels calling subkernels on other destinations, subkernel DDMA, with bidirectional DRTIO routing #2291
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.
ARTIQ Pull Request
Description of Changes
This PR is a part of few, which will be built on top of each other:
At the moment, subkernels cannot call other subkernels in other destinations, for simplicity. In general, that required adding possibility of bidirectional DRTIO routing, supporting more than typical 'master asks, satellite responds' communication scheme. Subkernels can ask for launching another subkernel at any time in any place, and we would prefer to not to involve the master if possible - only for re-routing if there's no path from the current satellite node downstream to the destination.
Thus, few DRTIO related packets were modified to also include information on the source, and they're routable - a satellite receiving an unsolicited packet, instead of discarding it, may now need to re-route or consume it, depending if the satellite was the intended target. Subkernels and DDMA also now know who called them, so they can return their work to the proper source.
As unsolicited/asynchronous aux packets are generally unstable (#2213), routed or asynchronous packets are not sent without notice. Satellites notify the master or higher ranking satellite that they have some packets with a small packet in the main protocol,
async_messages_ready
(see gateware changes). The master or higher ranking satellite, upon noticing a flag, will query the downstream device for whatever data it may have. That data can be consumed or re-routed, depending on the destination.DMA on subkernels is an extension of DDMA. Subkernels themselves have no access to DMA gateware and as such, DDMA is always used, and playback is started by the main (satman/comm) core. Subkernels also have no DRTIO meaning they cannot manipulate RTIO devices on other satellites, so a DMA trace is broken down like it would've been in master, and appropriate slices are carved out and sent to other satellites if necessary, to be played back later.
Tested with 3 Kasli 2.0s, in both star ( sat1 <- master -> sat2 ) and daisychain ( master -> sat1 -> sat2 ) and subkernel experiments below:
Subkernel code
test_subkernel_multdest_sat
:test_subkernel_multdest_mst.py
:(D)DMA has been tested with
test_ddma_subkernel_mult.py
:Summary of changes:
Related Issue
Type of Changes
Steps (Choose relevant, delete irrelevant before submitting)
All Pull Requests
Code Changes
Git Logistics
git rebase --interactive
). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.git show
). Format:Licensing
See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.