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

Clarify high-bandwidth stream data alignment requirements #3

Open
jonnew opened this issue Jan 2, 2024 · 0 comments
Open

Clarify high-bandwidth stream data alignment requirements #3

jonnew opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jonnew
Copy link
Contributor

jonnew commented Jan 2, 2024

This proposed specification enhancement stems from open-ephys/liboni#16. After an internal discussion, we are proposing the following enhancements to the spec to balance performance, implementability, and separation of API responsibilities from hardware.

  • Currently, high-bandwidth read and write streams are specified to be 32-bits wide. This limits the future utility of the hardware spec. Really, any byte multiple bus width should be supported.
  • Data alignment should ultimately be the responsibility of the hardware. The API should be able to use information about read and write sizes provided in the device table to read data from the hardware, or some buffer gathered from hardware, without having to pad its reads to fall on some boundary (e.g. the 32-bit boundary that is currently required).
  • The following verbiage is a starting point for the specification changes to make this happen:

The hardware must:

  1. have the ability to inform the API what the width its will use will be. We the space below is a good place to discuss how this should occur and what it will mean to the spec
  2. Ensure that device read and write sizes, as reported in the device table and without modification by the API, fall on natural boundaries of the width specified in (1). This ensures the API does not have to do padding on top of the reported read and write sizes in order to prevent data corruption. A corollary of this requirement is that, since devices can report data read and write sizes at byte resolution, the read and write sizes that appear on a device datasheet should not be considered lower bounds that can be rounded to fit the read and write stream bus width. However, this will be transparently presented in the device table which will contain the real read and write sizes of each device, including the padding required to meet the data boundary requirements.

The API must:

  1. Use the read and write boundary information reported by the hardware to modify requested block read and write sizes to fall on these boundaries. Again, this modification will be made transparent as the real block read and write sizes will be reported via oni_get_opt().
@jonnew jonnew added the enhancement New feature or request label Jan 2, 2024
jonnew added a commit to open-ephys/liboni that referenced this issue Jan 2, 2024
- The proposed specification changes that will remove this required
alignment step in oni_read_frame are here
open-ephys/ONI#3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant