Re: GrBlock

I hope you guys are doing well.

I have a compilation problem with GrBlock. I have GNURadio 3.3 and UHD
installed in a non standard directory (/opt/gnuradio) and (/opt/uhd).
Please help me with this questions. Can I installed GrBlock when
GNURadio is in a non-standard directory? What do I need to modify in
the configuration files of GrBlock? Is Gnuradio3.3 supported or I need
GNURadio3.4?. I have Ubuntu 10.04, 32-bits

I exported as env variable GRUEL_DIR=/opt/gnuradio and
GNURADIO_CORE_DIR=/opt/gnuradio, socmake …/performed as expected,
but when I executemake:
[ 7%] Building CXX object
lib/CMakeFiles/gnuradio-grblock.dir/grblock_gateway.cc.o
In file included from/home/sergio/grblock/lib/grblock_gateway.cc:22:
/home/sergio/grblock/lib/grblock_gateway.h:186: error: ISO C++ forbids
declaration of gr_tag_t with no type
/home/sergio/grblock/lib/grblock_gateway.h:186: error: expected , or
… before & token
/home/sergio/grblock/lib/grblock_gateway.h:201: error: gr_tag_t was
not declared in this scope
/home/sergio/grblock/lib/grblock_gateway.h:201: error: template
argument 1 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:201: error: template
argument 2 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:211: error: gr_tag_t was
not declared in this scope
/home/sergio/grblock/lib/grblock_gateway.h:211: error: template
argument 1 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:211: error: template
argument 2 is invalid
/home/sergio/grblock/lib/grblock_gateway.h: In member function void
grblock_gateway::gr_block__add_item_tag(unsigned int, int):
/home/sergio/grblock/lib/grblock_gateway.h:188: error: tag was not
declared in this scope
/home/sergio/grblock/lib/grblock_gateway.h:188: error:
return-statement with a value, in function returning ‘void’
/home/sergio/grblock/lib/grblock_gateway.h: In member function int
grblock_gateway::gr_block__get_tags_in_range(unsigned int, uint64_t,
uint64_t):
/home/sergio/grblock/lib/grblock_gateway.h:206: error: gr_tag_t was
not declared in this scope
/home/sergio/grblock/lib/grblock_gateway.h:206: error: template
argument 1 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:206: error: template
argument 2 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:206: error: invalid type in
declaration before ; token
/home/sergio/grblock/lib/grblock_gateway.h:207: error: no matching
function for call to grblock_gateway::get_tags_in_range(int&,
unsigned int&, uint64_t&, uint64_t&)
/opt/gnuradio3.3/include/gnuradio/gr_block.h:276: note: candidates
are: void
gr_block::get_tags_in_range(std::vector<boost::intrusive_ptrpmt::pmt_base,
std::allocator<boost::intrusive_ptrpmt::pmt_base > >&, unsigned int,
uint64_t, uint64_t)
/opt/gnuradio3.3/include/gnuradio/gr_block.h:296: note:
void
gr_block::get_tags_in_range(std::vector<boost::intrusive_ptrpmt::pmt_base,
std::allocator<boost::intrusive_ptrpmt::pmt_base > >&, unsigned int,
uint64_t, uint64_t, const pmt::pmt_t&)
/home/sergio/grblock/lib/grblock_gateway.h: In member function int
grblock_gateway::gr_block__get_tags_in_range(unsigned int, uint64_t,
uint64_t, const pmt::pmt_t&):
/home/sergio/grblock/lib/grblock_gateway.h:217: error: gr_tag_t was
not declared in this scope
/home/sergio/grblock/lib/grblock_gateway.h:217: error: template
argument 1 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:217: error: template
argument 2 is invalid
/home/sergio/grblock/lib/grblock_gateway.h:217: error: invalid type in
declaration before ; token
/home/sergio/grblock/lib/grblock_gateway.h:218: error: no matching
function for call to grblock_gateway::get_tags_in_range(int&,
unsigned int&, uint64_t&, uint64_t&, const
boost::intrusive_ptrpmt::pmt_base&)
/opt/gnuradio3.3/include/gnuradio/gr_block.h:276: note: candidates
are: void
gr_block::get_tags_in_range(std::vector<boost::intrusive_ptrpmt::pmt_base,
std::allocator<boost::intrusive_ptrpmt::pmt_base > >&, unsigned int,
uint64_t, uint64_t)
/opt/gnuradio3.3/include/gnuradio/gr_block.h:296: note:
void
gr_block::get_tags_in_range(std::vector<boost::intrusive_ptrpmt::pmt_base,
std::allocator<boost::intrusive_ptrpmt::pmt_base > >&, unsigned int,
uint64_t, uint64_t, const pmt::pmt_t&)
make[2]: *** [lib/CMakeFiles/gnuradio-grblock.dir/grblock_gateway.cc.o]
Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-grblock.dir/all] Error 2
make: *** [all] Error 2

Thank you, Sergio Pino
University of Delaware

On 10/30/2011 08:21 PM, spino wrote:

I hope you guys are doing well.

I have a compilation problem with GrBlock. I have GNURadio 3.3 and UHD
installed in a non standard directory (/opt/gnuradio) and (/opt/uhd).
Please help me with this questions. Can I installed GrBlock when
GNURadio is in a non-standard directory? What do I need to modify in
the configuration files of GrBlock? Is Gnuradio3.3 supported or I need
GNURadio3.4?. I have Ubuntu 10.04, 32-bits

It needs a more recent gnuradio (master or latest release) because of
the tags requirement. Anyway, the grblock work has been continued on my
gnuradio development branch. Its now integrated into gnuradio as well:

http://gnuradio.org/cgit/jblum.git/log/?h=next

-Josh

On 11/04/2011 01:22 PM, spino wrote:

GrBlock? Where to start? Do I need to compile GrBlock or it suppose to
be a part of GNURadio?
http://gnuradio.org/cgit/jblum.git/log/?h=next

Sorry for the confusion, things tend to move fast around here.

Grblock began as a stand-alone project, but my intention was always to
merge it into gnuradio. After all, shouldn’t gnuradio, as a de-facto
feature, allow you to write blocks in python?

So, all work on grblock is now on my next branch in gnuradio:
http://gnuradio.org/cgit/jblum.git/log/?h=next
If you checkout and build this branch, you can write blocks in python.

All of the examples have been turned into qa code:
http://gnuradio.org/cgit/jblum.git/tree/gnuradio-core/src/python/gnuradio/gr/qa_block_gateway.py?h=next

I want to write some blocks in GNURadio that perform the algorithms
that I had implemented in Matlab for joint source-channel coding, also
I’m using some basic algorithms for frequency synchronization in
matlab that I’ll implement in GNURadio. Could you please advice me, I
need some sort of performance, but also I need to implement them asap.
Which option do you prefer, GrBlock approach or normal GNURadio block
implementation?

I suppose the intention was to allow the user to make this choice, since
they did not have an option before. :slight_smile:

I personally have wanted this feature years ago because I was
comfortable and efficient in python. Now, I suppose, I would prototype a
new block in python because it saves developer time.

  1. If I find that the python is too slow for my purposes:
  2. I will try first to speed it up with numpy,
  3. and if that is too slow, to write the block in c++,
  4. and if that is too slow, to make vector optimized blocks in libvolk
  5. and if that is too slow, maybe I use the FPGA or just go home.

-Josh

I forgot, I had also made a wiki page for this:
http://gnuradio.org/redmine/projects/gnuradio/wiki/WriteBlocksInPython

It needs a more recent gnuradio (master or latest release) because of
the tags requirement. Anyway, the grblock work has been continued on my
gnuradio development branch. Its now integrated into gnuradio as well:
http://gnuradio.org/cgit/jblum.git/log/?h=next

-Josh

Hi Josh, I installed GNURadio 3.5.0rc0 from the git repository as
normal (git clone gnuradio.git - GNU Radio). Could you
please help me with these questions: How can I find the examples of
GrBlock? Where to start? Do I need to compile GrBlock or it suppose to
be a part of GNURadio?

I want to write some blocks in GNURadio that perform the algorithms
that I had implemented in Matlab for joint source-channel coding, also
I’m using some basic algorithms for frequency synchronization in
matlab that I’ll implement in GNURadio. Could you please advice me, I
need some sort of performance, but also I need to implement them asap.
Which option do you prefer, GrBlock approach or normal GNURadio block
implementation?

Thank you for your time, Sergio Pino
University of Delaware