def test_004_t(self):
     vector01 =          (1, 2, 3, 4,  5, 6, 7, 8,  9, 10, 11, 12,  13, 14, 15, 16)
     expected_result =   (0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,3,4,0,0,7,8,0,0,11,12,0,0,15,16)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 16)
     time_deinterleaver = dab.time_deinterleave_ff_make(16, [0, 1, 2, 4])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 16)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 16*2), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)
 def test_003_t(self):
     vector01 =          (3, 0, 0, 0, 7, 0, 0, 0,    11, 4, 0, 0, 15, 8,  0, 0,      19, 12, 1, 0, 23, 16, 5, 0,     27, 20,  9,  2, 31, 24, 13,  6)
     expected_result =   (0, 0, 0, 0, 0, 0, 0, 0,     3, 4, 0, 0,  7, 8,  0, 0,      11, 12, 0, 0, 15, 16, 0, 0,      19,20, 0, 0, 23, 24, 0, 0)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 8)
     time_deinterleaver = dab.time_deinterleave_ff_make(8, [2, 3, 0, 1])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 8)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 8*4), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)
 def test_002_t(self):
     vector01 =          (1, 0, 0, 0,  5, 4, 0, 0,  9, 8, 3, 0,  13, 12, 7, 2)
     expected_result =   (0, 0, 0, 0,  0, 4, 0, 0,  0, 8, 0, 0,   1, 12, 3, 0)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 4)
     time_deinterleaver = dab.time_deinterleave_ff_make(4, [0, 3, 2, 1])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 4)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 4*4), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)
Пример #4
0
 def test_004_t(self):
     vector01 =          (1, 2, 3, 4,  5, 6, 7, 8,  9, 10, 11, 12,  13, 14, 15, 16)
     expected_result =   (0,0,0,4,0,0,0,8,0,0,0,12,0,0,0,16,0,0,3,4,0,0,7,8,0,0,11,12,0,0,15,16)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 16)
     time_deinterleaver = grdab.time_deinterleave_ff_make(16, [0, 1, 2, 4])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 16)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 16*2), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)
Пример #5
0
 def test_003_t(self):
     vector01 =          (3, 0, 0, 0, 7, 0, 0, 0,    11, 4, 0, 0, 15, 8,  0, 0,      19, 12, 1, 0, 23, 16, 5, 0,     27, 20,  9,  2, 31, 24, 13,  6)
     expected_result =   (0, 0, 0, 0, 0, 0, 0, 0,     3, 4, 0, 0,  7, 8,  0, 0,      11, 12, 0, 0, 15, 16, 0, 0,      19,20, 0, 0, 23, 24, 0, 0)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 8)
     time_deinterleaver = grdab.time_deinterleave_ff_make(8, [2, 3, 0, 1])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 8)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 8*4), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)
Пример #6
0
 def test_002_t(self):
     vector01 =          (1, 0, 0, 0,  5, 4, 0, 0,  9, 8, 3, 0,  13, 12, 7, 2)
     expected_result =   (0, 0, 0, 0,  0, 4, 0, 0,  0, 8, 0, 0,   1, 12, 3, 0)
     src = blocks.vector_source_b(vector01, True)
     b2f = blocks.char_to_float_make()
     s2v = blocks.stream_to_vector(gr.sizeof_float, 4)
     time_deinterleaver = grdab.time_deinterleave_ff_make(4, [0, 3, 2, 1])
     v2s = blocks.vector_to_stream(gr.sizeof_float, 4)
     dst = blocks.vector_sink_f()
     self.tb.connect(src, b2f, time_deinterleaver, blocks.head_make(gr.sizeof_float, 4*4), dst)
     self.tb.run()
     result = dst.data()
     #print result
     self.assertEqual(expected_result, result)