All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonah Petri <jonah@sense.com>
To: Pavel Roskin <plroskin@gmail.com>
Cc: linux-iio@vger.kernel.org
Subject: Re: Raw data block input: is IIO a good choice?
Date: Fri, 7 Apr 2017 20:20:36 -0400	[thread overview]
Message-ID: <23293209-00F9-4D1E-8822-00B3B267EF79@sense.com> (raw)
In-Reply-To: <CAN_72e1apsS2nKh7SYiETz+=bJW7mEBS6GV8DmzZEPzroaeACg@mail.gmail.com>

Hi Pavel,

I=E2=80=99m fairly new to IIO, but I am working on a somewhat similar =
project.  One important question is how you are intending to transport =
your data from the FPGA to your CPU?  Do you have a DMA engine of some =
kind, with a linux driver?  Or perhaps a wire protocol, such as SPI or =
I2C?  What=E2=80=99s your realtime requirements?  That is, if your data =
rate is 12.5k/sec, so how much buffer space do you have on the hardware? =
 Typically you would aim to drain the hardware when it is 50% full, so =
that would give you an idea of how frequently you=E2=80=99d need to =
service your hardware buffer.

Stock Linux isn=E2=80=99t going to be your friend if your realtime =
requirements are tight.  Don=E2=80=99t rely on interrupt latencies less =
than 10s of milliseconds, or even more on busy systems.

Jonah


> On Apr 7, 2017, at 5:48 PM, Pavel Roskin <plroskin@gmail.com> wrote:
>=20
> Hello,
>=20
> I'm writing a driver for an FPGA device that collects information from
> several sensors. The data is collected every 20 milliseconds (i.e. 50
> times a second). The data is a 256 byte block that is put to a ring
> buffer in the hardware. The software should read the data quickly to
> avoid it being overwritten in the ring buffer. It is very important
> not to lose any data; previous values are just as important as the
> current ones. No parsing needs to be done in the kernel; the userspace
> will take care of it.
>=20
> Is IIO a good choice for such device? I see that the existing IIO
> drivers are careful to describe all data they collect. I'm not going
> to do that in the kernel (OK, maybe later to allow other utilities to
> get the parsed data, but it can be done in userspace too).
>=20
> I would really appreciate is somebody could point me to a driver that
> implements similar functionality.
>=20
> --=20
> Regards,
> Pavel Roskin
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" =
in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2017-04-08  0:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 21:48 Raw data block input: is IIO a good choice? Pavel Roskin
2017-04-08  0:20 ` Jonah Petri [this message]
2017-04-08  1:47   ` Pavel Roskin
2017-04-08  3:10     ` Jonah Petri
2017-04-08  6:13       ` Pavel Roskin
2017-04-08 14:36         ` Jonathan Cameron
2017-04-11 21:01           ` Pavel Roskin
2017-04-12  0:05             ` Pavel Roskin
2017-04-12 14:36               ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23293209-00F9-4D1E-8822-00B3B267EF79@sense.com \
    --to=jonah@sense.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=plroskin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.