Hi John,

There's some python embedded in the GRC xml.
    The <import> block is a python command: 'from gnuradio import analog'
    The <make> block is another python command: 'analog.wfm_rcv(...)' that
uses the analog module that was imported from gnuradio.

That python code can come from two places: native python (hierarchical)
blocks or C++ blocks that have been wrapped in to python by SWIG. In this
case it's a python hierarchical block. Look in
gnuradio/gr-analog/python/analog/ and you'll see 'wfm_rcv.py'

This file is a hierarchical block that connects input
->analog.quadrature_demod_cf -> filter.fir_filter_fff (and audio-rate LPF)
-> deemph -> output. The analog.quadrature_demod_cf is in gr-analog/lib as
quadrature_demod_cf_impl.{h,cc}. The filter.fir_filter_fff is in
gr-filter/lib. deemph is in gr-analog/python/analog/fm_emph as a
hierachical block that does some convenience math to set up an IIR filter
in gr-filter.

All of the blocks that come with GNU Radio at some point go down to a C++
implementation. You can use the GRC xml files to figure out where to look
for the blocks, and sometimes there's an intermediate python hierarchical
block. Look at the import statements to figure out which component to look
in. After spending some time with the framework you develop some knowledge
and sense of where things belong so you no longer have to look around as
much.

A potentially faster approach to find the C++ implementations when going in
blind is to use python to dump of the graph with top_block.dump(). You can
edit the python to do that; not sure if there's a button in GRC to do it.

-Nathan

On Tue, Nov 10, 2015 at 9:53 AM, John B. Wood <[email protected]>
wrote:

> Hello, everyone, and I trust most of you will indulge a GRC newbie.  After
> reading some of the online Gnuradio docs, I'm puzzled by what's inside
> building blocks that appear in the GRC block tree panel.  If I select "WBFM
> Receive" from the "Modulators" tab, for example, I know this defined by the
> analog_wfm_rcv.xml file in my /usr/local/share/gnuradio/grc/blocks
> directory.  When I examine this 672 byte file with a text editor, the what
> entries are there make sense but how can this block define an entire FM
> receiver (Filters, FM detector, etc) from I & Q signal inputs to baseband
> audio?  It doesn't seem possible.  What am I overlooking?
>
> The other question is whether any of these building blocks were themselves
> created using GRC signal flow graphs and how to display them as such.
> Thanks for your time and comment.  Sincerely,
>
> _______________________________________________
> Discuss-gnuradio mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to