out[i] += taps[j] * input[i+j]
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
0 1 2 3 4 5 6 7 8 9
hist0 hist1 hist2 hist3 in0 in1 in2 in3 in4 in5
tap3 tap2 tap1 tap0
-----Original Message-----
From: Josh Blum <address@hidden>
To: Discuss-gnuradio <address@hidden>
Sent: Sun, Sep 25, 2011 6:59 pm
Subject: [Discuss-gnuradio] making gnuradio blocks entirely in python
So there is a useful feature I think gnuradio is missing, and thats the
ability to rapidly prototype signal processing in python. It would be
great if a python block would have access to all the facilities
available to a block written in a c++ environment.
So I put together pyblock (not to be confused with those other project
by the same name). Its a stand-alone build that links against gnuradio.
https://github.com/guruofquality/pyblock
Theres a few demos: an adder, using tags, interp and decim blocks.
https://github.com/guruofquality/pyblock/tree/master/examples
The interesting thing is that the work functions just call into numpy
routines, so there is a chance that the implementations can be
reasonably fast.
I would like to be able to support history so i can implement a filter
using numpy but I am a little lacking in the basic understanding so fill
me in if you know. Suppose I have this work function:
int work(int noutput_items, gr_vector_const_void_star
&input_items,gr_vector_void_star &output_items){
const float *in = reinterpret_cast<const float *>(input_items[0]);
I am assuming history is on the input buffer.
Is the vector "in" ninput_items + history() items long? Where
ninput_items = noutput_items*/some_factor.
Whats the first index of the first item? Is in[0] or in[0-history()]?
-Josh
_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio