-
Notifications
You must be signed in to change notification settings - Fork 188
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
DRTIO aux: use full size of aux packet #2404
Conversation
What is the performance impact of doing this? |
Doesn't seem to be significant - I assume that's because the data had to be moved from the cache into RAM anyway, just for some reason it stopped so with the new toolchain. Let's compare few tests that rely on communication: Last
and HITL tests I ran for this code:
Even if I remove the flush from |
Had to update the Cargo.lock for Nix to work with the Rust toolchain update. I can only warn anyone who will have to update it further - it will be painful. Turns out that invalidating the cache in itself is not necessary. I replaced that part with an empty block Additionally, I cut down on |
ARTIQ Pull Request
Description of Changes
By mistake before, I assumed that maximum DRTIO aux packet size was 512 bytes, when in reality the gateware limit was 1k. This is important for large packets sent for subkernels and DDMA - increasing bandwidth by large.
However, while it may seem like a one line change (maybe two or three with necessary thread stack increases), that simple change has hit the limit of the linker, which on RISC-V cannot do branch relaxation (see the related issue for more information).
As replacing the linker was more difficult than I thought, I found that newer Rust nightly produces code that still fits within the branching limits. That in turn required changing the code a bit:
xbuild
was removed in favor ofcargo build -Z build-std=...
, as xbuild's core crates would conflict and cause memory issues. That also had a side effect of shortening recompilation time - software only would take 1 minute on my computer, now it takes less than 20 seconds.llvm_asm!
replaced withasm!
with different syntax,#[unwind(allowed)]
features being replaced withextern "C-unwind"
,NoneError
being removed, so satman subkernel code was slightly refactored,It requires Misoc update for llvm_asm and xbuild -> build changes.
To make sure that there are no further bugs brought by new Rust toolchain, I ran kc705 HITL tests successfully, and tested DDMA and subkernels with two Kaslis 2.0.
Related Issue
Closes #2401
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+.