Skip to content

Instantly share code, notes, and snippets.

@trondeau
trondeau / gist:7d5d06ea2f0586f0e9e4
Last active August 29, 2015 14:06
patch for gr::blocks::deinterleave to handle multiple blocks of data at once
diff --git a/gr-blocks/lib/deinterleave_impl.cc b/gr-blocks/lib/deinterleave_impl.cc
index c9d0e9a..9e18c35 100644
--- a/gr-blocks/lib/deinterleave_impl.cc
+++ b/gr-blocks/lib/deinterleave_impl.cc
@@ -41,13 +41,20 @@ namespace gr {
io_signature::make (1, io_signature::IO_INFINITE, itemsize)),
d_itemsize(itemsize), d_blocksize(blocksize), d_current_output(0)
{
+ d_size_bytes = d_itemsize * d_blocksize;
set_output_multiple(blocksize);
diff --git a/gnuradio-runtime/include/gnuradio/block.h b/gnuradio-runtime/include/gnuradio/block.h
index 43fc50c..df58e78 100644
--- a/gnuradio-runtime/include/gnuradio/block.h
+++ b/gnuradio-runtime/include/gnuradio/block.h
@@ -617,7 +617,7 @@ namespace gr {
uint64_t abs_offset,
const pmt::pmt_t &key,
const pmt::pmt_t &value,
- const pmt::pmt_t &srcid=pmt::PMT_F)
+ const pmt::pmt_t &srcid=pmt::PMT_NIL)
@trondeau
trondeau / gist:708ac72c97b7730e1278
Created October 24, 2014 15:55
reset gr buffer counters
diff --git a/gnuradio-runtime/include/gnuradio/block_detail.h b/gnuradio-runtime/include/gnuradio/block_detail.h
index 41568c8..8f9b039 100644
--- a/gnuradio-runtime/include/gnuradio/block_detail.h
+++ b/gnuradio-runtime/include/gnuradio/block_detail.h
@@ -94,13 +94,25 @@ namespace gr {
*/
void produce_each(int how_many_items);
- // Return the number of items read on input stream which_input
+ /*!
$ ctest
Test project gnuradio/build/master
Start 1: qa_volk_test_all
1/197 Test #1: qa_volk_test_all ..................... Passed 0.22 sec
Start 2: gr-runtime-test
2/197 Test #2: gr-runtime-test ...................... Passed 3.36 sec
Start 3: gr-pmt-test
3/197 Test #3: gr-pmt-test .......................... Passed 0.90 sec
Start 4: qa_kludged_imports
4/197 Test #4: qa_kludged_imports ................... Passed 0.15 sec
@trondeau
trondeau / gist:5e4b4b3fedd5aab14735
Created November 17, 2014 17:07
zedboard bootup from sdimage
zynq-uboot> boot
Device: zynq_sdhci
Manufacturer ID: 3
OEM: 5344
Name: SE32G
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
diff --git a/gnuradio-runtime/lib/buffer.cc b/gnuradio-runtime/lib/buffer.cc
index f00e9a0..a0172b7 100644
--- a/gnuradio-runtime/lib/buffer.cc
+++ b/gnuradio-runtime/lib/buffer.cc
@@ -248,11 +248,34 @@ namespace gr {
locks the mutex itself.
If this function is used elsewhere, remember to lock the
- buffer's mutex al la the scoped_lock line below.
+ buffer's mutex al la the scoped_lock:
@trondeau
trondeau / gist:325cb856802ebf22dc46
Created September 23, 2015 18:25
tagged_stream_block patch
diff --git a/gnuradio-runtime/lib/tagged_stream_block.cc b/gnuradio-runtime/lib/tagged_stream_block.cc
index 252a235..6d743e1 100644
--- a/gnuradio-runtime/lib/tagged_stream_block.cc
+++ b/gnuradio-runtime/lib/tagged_stream_block.cc
@@ -141,14 +141,16 @@ namespace gr {
if(n_produced == WORK_DONE) {
return n_produced;
}
- for(int i = 0; i < (int) d_n_input_items_reqd.size(); i++) {
- consume(i, d_n_input_items_reqd[i]);
@trondeau
trondeau / gist:33d72859d1b46ad7a45c
Created September 24, 2015 20:40
gdb bt of fecapi_async_ldpc_encoders
#0 0x00007ffff782dcc9 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff78310d8 in __GI_abort () at abort.c:89
#2 0x00007ffff786a394 in __libc_message (do_abort=do_abort@entry=1, fmt=fmt@entry=0x7ffff7978b28 "*** Error in `%s': %s: 0x%s ***\n") at ../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff787666e in malloc_printerr (ptr=<optimized out>, str=0x7ffff7978c58 "double free or corruption (out)", action=1) at malloc.c:4996
#4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at malloc.c:3840
#5 0x00007ffff535f7b8 in QString::free(QString::Data*) () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#6 0x00007fffd6911171 in QwtText::~QwtText() () from /opt/qwt-6.1.0/lib/libqwt.so.6
#7 0x00007fffd6901941 in QwtScaleDraw::labelRect(QFont const&, double) const () from /opt/qwt-6.1.0/lib/libqwt.so.6
#8 0x00007fffd6902622 in QwtScaleDraw::minLabelDist(QFont const&) const () from /opt/qwt-6.1.0/lib/libqwt.so.6
#9 0x00007fffd6902eeb in QwtScaleDraw::minLength
@trondeau
trondeau / gist:6ccf4a4c06a4e88d6060
Last active November 20, 2015 21:15
Notes on Compiling Thrift with OE SDR
Ran ./bootstrap before setting OE environment
- Looking for some Perl support (File/Find.pm) not in the nativesdk
-- it is in the target sysroot
**********************************************************************
**********************************************************************
Patched files to turn off test support in C:
linux; GNU C++ version 4.9.1; Boost_105600; UHD_003.010.git-89-gb17b440d
-- Loading FPGA image: /usr/share/uhd/images/usrp_e310_fpga.bit... done
-- Initializing core control...
-- Performing register loopback test... pass
-- Performing register loopback test... pass
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Performing CODEC loopback test... pass
-- Setting time source to internal