New to GnuRadio (Fortran own blocks?)

Dear All,

below is an email I had written to Josh B., but I just saw his
webpage,
and realized he might not get time to reply at the earliest, so I am
forwarding at this list as well, so I can get all the help that I can.

Dear Sir

I am a BSc electrical engineering student, in my final year. As part of
my
senior year project, I am working on co-operative communication using
USRP
boards. I have downloaded GnuRadio+Drivers, and read many tutorials,
seen
your webpages, and other related information.

My supervisor insists that I use discrete blocks, instead of already
combined blocks (for certain modulation schemes, like qpsk etc). I am
working on that, however I have particularly no idea as to what a block
needs (like input), what it does to the output, and what each parameter
does. I have tired visiting the C code (its all too messy for me to
understand). I have visited examples as well, but no luck.

Here is what I am planning. I am thinking of writing my own Fortran
blocks
(we are a team of 4 so yes that is possible) and integrating that with
python; NumPy and then use that to connect with other basic blocks.
Please
tell me if that will work (as in how much efficient would that be), and
whether there is a way round understanding the blocks.

Let me give you an example:
Our supervisor says, that given a data source of bits
1,1,1,1,1,0,1,0,1,0,0,1,0,1,0 for QPSK we first get the data to 2bits
each
symbol and then calculate its phase (map encoder) and then for
differential
decoding we get differential decoder (which is basically just adding the
previous phase to the current phase) and then have it in I and Q form,
followed by pulseshaping.

Now I have read the API doxygen, the Simple GNU Radio User Manual, and I
cannot relate clearly as to what for example gr.map_bb() block does, or
why
is the differential encoder using y[k]=y[k-1]+x[k]%M (like why is there
a
mod in it ? ). Moreover, for a me a discrete pulseshaping filter would
want
kronecker delta pulses at its inputs and then have the pulse made around
the delta pulses as its output, but even that i donot understand.
Furthermore, how will use the demodulation block to determine the signal
using 'nearest distance metri

We are okay in making our own Fortran blocks and working, but we need to
be
sure. And would really like if we can find some book/manual to
understand
on what convention was the blocks already existing made, etc, so we use
most of the existing work done.

I know you are busy person, and I am not sure, if you will even get time
to
read or reply to our email at the earliest (as we need to get to our
supervisor, at the earliest with our weekly progress) but please do help
us, or refere to someone else.

Thank you for your time,

Regards,
U B

On 11/26/2011 09:18 AM, Uzair B. wrote:

Here is what I am planning. I am thinking of writing my own Fortran
blocks
(we are a team of 4 so yes that is possible) and integrating that
with
python; NumPy and then use that to connect with other basic blocks.

Another way to use Fortran in GNU Radio is to wrap them in a C++ block,
you might want to have a look at [0] to see how we did that. This
however supposes that you actually want to use the GNU Radio runtime to
write a GNU Radio application (which I’m not entirely sure of is what
you want to do). Maybe you could elaborate further on what you are
actually planning to do?

Please tell me if that will work (as in how much efficient would that
be), and
whether there is a way round understanding the blocks.

If I understand you correctly you want to have an answer on how
efficient that is and if it is possible to do this without
understanding the blocks?!

We are okay in making our own Fortran blocks and working, but we need
to be
sure. And would really like if we can find some book/manual to
understand
on what convention was the blocks already existing made, etc, so we
use
most of the existing work done.

I think there is no official convention for writing Fortran blocks in
GNU Radio, but for coding guidelines see README.hacking.

May I ask a final question, why did you select Fortran? Do you have a
lot of matrix computations to do?

In our case we used Fortran for several reasons including wanting to
learn how to do it, and (to our knowledge) the lack of equally fast
implementations in C/C++ of the matrix computations involved.

Cheers & happy hacking,

Moritz

[0] http://github.com/kit-cel/gr-specest.git

Thank you Mortiz for your reply.

We are trying to basically do all the processing of the data in a
program,
without passing it through blocks, like a basic code. We are using
Fortran
for two reasons, as its faster than C++ in certain aspects, and
secondly,
integrating the code (simple code, doesn’t make use of classes etc) with
NumPy seems easier.I would like to know if I take the data from USRP,
write
it to a file. Get the data from the file, start processing it via
Fortran
integrated in NumPy, and again using USRP transmit again, will that be
efficient enough?

Why exactly are we wanting to do all of this, instead of just using the
blocks - I mention again, because we don’t understand how the C++ blocks
of
GnuRadio work, function.

Uzair B.

On Sat, Nov 26, 2011 at 6:22 PM, Moritz Fischer

We are trying to basically do all the processing of the data in a program,
without passing it through blocks, like a basic code. We are using Fortran
for two reasons, as its faster than C++ in certain aspects, and secondly,
integrating the code (simple code, doesn’t make use of classes etc) with
NumPy seems easier.I would like to know if I take the data from USRP, write

To use the gnuradio framework, you have 2 options:
write the blocks in python or write the blocks in c++

Writing blocks in python is a recent invention of mine that hasnt made
it into the mainline code:
http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython

Now, the actual implementation of your work() function, the code that is
doing all the heavy lifting can be written however, anyway, anyhow you
like.

My only advice is to get everything working first in whatever language
you are most comfortable or efficient with. If thats fortran, than so be
it, but dont use fortran because of some programming misnomer.

When you want performance, then optimize your code with SIMD. Blocks
calling into volk kernels are a great example.

-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs