11/17/2017 at 18:32 •
Sophi Kravitz : Hi everyone!
Sophi Kravitz : We're trying something different for discussion in today's Hack Chat. Please add your questions/ comments to: https://hackaday.io/event/28018-high-speed-data-acquisition-chat
Sophi Kravitz : morning everyone!
morgan : helloooo
Shulie Tornel : Morning
Miha has joined this room.
kristina panos : Morning!
Kumar, Abhishek : Morning everyone! Checking in.
draufunddran says :Good afternoon.
Lutetium : Hello everybody!
Sophi Kravitz : we'll get started a few minutes after the hour for those on IST, and a few minutes after the half hour for those in PST, CST, EST...
Sophi Kravitz : any other time zones checking in?
MagicWolfi : AST. :)
Sophi Kravitz : where is that?
matt venn : yo, here from (european central time) ECT?
Radomir Dopieralski : WET here
Christoph : 6:30 PM UGT
Sophi Kravitz : hahaha, let's start in 5 minutes
Sophi Kravitz : I visited Nova Scotia recently!
Sophi Kravitz : for Halifax Pop festival
Sophi Kravitz : Let's get started!
Kumar, Abhishek : Hi everyone, I am Abhishek.
Carlo Maragno has joined this room.
halabaloosa has joined this room.
Kumar, Abhishek : My journey into the world of electronics began when I was 7 years old, learnt to program microcontrollers at 12.
Kumar, Abhishek : Since there, it's been a great ride through 8051s, AVRs, STM32s and ... the BeagleBoard.
Kumar, Abhishek : I recently finished my Masters in engineering from the Indian Institute of Technology Kharagpur.
Sophi Kravitz : congrats!
Kumar, Abhishek : Thanks! When I was in my second year, through the Summer of Code with
BeagleBoard.org, BeagleLogic was born.
matt venn : is it any relation to prudaq?
Kumar, Abhishek : yes, I'll come to that in a bit.
Sophi Kravitz : tell us a little about Summer of Code
Kumar, Abhishek : They sponsor students to work on open source software projects across around 200 open source organizations every year and they have been doing this for over 10 years now.
Radomir Dopieralski : You can volunteer to mentor in it if you are not a student too!
Michael Welling : indeed
Kumar, Abhishek : I've been a mentor for the past 3 years now.
Kumar, Abhishek : After I was a student. I also got to attend the GSoC mentor summit in 2015
Kumar, Abhishek : When I also met the Hackaday folks there in SFO, this was just before the first Supercon.
Kumar, Abhishek : In the GSoC Program, you work on a project for 12 weeks. You have to apply first, write a proposal stating what you're gonna do in the next 12 weeks...
Sophi Kravitz : how long is the proposal?
Kumar, Abhishek : and if your project gets selected, you work on it and are assigned mentors from the organization who are available to you for any doubts or resolve any issues that you might encounter in the process.
Kumar, Abhishek : I think I have the proposal I wrote for BeagleLogic. Let me check
Kumar, Abhishek : It was 2-3 pages if I remember correctly
Sophi Kravitz : Just because I am curious :) did they give you an outline or was it totally freeform?
BeagleBoard.org community members)There were a few questions I had to fill up, for example, how beneficial it will be to the community (we had to collect feedback from potential mentors and
What will you do if your mentors are busy and are unable to help you, and you are blocked?
what was your answer?
on that one?
I would look at documentation on my own, and try to figure it out.
^ Best way to go about it.
Or I would look at other tasks that I need to do, and carry on
It may be that there is something else I can accomplish within the time my mentor isn't available.
how are mentors paired up with students?
And did you have such things happen? Like dealing with the PRU input or outputting the data stream?
how do you know the mentors have the correct skillset?
In my case, I was asked to find a mentor from among the community members.
@Soul_Est : Would it also be possible to use the GPU to also process the data acquired from the PRUs? While not as fast as the Cortex-A8, it is a multi-core unit which should allow for the data to be operated on in parallel.Alright...let's talk DAQ. First question is from
(we can return to Summer of Code after all the questions are done)
Interesting question. I haven't played with the GPU on the BeagleBone yet, but the PowerVR SGX530 GPU on the AM335x SoC requires a number of binary blobs to function, and those blobs are not available readily for all kernel versions.
As far as I know. However if the blobs are available for kernel version 4.9 (which BeagleLogic currently runs on) then I would probably look at getting the PowerVR SDK and seeing what can be done with it.
may be possible but certainly not easy
I though so. I much reading to do aside from your code.
I unfortunately have to head back to work. Enjoy the chat everyone!
@Nick : Can you talk a little bit about the DMA interface between the PRUs and the CPU?second question is from
question from Sophi: what is the DMA interface?
DMA stands for "Direct Memory Access". It's basically a way of transferring contents from memory<->peripheral without intervention from the CPU.
Kumar, Abhishek : There's usually specialized hardware for that, called a DMA controller that is a part of the SoC
You tell it the start and end addresses, source and destination and it moves bytes from one place to another.
In my case the PRUs are used as "sort of" or a pseudo-DMA controller
Ok, this infographic:
( I made this just before the hack chat started :) )
There is a circular buffer in the DDR RAM (512MB) that is managed by the BeagleLogic kernel driver.
The buffer is split into chunks of 4MB each, and you can have up to 75-80 such chunks before you run out of memory on the BeagleBone
(you want to run your userspace applications as well, so need some memory for that as well)
The Physical Address of the memory buffers is given to the PRUs to write into.
And at the "start" command, it takes data and writes it into the RAM without intervention from the CPU. After it has written a 4MB chunk, the PRUs signal the ARM core through an interrupt.
The kernel receives it, and makes the buffer available for reading.
For how the two PRUs co-ordinate, there is a blog article I'll point to -
The special thing here is that the PRUs have their own high-speed GPI/GPO interface, PRU1 handles the sampling
PRU0 handles writing those samples to the memory.
once those samples are in memory, it's just a matter of reading it out from a device file "/dev/beaglelogic" .
I had problems getting all the data stored
I found the beaglebone couldn't write the data to a usb stick fast enough and the buffer would overflow
Yeah, that's the sad part at 100MSa/s.
with a logic analyser, we can throw away a lot of data as we're only interested in the changes
but if I wanted to use it for sampling analog data, how could I store it fast enough?
You could probably stream out data using Ethernet, but that tops out at 100Mbps.
Yes I managed that when I was testing, but I was hoping that the bbb would be able to work standalone
The BeagleLogic Standalone device that I designed has Gigabit Ethernet, yet it struggles to stream data through the Gigabit interface at 20MB/s.
sample compression maybe?
I'm working on something that needs 40mb/s and although I actually only need to store samples after a trigger event, I'd love to know how to keep the data for testing/debugging
For that there should be enough CPU time available as well. For logic analysis one could probably use RLE on the PRU firmware but I haven't implemented it so far.
(for sample compression)
For why there's enough CPU time, there's also another issue here - Cache coherency.
*there's not enough CPU time
So the PRUs are writing to the memory and the CPU is not aware of this remember.
Access to the memory happens through a cache on the CPU side, so that it is fast enough.
Thus when the PRUs signal the CPU that there's data available...
It has to flush and rebuild the cache, and that takes a LOT of CPU time.
So at 100MSa/s and 16bits (2 bytes per sample), there isn't enough time left after the cache is flushed and another buffer arrives.
A variant of the BeagleBone that has 1 GB of RAM will give a lot more headroom for storing samples and analyzing data.
I think I have already answered the question... and a lot more.
have you tried beaglelogic on the x15?
Good timing because we're out of time in 5 minutes, although everyone is welcome to stay.
Yes, the kernel driver works on the X15 and is able to sample data.
However I haven't connected the logic inputs to something and tried capturing real world logic data here, it should work once there's an add-on hardware for it.
The BeagleBoard-X15 should be much more comfortable processing data and even streaming it out through the Gigabit interface that is available.
There's also USB3.0 on it, so you can connect an SSD and store data on it. I've found speeds up to 200MB/s with a USB SSD.
@Neris : Wanted to share arduino logic, UNO running @200kHz, Due can do much more given the time/dma. sigrok does not explain the encoding, here is the hint https://hackaday.io/project/26356-ginlogic-arduino-due-uno-ginlab (no likes yet :)This was posted in the comments by
In the plans to utilise 16 pata/atapi lanes on desktops, any help would be appreciated, maybe Linux kernel driver someday, join me, thanks
Did anyone have an idea of how to store data at 40mb/s ?
display it an let the user memorize it ;)
is the beaglebone not up to it
as long it's all zeros no problem
40 MBytes or 40 Mbits?
and for how many seconds?
as long as the storage lasts
I bought a 64GB usb stick
before I realised it was never going to be fast enought ;)
DDR of some kind is probably your only choice, I guess
G'night people! I'm leaving for the day. See you!
get an FPGA dev board that takes DDR RAM and use that as your logic analyser
and the stuff you're doing is rad
I might try a logic analyser on the beaglewire
it only has sdram not ddr though
beaglewire was spawned by another gsoc project that I was the mentor for