Skip to content
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

Ols read metadata in little endian #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dgatf
Copy link

@dgatf dgatf commented Oct 9, 2023

Ols devices are little endian. 32 bit integers for metadata values must be read in little endian (as the samples)
If metadata is read in big endian, values for maximum rate and maximum samples are incorrect

@kwtaylor
Copy link
Contributor

kwtaylor commented Nov 19, 2023

I don't think this is true? From the OLS verilog core:

https://github.com/magnuskarlsson/ols_verilog_3.07/blob/e9c5de2271f6c555e1f9c58da65c4c3da4a6224c/meta.v#L75-L76

For example, it sends the metadata sequence 21 00 00 60 00 for sample memory of 24K, or 0x6000, and 23 0B EB C2 00 for 200MHz sample rate, or 0x0BEBC200 -- So it's clearly big-endian.

Other SUMP-compatible devices (Bus Pirate, etc) seem to follow this as well. There is a problem in sigrok properly populating the valid sample rates from a generic SUMP device, I have created a pull request for that issue here #230

@fenugrec
Copy link
Contributor

It seems strange that this would suddenly be wrong for all OLS devices ?

Submitter will need to add details on what tests show this to be broken.

@Sonic-Amiga
Copy link
Contributor

Hello! Which metadata exactly is wrong ?
I am using arduino analyzer with OLS driver. I do experience some other problems, but metadata seems to be read correctly. At least number of channels is valid, so are supported scan rates, given by pulseview.

@Sonic-Amiga
Copy link
Contributor

BTW, since you also have an OLS-compatible device, can you help me to verify #232 ? I assume that you don't experience "invalid unit size" when saving. What is your device, how many channels does it support ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants