discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] About Top_block


From: Mir M. Ali
Subject: Re: [Discuss-gnuradio] About Top_block
Date: Wed, 17 Jun 2009 00:29:58 -0500

Hi,

The simplest examples that you can look at to understand about gnuradio can be found at this website.
http://www.joshknows.com/gnuradio

Think of gnuradio as a system of blocks that perform unique functions. Each of these blocks will either behave as a sink or a source. Your job is to find which of these blocks do the work for you. Once you identify these blocks you must connect them to so as to make the output of one block be the input of the next hierarchical block.

We no longer use hier_block. If you look at the new examples its called top_block. It's the same thing but with a new name. hier_block or top_block means the overall system that you are building which makes use of other blocks inside of it.

As a beginner you need not understand how the connect and run do things for you. When you call "connect" think of it as telling a block to pass its output to the next block in hierarchy as its input. And calling "run" as telling your implemented system to start doing its work. Just assume that whatever they do is perfectly done and all you need to worry about is how can you implement your system with the blocks that you already have in gnuradio or you may implement your own blocks in C++. To learn how to make blocks look at the tutorial in your gnuradio installation. Its found in "gnuradio/gr-howto-write-a-block" directory.

Take a look at the examples in /usr/local/share/gnuradio/examples directory. I started with examples in "audio" directory and "digital" directory. Understanding of benchmark_tx and benchmark_rx in digital directory according to me is of prime importance.

I say it again. Don't worry about how python knows about connect and run. Trying to know this will take you a lot of time. Begin with understanding what Gnuradio actually accomplishes. Once, you get the feel of this you can spend time understanding how the scheduler and other intricate stuff works. 

Take a look at documentation about USRP. Understanding of things that happen in a usrp is essential too.
http://rapidshare.com/files/121692530/USRP_Documentation.pdf

This is what I did as a beginnner and it took me a lot of time to understand gnuradio. Even though I don't understand it as good as others on this list do but still I am comfortable working with it. Even to this date I didn't spend time on understanding how run/connect work as I never felt it was necessary to do so. I believe in "Why reinvent the wheel?" philosophy and I am happy with it.

Good Luck
Ali


On Tue, Jun 16, 2009 at 4:51 AM, Chun-Ta Kung <address@hidden> wrote:
Hello,
I am new to gnuradio, and I felt confused with "glue the blocks", such as hier_block2. 
I have read gnu tutorial by Mr. Shen and I understood there were multiple attributes to describe a block, such as endpoint and edge.
But when I tried to analyze an example of code, there was no such block of code to elaborate on them. I cannot understand how python knows how to connect between two blocks. 
Which signal plays as input or output to connect between them? And am I able to use only line-by-line code to replace partial usage of glue( top_block.connect(block1,block2)) ?

p.s I thought this should be  a preliminary question. There must be something seriously wrong with my concept. Please correct it if you don't mind spending some time typing. 

Thank you all



_______________________________________________
Discuss-gnuradio mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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