discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] GNU Radio principle & library dependencies & executio


From: Marcus Müller
Subject: [Discuss-gnuradio] GNU Radio principle & library dependencies & execution time estimation (was: Re: GNURADIO QUESTIONS)
Date: Mon, 07 Jul 2014 12:36:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hello Simone,
On 07.07.2014 11:46, Simone Ciccia S210664 wrote:
> Goodmorning, 
> I'm a PhD student working with gnuradio in ubuntu.
> The motivation for which I need to write is regarded to how gnuradio treats
> a project flow graph to make it as an application program, I have searched
> over internet and various forum but I have not find nothing.
Ok, so your flow graph is actually "just" blocks connected together.
Most of the "magic" happens in these blocks, which simply are wrappers
for a specific method (general_work) which gets called upon input data
and produces output data. GNU Radio's core job is to keep these blocks
called and ensure that data is in the right place at the right time and
call these blocks.
> Consider that I have a gnuradio flow graph that works fine, and also, I
> have the top_block.py that works fine, when imparting ./top_block.py from
> the terminal.
Ah, so you've actually seen a GNU Radio application in action! Sounds
like you generated a python file from the GNU Radio companion, where
flow graphs are represented in a graphical manner. If you look at
top_block.py you will find a bunch of "connect()" calls, and these match
the connections you drew in GRC. This is how GNU Radio sees the
flowgraph: Constructed from block class instances, their in- and outputs
connected by connect.
Somewhere at the end of the file, you see a "top_block.start()" or
".run()"; this is where GNU Radio takes over and starts calling blocks'
work functions to get the data running through the flow graph.
>
> My questions:
>
> Is "top_block.py" my final application program? ( for example, is the
> executable ".exe" file equivalent in windows ) 
Yes.
> I would use this file as an independent program, running it in an other pc
> where gnuradio is not installed, is it possible? or Have I need some tools
> ( for example, at least python installed ).
Well, when running a GNU Radio program you will need GNU Radio. Under
certain circumstances, you can get away with statically linking all the
used GNU Radio functionality into your executable, but when using
python, this is never the case.
So for all means, GNU Radio is only a library that your program uses;
it's a mighty library. You have to have that library when you want to
run a program. This is like every other library out there, you can't for
example execute a program that uses the QT library to generate graphical
interfaces without having the QT library on the target computer.
That is why windows software usually comes with an installer that
installs a load of application-necessary libraries, that are not
directly part of the software you are using, but are used by it. Under
most linux distributions, library dependencies are handled by package
management, so you just install let's say firefox and your system
installs all the necessary libraries itself.
> Last, Is it possible to estimate the execution time of a specific block in 
> a gnuradio flow graph?
Yes, you can measure it. Have a look at the "performance counters"
subpage on [1].
> If there are documentation that I have missed in the net, please give me
> the reference...
I think the working principle is explained on gnuradio.org in the "what
is GNU Radio and Why do I want it" article among with the beginners'
Tutorials on the "Tutorials" page.
I consider gnuradio.org to be the only /reliable/ source on how GNU
Radio works and for beginners' tutorials, all the other sites will be
outdated quite fast.
> I think for you these are simple questions, but I'm at the beginning and
> gnuradio is a beautiful environment, I will learn!
I hope that it serves your purposes well :)

Happy hacking,
Marcus

[1] http://gnuradio.org/doc/doxygen/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]