# Re: FEC in gnruadio

**URL:** <https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339>\
**Category:** GNU Radio\
**Created:** [June 16, 2015, 7:04pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339 "2015-06-16T19:04:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [June 16, 2015, 7:04pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/1 "2015-06-16T19:04:33Z")

</div>

> > implementation of the gr-fec so that I can go through the c++
> 
> We’re also about to merge in another approach to LDPC encoding and decoding  
> What’s your particular interest in FEC? Are you looking to use it or  
> implement other codes not already in gr-fec? For the FEC API itself, there  
> is no other reference than the manual page and a presentation from the  
> original author at our GRCons:
> 
> [GRCon14 - Presentations — Rondeau Research](http://www.trondeau.com/grcon14-presentations#tut-mccarthy)  
> [GRCon2013 - Presentations — Rondeau Research](http://www.trondeau.com/grcon2013-presentations#tut-mccarthy)
> 
> Tom

Hi Tom,

Thanks for the links. I am targeting Turbo Codes mainly for short frame  
size. I found one presentation on turbo codes

[http://gnuradio.squarespace.com/storage/grcon14/presentations/Sep18\_02\_Karra\_TurboCodes.pdf](http://gnuradio.squarespace.com/storage/grcon14/presentations/Sep18_02_Karra_TurboCodes.pdf)

but I could not find its source code in gnuradio. Are Turbo codes  
implemented in gnuradio? if yes, in which version can I find it? One  
more  
question, I am targeting short frame length burst, currently which FEC  
in  
gnuradio can give me best gain in this case?

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [June 16, 2015, 8:42pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/2 "2015-06-16T20:42:44Z")

</div>

On Tue, Jun 16, 2015 at 1:03 PM, bob wole [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > 
> > 
> > the  
> > Have a look at the manual. The API itself is quite well described I think:
> > 
> > Johannes D. is working on polar codes this summer.
> 
> implemented in gnuradio? if yes, in which version can I find it? One more  
> question, I am targeting short frame length burst, currently which FEC in  
> gnuradio can give me best gain in this case?
> 
> –  
> Bob

Bob,

Yes, Kiran’s TPC work has been integrated as of 3.7.7.1. (I even pointed  
out the links to the manual pages for the tpc\_encoder and tpc\_decoder  
above.)

Tom

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [June 16, 2015, 8:46pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/3 "2015-06-16T20:46:15Z")

</div>

On Tue, Jun 16, 2015 at 11:41 PM, Tom R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > through the c++ implementation more productively and add  
> > > > gr-fec. I  
> > > > Hi Bob,  
> > > > [GNU Radio Manual and C++ API Reference: gr::fec::tpc\_decoder Class Reference](http://gnuradio.org/doc/doxygen/classgr_1_1fec_1_1tpc__decoder.html)  
> > > > [GRCon2013 - Presentations — Rondeau Research](http://www.trondeau.com/grcon2013-presentations#gsoc-perez)  
> > > > [GRCon14 - Presentations — Rondeau Research](http://www.trondeau.com/grcon14-presentations#tut-mccarthy)
> 
> Bob,
> 
> Yes, Kiran’s TPC work has been integrated as of 3.7.7.1. (I even pointed  
> out the links to the manual pages for the tpc\_encoder and tpc\_decoder  
> above.)
> 
> Tom

Thanks Tom,

I am going to test them soon for my bursty system 🙂 Lets see how it  
works.

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [July 2, 2015, 5:11pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/4 "2015-07-02T17:11:19Z")

</div>

On Tue, Jun 30, 2015 at 2:00 PM, bob wole [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > > implementation of the gr-fec so that I can go through the c++  
> > > > > > think:
> > > > > 
> > > > > Johannes D. is working on polar codes this summer.  
> > > > > Tom  
> > > > > but I could not find its source code in gnuradio. Are Turbo codes  
> > > > > Yes, Kiran’s TPC work has been integrated as of 3.7.7.1. (I even pointed
> 
> in gnuradio/gr-fec/examples/  
> fec.extended\_encoder(encoder\_obj\_list=enc, threading=‘capillary’,
> 
> File “/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top\_block.py”,
> 
> fecapi\_async\_decoders.grc runs without any errors.
> 
> Any Ideas what could be wrong ?
> 
> –  
> Bob

Any comments on it ?

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [July 3, 2015, 8:17pm UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/5 "2015-07-03T20:17:50Z")

</div>

On Thu, Jul 2, 2015 at 8:10 PM, bob wole [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > On Tue, Jun 16, 2015 at 11:41 PM, Tom R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > > 
> > > > > > > followed during the implementation of the gr-fec so that I can go  
> > > > > > > I just stared working on FEC in gnuradio. I found that there is
> > > > > > 
> > > > > > [GNU Radio Manual and C++ API Reference: gr::fec::tpc\_encoder Class Reference](http://gnuradio.org/doc/doxygen/classgr_1_1fec_1_1tpc__encoder.html)  
> > > > > > And the GSoC presentations:
> > > 
> > > Thanks Tom,  
> > > gnuradio version 3.7.7.1  
> > > File “/home/gnuradio/gr-fec/examples/ber\_test.py”, line 267, in   
> > > File “/usr/local/lib/python2.7/dist-packages/gnuradio/fec/bitflip.py”,  
> > > Traceback (most recent call last):  
> > > RuntimeError: boost::thread\_resource\_error: Resource temporarily
> 
> Any comments on it ?
> 
> –  
> Bob

I hope somebody would reply on this.

---

<div class="post-metadata">

**Author:** ![bob\_wole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b4bc9f/32.png) [@bob\_wole](https://www.ruby-forum.com/u/bob_wole)\
**Post date:** [June 30, 2015, 11:01am UTC](https://www.ruby-forum.com/t/re-fec-in-gnruadio/242339/6 "2015-06-30T11:01:49Z")

</div>

On Tue, Jun 16, 2015 at 11:45 PM, bob wole [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > 
> > > > 
> > > > > –  
> > > > > It doesn’t cover the very recently added TPC and LDPC implementations.
> > > > 
> > > > there
> > 
> > Tom
> 
> Thanks Tom,
> 
> I am going to test them soon for my bursty system 🙂 Lets see how it works.
> 
> –  
> Bob

Hi list,

gnuradio version 3.7.7.1  
ubunutu 14.04 32-bit

I am trying to use gr-fec and I am having issues running examples  
located  
in gnuradio/gr-fec/examples/

When I run ber\_test.grc I get following error

Using Volk machine: avx\_32\_mmx\_orc  
Traceback (most recent call last):  
File “/home/gnuradio/gr-fec/examples/ber\_test.py”, line 267, in  
  
tb = ber\_test()  
File “/home/gnuradio/gr-fec/examples/ber\_test.py”, line 159, in  
**init**  
self.fec\_extended\_encoder\_0 =  
fec.extended\_encoder(encoder\_obj\_list=enc, threading=‘capillary’,  
puncpat=“puncpat”)  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/fec/extended\_encoder.py”,  
line 64, in **init**  
self.blocks.append(fec.puncture\_bb(len(puncpat),  
read\_bitlist(puncpat),  
0))  
File “/usr/local/lib/python2.7/dist-packages/gnuradio/fec/bitflip.py”,  
line 47, in read\_bitlist  
if int(bitlist[i]) == 1:  
ValueError: invalid literal for int() with base 10: ‘p’

> > > Done (return code 1)

When I run tpc\_ber\_curve\_gen.grc I get following error

Using Volk machine: avx\_32\_mmx\_orc  
Traceback (most recent call last):  
File “/home/gnuradio/gr-fec/examples/tpc\_ber\_curve\_gen.py”, line 450,  
in  
  
tb.start()  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/top\_block.py”,  
line 106, in start  
top\_block\_start\_unlocked(self.\_impl, max\_noutput\_items)  
File  
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/runtime\_swig.py”,  
line  
4860, in top\_block\_start\_unlocked  
return \_runtime\_swig.top\_block\_start\_unlocked(\*args, \*\*kwargs)  
RuntimeError: boost::thread\_resource\_error: Resource temporarily  
unavailable

> > > Done

fecapi\_async\_decoders.grc runs without any errors.

Any Ideas what could be wrong ?
