What happens at runtime in Pothos.

104 views
Skip to first unread message

Sneezy

unread,
Sep 22, 2018, 10:34:28 AM9/22/18
to Pothos Users
Hello,

I'm quite new to the Pothos project and this is also a first time for me working with data-flow framework.
I'm currently trying to find information on the underlying mecasnism when someone click on activate topology.
I've found out that in the GNURadio companion framework, once a certain topology is activated, GNURadio converts the topology blocks into a Python script which is then run.

I'm having difficulties finding information about what happens in Pothos once you click on activate topology.
I have some experience programming a ucontroller using Keil for example. When building an application for a ucontroller, you make a code you compile it then you upload it into the memory of the chip. Once this is done the ucontroller reads every instruction in an orderly fashion and execute your application.

I would like to understand what Pothos does with a topology X in this sense. My understanding is that at runtime, Pothos creates a link between the SDR and a computer and then sends commands to be executed by the SDR via Soapy.
Now as you can see I am quite confused about this. I was wondering if you people could enlighten me or point me to good sources of information.

Let's say I want to make a standalone application with a certain SDR hardware, would using Pothos be the appropriate platform to develop this?

Thank you

Josh Blum

unread,
Sep 23, 2018, 11:47:08 AM9/23/18
to pothos...@googlegroups.com



On 09/22/2018 09:34 AM, Sneezy wrote:
Hello,

I'm quite new to the Pothos project and this is also a first time for me working with data-flow framework.
I'm currently trying to find information on the underlying mecasnism when someone click on activate topology.
I've found out that in the GNURadio companion framework, once a certain topology is activated, GNURadio converts the topology blocks into a Python script which is then run.

I'm having difficulties finding information about what happens in Pothos once you click on activate topology.
I have some experience programming a ucontroller using Keil for example. When building an application for a ucontroller, you make a code you compile it then you upload it into the memory of the chip. Once this is done the ucontroller reads every instruction in an orderly fashion and execute your application.


In terms of how Pothos works, its basically very similar to GNU Radio. Blocks are instantiated, and connected into a topology which manages the flow of data and the execution of blocks at runtime. The main difference here is the GUI. GNU Radio companion generates the python code which builds the topology. PothosFlow directly builds the topology without the code generation. Users have requested I add code generation as well, and its something I would like to do, but having the time to do so is also a factor :-)

Here are some useful wiki pages about the scheduler and the API:

* https://github.com/pothosware/PothosCore/wiki/SchedulerExplained
* https://github.com/pothosware/PothosCore/wiki/BlocksCodingGuide



I would like to understand what Pothos does with a topology X in this sense. My understanding is that at runtime, Pothos creates a link between the SDR and a computer and then sends commands to be executed by the SDR via Soapy.
Now as you can see I am quite confused about this. I was wondering if you people could enlighten me or point me to good sources of information.

The SDR support usually comes through PothosSoapy source/sink blocks which calls into the SoapySDR API to handle SDR configuration and streaming:
https://github.com/pothosware/PothosSoapy/wiki/Tutorial

But SoapySDR isnt the only option. A user can create any custom source/sink block the desire. And there are also open source projects like PothosAudio, PothosIIO, and gr-pothos which should allow for SDR access through other libraries besides SoapySDR.

* https://github.com/pothosware/PothosAudio/wiki
* https://github.com/pothosware/PothosIIO/wiki
* https://github.com/pothosware/gr-pothos/wiki

In addition, gnuradio applications can use SoapySDR supported devices through gr-uhd and gr-osmosdr which also wrap the SoapySDR API



Let's say I want to make a standalone application with a certain SDR hardware, would using Pothos be the appropriate platform to develop this?

Well, you have a few options. You can build applications in the GUI, you saw the C++ API in the BlocksCodingGuide, and its also possible to build topologies and instantiate blocks in python: https://github.com/pothosware/PothosPython/wiki

Also I should mention that you can make applications directly with SoapySDR API in C, C++, or python too. That is, if you dont need the scheduler or processing blocks aspect of things.

Hope that helps, let me know if I need to clarify something!

-josh


Thank you
--
You received this message because you are subscribed to the Google Groups "Pothos Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pothos-users...@googlegroups.com.
To post to this group, send email to pothos...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pothos-users/11dd7e05-1502-4849-875a-4a76ccd36946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages