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

Update frame definition and acquisition counter definition #57

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions source/hw-spec/controller/channels/data_frames.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ The frame format is:

::

uint32 Device_Address
uint64 Common_Timestamp
uint32 Sample_Size
var Sample
uint32 dev_addr
uint64 acqclk_cnt
uint32 sample_sz
var sample

Where

- ``Device_Address``: The address of the device producing the data, as featured
- ``dev_addr``: Device Address. The address of the device producing the data, as featured
on the :ref:`device table <dev-table>`.
- ``Common_Timestamp``: A counter common to all devices generated by the
- ``acqclk_cnt``: Acquisition counter. A counter common to all devices generated by the
controller common acquisition clock. On write frames, this field is ignored.
- ``Sample_Size``: The full size of the sample, and must be equal to the
``Read_Sample_Size`` field of the :ref:`device descriptor <dev-desc>` on read
frames or a multiple of the ``Write_Sample_Size`` on write frames.
- ``Sample``: The complete data sample as described on the :ref:`device sample
- ``sample_sz``: Sample Size. The full size of the sample, and must be equal to the
``rd_samp_size`` field of the :ref:`device descriptor <dev-desc>` on read
frames or a multiple of the ``wr_samp_size`` on write frames.
- ``sample``: The complete data sample as described on the :ref:`device sample
format <dev-sample>` section.

While a read frame must always contain a single sample as generated by the devices,
Expand Down
25 changes: 21 additions & 4 deletions source/hw-spec/controller/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,26 @@ Controller
==========
The :term:`controller`'s purpose is to interface an ONI hardware system with the host
computer. It aggregates and routes device data and provides transparent access
to all devices, independently of their physical location. The host also
contains a common clock that is used to timestamp data from all devices,
independently of their origin hub.
to all devices, independently of their physical location.

.. _acq_clk:

Acquisition Counter
---------------------

The controller MUST have access to a high resolution clock. The tick count from this
clock is used to synchronize data from all devices independently of their origin hub.
The controller MUST capture the counter value when receiving a :ref:`sample<dev-sample>`
and use that value for the ``acqclk_cnt`` field of the corresponding :ref:`frame<frame>`.

.. note:: The controller adds the acquisition counter when it receives the samples
and proceeds to create the associated frame. However, due to hub to controller
jonnew marked this conversation as resolved.
Show resolved Hide resolved
transmission delays, this time may have an offset from sample creation time.
To account for this, hubs contain a register indicating the measured
transmission delay. Users can use this value to more precisely synchronize
samples between hubs.
jonnew marked this conversation as resolved.
Show resolved Hide resolved

.. todo:: update note admonition to links after the register map is updated
aacuevas marked this conversation as resolved.
Show resolved Hide resolved

.. _controller_params:

Expand All @@ -32,7 +49,7 @@ Communication

.. toctree::
:maxdepth: 1

channels/index
addresses
register_interface