discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Problem trying to implement Reed Solomon encoder


From: Alvaro Palomo
Subject: [Discuss-gnuradio] Problem trying to implement Reed Solomon encoder
Date: Fri, 21 Nov 2008 15:47:46 +0000

Hello,

I'm trying to create a GNU Radio block that carries out a Reed Solomon
coding based on the functions provided into the
directory /gnuradio-core/src/lib/reed-solomon.

As an example I have taken the block gr_encode_ccsds_27 that can be
found in the directory /gnuradio-core/src/lib/general since it uses the
functions implemented in /gnuradio-core/src/lib/viterbi.

Basically the aspect of my gr_rs_encoder_vbb.cc file is the following:

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <gr_rs_encoder_vbb.h>
#include <gr_io_signature.h>

extern "C" {
#include "../reed-solomon/fixed.h"
}

gr_rs_encoder_vbb_sptr 
gr_make_rs_encoder_vbb()
{
  return gr_rs_encoder_vbb_sptr(new gr_rs_encoder_vbb());
}

gr_rs_encoder_vbb::gr_rs_encoder_vbb()
  : gr_sync_block("rs_encoder_vbb",
                         gr_make_io_signature(1, 1, (223)*sizeof(char)),
                         gr_make_io_signature(1, 1, 255*sizeof(char)))
{
}

gr_rs_encoder_vbb::~gr_rs_encoder_vbb()
{
}

int 
gr_rs_encoder_vbb::work(int noutput_items,
                            gr_vector_const_void_star &input_items,
                            gr_vector_void_star &output_items)
{
  const unsigned char *in = (const unsigned char *)input_items[0];
  unsigned char *out = (unsigned char *)output_items[0];
  
  for (int i = 0; i < noutput_items; i++)
  {
    unsigned char *temp_first_element = out;
    for (int j = 0; j < (223); j++)
        *out++ = *in++;
    ENCODE_RS(temp_first_element,--out);
  }

  return noutput_items;
}

I include the file fixed.h since I want to use the implementation of the
CCSDS standard (255,223).

When I execute make into the main folder of GNU Radio for compiling
everything I get the following ERROR message:

/bin/bash ../../../libtool --tag=CXX   --mode=link g++ -g -O2 -Wall
-Woverloaded-virtual -pthread   -o benchmark_dotprod_fff
benchmark_dotprod_fff.o 
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/libgnuradio-core.la 
libtool: link: g++ -g -O2 -Wall -Woverloaded-virtual -pthread
-o .libs/benchmark_dotprod_fff
benchmark_dotprod_fff.o  
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/.libs/libgnuradio-core.so
 /home/apalomo/software/gnuradio-3.1.3/omnithread/.libs/libgromnithread.so -lrt 
/usr/lib/libfftw3f.so -lm -pthread
/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/lib/.libs/libgnuradio-core.so:
 undefined reference to `encode_rs_8'
collect2: ld returned 1 exit status
make[4]: *** [benchmark_dotprod_fff] Error 1
make[4]: Leaving directory
`/home/apalomo/software/gnuradio-3.1.3/gnuradio-core/src/tests'
make[3]: *** [all-recursive] Error 1

It looks like I'm missing to include another file somewhere, but I have
no idea where.

Have anybody tried to implement this yet or anybody knows how I could
fix it?

Thank you very much.

Best regards.

Alvaro Palomo






reply via email to

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