[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 38/39: fec: LDPC: added back all QA tests a
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 38/39: fec: LDPC: added back all QA tests and added a test of ldpc_gen_mtrx_encoder. |
Date: |
Thu, 15 Oct 2015 21:21:34 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit ee6b68433b815c3bb66b44f8a6c12709059cf65a
Author: Tom Rondeau <address@hidden>
Date: Thu Oct 15 11:11:36 2015 -0400
fec: LDPC: added back all QA tests and added a test of
ldpc_gen_mtrx_encoder.
---
gr-fec/python/fec/qa_fecapi_ldpc.py | 208 ++++++++++++++++++++++--------------
1 file changed, 130 insertions(+), 78 deletions(-)
diff --git a/gr-fec/python/fec/qa_fecapi_ldpc.py
b/gr-fec/python/fec/qa_fecapi_ldpc.py
index 52a05dc..b45ce0e 100644
--- a/gr-fec/python/fec/qa_fecapi_ldpc.py
+++ b/gr-fec/python/fec/qa_fecapi_ldpc.py
@@ -93,6 +93,39 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
self.assertEqual(data_in, data_out)
+ def test_parallelism0_03(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist"
+ gap = 4
+ LDPC_matrix_object = fec.ldpc_G_matrix(filename)
+ k = LDPC_matrix_object.k()
+ enc = fec.ldpc_gen_mtrx_encoder.make(LDPC_matrix_object)
+ dec =
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())
+ threading = 'capillary'
+ self.test = _qa_helper(10*k, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism0_03(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist"
+ gap = 4
+ k = 100 - 58
+ enc = fec.ldpc_par_mtrx_encoder.make(filename, gap)
+ dec = fec.ldpc_decoder.make(filename)
+ threading = 'capillary'
+ self.test = _qa_helper(10*k, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
def test_parallelism1_00(self):
filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
gap = 4
@@ -170,84 +203,103 @@ class test_fecapi_ldpc(gr_unittest.TestCase):
self.assertEqual(data_in, data_out)
-# def test_parallelism1_04(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 16
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# enc = map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,dims))
-# dec = map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
range(0,dims))
-# threading = 'capillary'
-# self.test = _qa_helper(dims*k, enc, dec, threading)
-# self.tb.connect(self.test)
-# self.tb.run()
-
- #data_in = self.test.snk_input.data()
- #data_out =self.test.snk_output.data()
- #
- #self.assertEqual(data_in, data_out)
-
-# def test_parallelism1_05(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 5
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# enc = map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,dims))
-# # dec = map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object)), range(0,dims))
-# threading = 'capillary'
-# self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
-#
-# def test_parallelism1_06(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 5
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# # enc = map((lambda a: fec.ldpc_encoder_make(LDPC_matrix_object)),
range(0,dims))
-# dec = map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
range(0,dims))
-# threading = 'capillary'
-# self.assertRaises(AttributeError, lambda: extended_decoder(dec,
threading=threading, puncpat="11"))
-#
-# def test_parallelism2_00(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 5
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# dims1 = 16
-# dims2 = 16
-# enc = map((lambda b: map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,dims1))),
range(0,dims2))
-# threading = 'capillary'
-#
-# self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
-#
-# def test_parallelism2_00(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 5
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# dims1 = 16
-# dims2 = 16
-# enc = map((lambda b: map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)), range(0,dims1))),
range(0,dims2))
-# threading = 'capillary'
-#
-# self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
-#
-# def test_parallelism2_01(self):
-# filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
-# gap = 4
-# dims = 5
-# LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
-# k = LDPC_matrix_object.k()
-# dims1 = 16
-# dims2 = 16
-# dec = map((lambda b: map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
range(0,dims1))), range(0,dims2))
-# threading = 'capillary'
-#
-# self.assertRaises(AttributeError, lambda: extended_decoder(dec,
threading=threading, puncpat="11"))
+ def test_parallelism1_04(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 16
+
+ enc = []
+ for n in range(0,dims):
+ H = fec.ldpc_H_matrix(filename, gap)
+ enc.append(fec.ldpc_par_mtrx_encoder.make_H(H))
+
+ dec = []
+ for n in range(0,dims):
+ H = fec.ldpc_H_matrix(filename, gap)
+ dec.append(fec.ldpc_bit_flip_decoder.make(H.get_base_sptr()))
+
+
+ k = 27
+ threading = 'capillary'
+ self.test = _qa_helper(dims*k, enc, dec, threading)
+ self.tb.connect(self.test)
+ self.tb.run()
+
+ data_in = self.test.snk_input.data()
+ data_out =self.test.snk_output.data()
+
+ self.assertEqual(data_in, data_out)
+
+ def test_parallelism1_05(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 5
+
+ enc = []
+ for n in range(0,dims):
+ H = fec.ldpc_H_matrix(filename, gap)
+ enc.append(fec.ldpc_par_mtrx_encoder.make_H(H))
+
+ dec = []
+ for n in range(0,dims):
+ H = fec.ldpc_H_matrix(filename, gap)
+ dec.append(fec.ldpc_bit_flip_decoder.make(H.get_base_sptr()))
+
+ k = H.k()
+ threading = 'capillary'
+ self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
+
+ def test_parallelism1_06(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 5
+ LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
+ k = LDPC_matrix_object.k()
+ dec = map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
range(0,dims))
+ threading = 'capillary'
+ self.assertRaises(AttributeError, lambda: extended_decoder(dec,
threading=threading, puncpat="11"))
+
+ def test_parallelism2_00(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 5
+ LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
+ k = LDPC_matrix_object.k()
+ dims1 = 16
+ dims2 = 16
+ enc = map((lambda b: map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
+ range(0,dims1))), range(0,dims2))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
+
+ def test_parallelism2_00(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 5
+ LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
+ k = LDPC_matrix_object.k()
+ dims1 = 16
+ dims2 = 16
+ enc = map((lambda b: map((lambda a:
fec.ldpc_par_mtrx_encoder.make_H(LDPC_matrix_object)),
+ range(0,dims1))), range(0,dims2))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_encoder(enc,
threading=threading, puncpat="11"))
+
+ def test_parallelism2_01(self):
+ filename = LDPC_ALIST_DIR + "n_0100_k_0027_gap_04.alist"
+ gap = 4
+ dims = 5
+ LDPC_matrix_object = fec.ldpc_H_matrix(filename, gap)
+ k = LDPC_matrix_object.k()
+ dims1 = 16
+ dims2 = 16
+ dec = map((lambda b: map((lambda a:
fec.ldpc_bit_flip_decoder.make(LDPC_matrix_object.get_base_sptr())),
+ range(0,dims1))), range(0,dims2))
+ threading = 'capillary'
+
+ self.assertRaises(AttributeError, lambda: extended_decoder(dec,
threading=threading, puncpat="11"))
if __name__ == '__main__':
gr_unittest.run(test_fecapi_ldpc, "test_fecapi_ldpc.xml")
- [Commit-gnuradio] [gnuradio] 16/39: fec: LDPC: updates for LDPC functionality., (continued)
- [Commit-gnuradio] [gnuradio] 16/39: fec: LDPC: updates for LDPC functionality., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 22/39: fec: LDPC: Updating decoder to handle parity bits either first or last., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 28/39: qtgui: fixes calculation of BPSK BER curve., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 05/39: fec: LDPC: Adding LDPC encoder variable., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 34/39: fec: LDPC: changing namespace of ldpc_encoder back., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 30/39: fec: Updated docs for Forward Error Correction section in manual., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 32/39: fec: LDPC: removing apps until we can fix them up properly., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 35/39: fec: LDPC: better docs describing encoder/decoders and how to use., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 39/39: Merge remote-tracking branch 'tom/fec/ldpc_methods', git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 26/39: fec: LDPC: Setting copyright date to current year., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 38/39: fec: LDPC: added back all QA tests and added a test of ldpc_gen_mtrx_encoder.,
git <=
- [Commit-gnuradio] [gnuradio] 13/39: fec: LDPC: Renaming class from ldpc_par_chk_mtrx to ldpc_R_U_mtrx, git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 36/39: fec: LDPC: reworking code to make sure API is ok., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 25/39: fec: LDPC: Moving alist files to a more global place; updating example., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 04/39: fec: LDPC: Classes for LDPC encoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 02/39: fec: LDPC: Adding framework for bit flip decoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 29/39: fec: LDPC: Fixes GRC files for BER curve examples., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 31/39: fec: LDPC: massive code clean up and change., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 17/39: fec: LDPC: updates to the 3 LDPC-related matrix classes., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 08/39: fec: LDPC: Adding 3 LDPC-related xml files for GRC., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 14/39: fec: LDPC: Reducing complexity of encoder by adding back solve., git, 2015/10/15