linux-automation / lxa-iobus

Linux Automation IOBus server
https://lxa-iobus.readthedocs.io/en/latest/
Apache License 2.0
3 stars 4 forks source link

Add support for the LXA Optick latency measurement util #39

Closed hnez closed 5 months ago

hnez commented 5 months ago

The LXA Optick board is an utility for measuring latencies, that supports both measuring the latencies involved in realtime Linux and microcontroller applications (on the order of nanoseconds), as well as light source -> camera -> computer -> display -> light sensor round trip latencies.

(Hence the name, Op-Tick, like being something visual but also clock like, you know ... a play on words ... nevermind).

The Optick board comes with support hardware for these optical latency measurements.

The board has two event-generating output ports and two event-capturing input ports, that capture and generate events relative to a local 64 bit counter running at 48MHz. The counters from different Optick devices can be synchronized using the PPS output of a GPS module, to support e.g. time sensitive networking latency measurements over some distance.

The inputs are analog and feature an on-board comparator that compares the input voltage to a software configurable reference voltage to form a basic input trigger.

This commit also contains a commandline utility that implements the basic optick usecase of measuring a glass to glass camera / display latency, by first determining the correct trigger level, generating and capturing events and lastly generating a histogram of measured latencies.

TODO before merging:

SmithChart commented 5 months ago

38 has been merged. Please rebase.

hnez commented 5 months ago

Great to see that we are coming along with merging the PRs so nicely!

I've rebased this PR on top of recent master, but have also converted it to a draft PR, since it should not be merged before we have a released version of the Optick Firmware to include in the firmware folder.

I've created #40, which breaks out the first two commits of this PR so we are not held back too much by the firmware blob.

hnez commented 5 months ago

Alright, we now have an Optick firmware image and are ready for review! 🎉

hnez commented 5 months ago

I think we are ready to merge this. @SmithChart will you do the honors?