[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuradio-discuss
Subject: Re: [Discuss-gnuradio] OOT module with a vector input/output gives an assertion failure
From: Marcus_Müller <marcus.mueller () ettus ! com>
Date: 2017-02-19 23:39:47
Message-ID: 64644595-6EC3-4145-8FBB-13EF256A49C5 () ettus ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
1. Make sure you're not mixing up vectors and individual elements. You must return \
the number of vectors you've produced, not the number of gr_complexes these contain. \
2. Separately calling consume_each and returning the same value looks like you should \
have used a sync block (with a work function) instead of a general block (with a \
general_work function). If you're already actually using a work/sync block, then \
returning a number implicitly consumes! In that case, you're consuming twice the \
amount of items you should.
Best regards,
Marcus
Am 19. Februar 2017 21:34:00 MEZ schrieb Damindra Bandara \
<damindra.bandara@gmail.com>:
> Hi,
>
> I am trying to create an OOT module with a vector input. I haven't
> implemented the signal processing yet. This is how my code looks like.
>
>
> *I/O signature*
>
> gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len),
> gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len))
>
> *In the work function,*
>
> const gr_complex *in = (const gr_complex *) input_items[0];
> gr_complex *out = (gr_complex *) output_items[0];
>
> consume_each (noutput_items);
> return noutput_items;
>
> When the fft_len is set to 1, the block runs without any errors.
> However,
> when I set the fft_len to some value greater than 1, it fails with the
> following error.
>
> python2:
> /usr/local/src/gnuradio/gnuradio-runtime/include/gnuradio/buffer.h:179:
> unsigned int gr::buffer::index_add(unsigned int, unsigned int):
> Assertion
> `s < d_bufsize' failed.
>
> I appreciate if you could give me some guidance to get this fixed.
>
> Thanks,
> Damindra
>
> --
> Damindra Savithri Bandara,
> Ph.D. in Information Technology (Candidate)
> George Mason University,
> Fairfax,
> Virginia
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
[Attachment #5 (text/html)]
<html><head></head><body>1. Make sure you're not mixing up vectors and individual \
elements. You must return the number of vectors you've produced, not the number \
of gr_complexes these contain.<br> 2. Separately calling consume_each and returning \
the same value looks like you should have used a sync block (with a work function) \
instead of a general block (with a general_work function). If you're already \
actually using a work/sync block, then returning a number implicitly consumes! In \
that case, you're consuming twice the amount of items you should.<br> <br>
Best regards,<br>
Marcus<br><br><div class="gmail_quote">Am 19. Februar 2017 21:34:00 MEZ schrieb \
Damindra Bandara <damindra.bandara@gmail.com>:<blockquote class="gmail_quote" \
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); \
padding-left: 1ex;"> <div dir="ltr"><div><div><div><div><div><div>Hi,<br /><br \
/></div>I am trying to create an OOT module with a vector input. I haven't \
implemented the signal processing yet. This is how my code looks like.<br /><br \
/><b><br /></b></div><div><b>I/O signature</b><br /></div><div><br \
/>gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len),<br \
/> \
gr::io_signature::make(1, 1, sizeof(gr_complex)*fft_len))<br /><br /></div><b>In the \
work function,</b><br /><br />const gr_complex *in = (const gr_complex *) \
input_items[0];<br />gr_complex *out = (gr_complex *) output_items[0];<br /><br \
/> consume_each (noutput_items);<br /> return noutput_items;<br /><br \
/></div>When the fft_len is set to 1, the block runs without any errors. However, \
when I set the fft_len to some value greater than 1, it fails with the following \
error.<br /><br />python2: /usr/local/src/gnuradio/<wbr \
/>gnuradio-runtime/include/<wbr />gnuradio/buffer.h:179: unsigned int \
gr::buffer::index_add(unsigned int, unsigned int): Assertion `s < d_bufsize' \
failed.<br /><br /></div>I appreciate if you could give me some guidance to get this \
fixed.<br /><br /></div>Thanks,<br /></div>Damindra<br clear="all" \
/><div><div><div><div><div><div><div></div></div></div></div></div></div></div></div></blockquote></div><br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic