Skip to content

Fix logic capture duration cap on arm64#1

Open
edsai wants to merge 1 commit into
ZiWei09:feat/macos-native-windowfrom
edsai:fix-arm64-sample-duration
Open

Fix logic capture duration cap on arm64#1
edsai wants to merge 1 commit into
ZiWei09:feat/macos-native-windowfrom
edsai:fix-arm64-sample-duration

Conversation

@edsai
Copy link
Copy Markdown

@edsai edsai commented May 28, 2026

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.

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.
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.

1 participant