Fix logic capture duration cap on arm64#1
Open
edsai wants to merge 1 commit into
Open
Conversation
sw_depth was only set for x86_64 and i386, so on arm64 builds it was left uninitialized and the stream and RLE capture duration limits came out wrong, with the max sample time capped around 1 second. Add the arm64 macros to the 64-bit branch so it uses LogicMaxSWDepth64 like the other 64-bit targets.
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.
On arm64 builds the maximum logic capture duration is capped around 1 second, regardless of buffer/stream mode or the RLE setting.
The cause is in SamplingBar::update_sample_count_selector(). sw_depth is only assigned under defined(x86_64) || defined(_M_X64), with a separate branch for i386. On arm64 neither branch matches, so sw_depth is left uninitialized and then used in the stream-mode and RLE duration calculations, which produces a wrong (very small) maximum. The x86_64 build takes the LogicMaxSWDepth64 path and behaves correctly.
This adds aarch64, arm64 and _M_ARM64 to the 64-bit branch so arm64 uses LogicMaxSWDepth64 (16 GiB) like the other 64-bit targets.
Tested on an Apple Silicon build (Qt6) against a DSLogic U3Pro16. After the change the sample-time selector returns to the expected range, roughly 170 seconds at 100 MHz and proportionally more at lower sample rates, in both buffer and stream mode.