3 * Copyright 2006 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
23 #include "encoder_convolutional.h"
24 #include <qa_encoder_convolutional_ic1_ic1.h>
25 #include <cppunit/TestAssert.h>
31 #define DO_PRINT_DEBUG 0
33 // test number counter
35 static size_t g_t_num = 0;
38 qa_encoder_convolutional_ic1_ic1::do_encoder_check
39 (bool use_encode_in_or_out,
42 const size_t n_io_items,
43 const size_t* n_input_items,
44 const size_t* n_output_items,
45 const size_t block_size_bits,
46 const size_t n_code_inputs,
47 const size_t n_code_outputs,
48 const int* code_generators,
49 const int* code_feedback,
50 const bool do_termination,
51 const size_t start_state,
52 const size_t term_state,
53 const int encode_soai)
56 std::cout << "Starting Test " << g_t_num << "\n";
58 std::vector<int> t_code_generators;
59 t_code_generators.assign (n_code_inputs * n_code_outputs, 0);
60 for (size_t m = 0; m < (n_code_inputs * n_code_outputs); m++)
61 t_code_generators[m] = code_generators[m];
63 encoder_convolutional* t_encoder;
66 std::vector<int> t_code_feedback;
67 t_code_feedback.assign (n_code_inputs * n_code_outputs, 0);
68 for (size_t m = 0; m < (n_code_inputs * n_code_outputs); m++)
69 t_code_feedback[m] = code_feedback[m];
71 t_encoder = new encoder_convolutional
81 t_encoder = new encoder_convolutional
91 size_t t_total_n_input_items = 0;
92 size_t t_total_n_output_items = 0;
93 for (size_t m = 0; m < n_io_items; m++) {
94 t_total_n_input_items += n_input_items[m];
95 t_total_n_output_items += n_output_items[m];
98 code_input_ic1l* t_c_in = new code_input_ic1l (n_code_inputs);
99 t_c_in->set_buffer ((void**) c_in, t_total_n_input_items);
101 char** t_out = new char*[n_code_outputs];
102 for (size_t m = 0; m < n_code_outputs; m++) {
103 t_out[m] = new char[t_total_n_output_items];
106 code_output_ic1l* t_c_out = new code_output_ic1l (n_code_outputs);
107 t_c_out->set_buffer ((void**) t_out, t_total_n_output_items);
109 bool t_errors = false;
111 for (size_t m = 0; m < n_io_items; m++) {
112 if (use_encode_in_or_out == true) {
113 size_t t_n_output_items_used = t_encoder->encode (t_c_in,
116 if (t_n_output_items_used != n_output_items[m]) {
117 std::cout << "Test " << g_t_num << ": Encode[" << m <<
118 "]{input}: Warning: Number of returned output items (" <<
119 t_n_output_items_used << ") is not as expected (" <<
120 n_output_items[m] << ").\n";
124 size_t t_n_input_items_used = t_encoder->encode (t_c_in,
127 if (t_n_input_items_used != n_input_items[m]) {
128 std::cout << "Test " << g_t_num << ": Encode[" << m <<
129 "]{output}: Warning: Number of returned output items (" <<
130 t_n_input_items_used << ") is not as expected (" <<
131 n_input_items[m] << ").\n";
137 for (size_t m = 0; m < n_code_outputs; m++) {
138 for (size_t n = 0; n < t_total_n_output_items; n++) {
139 if (c_res[m][n] != t_out[m][n]) {
140 std::cout << "Test " << g_t_num << ": Item [" << m <<
141 "][" << n << "] not equal: des = " << (int)(c_res[m][n]) <<
142 ", act = " << (int)(t_out[m][n]) << "\n";
148 if (encode_soai != -1) {
149 // verify that the internal realization is correct
150 if (encode_soai != t_encoder->do_encode_soai ()) {
155 CPPUNIT_ASSERT_EQUAL (t_errors, false);
164 for (size_t m = 0; m < n_code_outputs; m++) {
171 // increment the test number
176 // TESTS 0 through 22 use do_encode_in_or_out as false
178 static const bool g_do_encode_in_or_out_0_22 = false;
183 // SIAO realization (implicitely)
184 // start state is 0, no feedback, no termination
186 const static int t0_code_generator[] = {1, 0, 5, 0, 1, 6};
187 const static size_t t0_encode_soai = 0;
189 const static char t0_in_0[] =
190 {0, 1, 0, 0, 1, 0, 1, 0, 0, 0};
191 const static char t0_in_1[] =
192 {0, 1, 0, 0, 0, 1, 1, 0, 0, 0};
193 const static char t0_in_2[] =
194 {0, 0, 1, 1, 1, 1, 1, 0, 0, 0};
195 const static char* t0_in[] =
196 {t0_in_0, t0_in_1, t0_in_2};
198 const static size_t t0_n_input_items = sizeof (t0_in_0);
199 const static size_t t0_n_code_inputs = sizeof (t0_in) / sizeof (char*);
201 const static char t0_res_0[] =
202 {0, 1, 1, 1, 1, 0, 1, 1, 1, 0};
203 const static char t0_res_1[] =
204 {0, 1, 0, 1, 0, 1, 1, 0, 1, 0};
205 const static char* t0_res[] =
206 {t0_res_0, t0_res_1};
208 const static size_t t0_n_output_items = sizeof (t0_res_0);
209 const static size_t t0_n_code_outputs = sizeof (t0_res) / sizeof (char*);
212 qa_encoder_convolutional_ic1_ic1::t0
215 do_encoder_check (g_do_encode_in_or_out_0_22,
216 (const char**) t0_in, (const char**) t0_res,
217 1, (const size_t*) &t0_n_input_items,
218 (const size_t*) &t0_n_output_items, 100,
219 t0_n_code_inputs, t0_n_code_outputs,
220 (const int*) t0_code_generator,
221 0, true, 0, 0, t0_encode_soai);
226 // checking for SIAO realization (implicitely)
227 // start state is 0, no feedback, no termination
229 const static int t1_code_generator[] = {1, 0, 0, 1, 5, 6};
230 const static size_t t1_encode_soai = 1;
232 const static char t1_in_0[] =
233 {0, 1, 1, 1, 0, 0, 0, 1, 0};
234 const static char t1_in_1[] =
235 {0, 0, 0, 0, 0, 1, 1, 1, 0};
236 const static char* t1_in[] =
239 const static size_t t1_n_input_items = sizeof (t1_in_0);
240 const static size_t t1_n_code_inputs = sizeof (t1_in) / sizeof (char*);
242 const static char t1_res_0[] =
243 {0, 1, 1, 1, 0, 0, 0, 1, 0};
244 const static char t1_res_1[] =
245 {0, 0, 0, 0, 0, 1, 1, 1, 0};
246 const static char t1_res_2[] =
247 {0, 1, 1, 0, 1, 1, 1, 1, 0};
248 const static char* t1_res[] =
249 {t1_res_0, t1_res_1, t1_res_2};
251 const static size_t t1_n_output_items = sizeof (t1_res_0);
252 const static size_t t1_n_code_outputs = sizeof (t1_res) / sizeof (char*);
255 qa_encoder_convolutional_ic1_ic1::t1
258 do_encoder_check (g_do_encode_in_or_out_0_22,
259 (const char**) t1_in, (const char**) t1_res,
260 1, (const size_t*) &t1_n_input_items,
261 (const size_t*) &t1_n_output_items, 100,
262 t1_n_code_inputs, t1_n_code_outputs,
263 (const int*) t1_code_generator,
264 0, true, 0, 0, t1_encode_soai);
269 // checking for SOAI realization (implicitely)
270 // start state is 0, same feedback, no termination
272 const static int t2_code_generator[] = {1, 0, 0, 1, 5, 6};
273 const static int t2_code_feedback[] = {0, 0, 0, 0, 7, 7};
274 const static int t2_encode_soai = 1;
276 const static char t2_in_0[] =
277 {0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0};
278 const static char t2_in_1[] =
279 {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0};
280 const static char* t2_in[] =
283 const static size_t t2_n_input_items = sizeof (t2_in_0);
284 const static size_t t2_n_code_inputs = sizeof (t2_in) / sizeof (char*);
286 const static char t2_res_0[] =
287 {0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0};
288 const static char t2_res_1[] =
289 {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0};
290 const static char t2_res_2[] =
291 {0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0};
292 const static char* t2_res[] =
293 {t2_res_0, t2_res_1, t2_res_2};
295 const static size_t t2_n_output_items = sizeof (t2_res_0);
296 const static size_t t2_n_code_outputs = sizeof (t2_res) / sizeof (char*);
299 qa_encoder_convolutional_ic1_ic1::t2
302 do_encoder_check (g_do_encode_in_or_out_0_22,
303 (const char**) t2_in, (const char**) t2_res,
304 1, (const size_t*) &t2_n_input_items,
305 (const size_t*) &t2_n_output_items, 100,
306 t2_n_code_inputs, t2_n_code_outputs,
307 (const int*) t2_code_generator,
308 (const int*) t2_code_feedback,
309 true, 0, 0, t2_encode_soai);
314 // checking for SIAO realization (implicitely)
315 // start state is 0, same feedback, no termination
317 const static int t3_code_generator[] = {1, 0, 5, 0, 1, 6};
318 const static int t3_code_feedback[] = {0, 0, 7, 0, 0, 7};
319 const static int t3_encode_soai = 0;
321 const static char t3_in_0[] =
322 {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0};
323 const static char t3_in_1[] =
324 {0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
325 const static char t3_in_2[] =
326 {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0};
327 const static char* t3_in[] =
328 {t3_in_0, t3_in_1, t3_in_2};
330 const static size_t t3_n_input_items = sizeof (t3_in_0);
331 const static size_t t3_n_code_inputs = sizeof (t3_in) / sizeof (char*);
333 const static char t3_res_0[] =
334 {0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0};
335 const static char t3_res_1[] =
336 {0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0};
337 const static char* t3_res[] =
338 {t3_res_0, t3_res_1};
340 const static size_t t3_n_output_items = sizeof (t3_res_0);
341 const static size_t t3_n_code_outputs = sizeof (t3_res) / sizeof (char*);
344 qa_encoder_convolutional_ic1_ic1::t3
347 do_encoder_check (g_do_encode_in_or_out_0_22,
348 (const char**) t3_in, (const char**) t3_res,
349 1, (const size_t*) &t3_n_input_items,
350 (const size_t*) &t3_n_output_items, 100,
351 t3_n_code_inputs, t3_n_code_outputs,
352 (const int*) t3_code_generator,
353 (const int*) t3_code_feedback,
354 true, 0, 0, t3_encode_soai);
359 // checking for SIAO realization (implicitely),
360 // start state is 0, different feedbacks, no termination
362 const static int t4_code_generator[] = {1, 4, 0, 3, 1, 6};
363 const static int t4_code_feedback[] = {0, 7, 0, 5, 0, 5};
364 const static int t4_encode_soai = 0;
366 const static char t4_in_0[] =
367 {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0};
368 const static char t4_in_1[] =
369 {0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0};
370 const static char* t4_in[] =
373 const static size_t t4_n_input_items = sizeof (t4_in_0);
374 const static size_t t4_n_code_inputs = sizeof (t4_in) / sizeof (char*);
376 const static char t4_res_0[] =
377 {0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0};
378 const static char t4_res_1[] =
379 {0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0};
380 const static char t4_res_2[] =
381 {0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0};
382 const static char* t4_res[] =
383 {t4_res_0, t4_res_1, t4_res_2};
385 const static size_t t4_n_output_items = sizeof (t4_res_0);
386 const static size_t t4_n_code_outputs = sizeof (t4_res) / sizeof (char*);
389 qa_encoder_convolutional_ic1_ic1::t4
392 do_encoder_check (g_do_encode_in_or_out_0_22,
393 (const char**) t4_in, (const char**) t4_res,
394 1, (const size_t*) &t4_n_input_items,
395 (const size_t*) &t4_n_output_items, 100,
396 t4_n_code_inputs, t4_n_code_outputs,
397 (const int*) t4_code_generator,
398 (const int*) t4_code_feedback,
399 true, 0, 0, t4_encode_soai);
404 // checking for SOAI realization (implicitely),
405 // with different feedbacks, no termination
407 const static int t5_code_generator[] = {1, 0, 1, 4, 3, 6};
408 const static int t5_code_feedback[] = {0, 0, 0, 5, 7, 7};
409 const static int t5_encode_soai = 1;
411 const static char t5_in_0[] =
412 {0, 1, 0, 0, 0, 1, 0, 0, 1};
413 const static char t5_in_1[] =
414 {0, 0, 1, 0, 1, 1, 0, 0, 1};
415 const static char t5_in_2[] =
416 {0, 0, 0, 1, 0, 0, 0, 0, 1};
417 const static char* t5_in[] =
418 {t5_in_0, t5_in_1, t5_in_2};
420 const static size_t t5_n_input_items = sizeof (t5_in_0);
421 const static size_t t5_n_code_inputs = sizeof (t5_in) / sizeof (char*);
423 const static char t5_res_0[] =
424 {0, 1, 0, 1, 0, 1, 0, 0, 0};
425 const static char t5_res_1[] =
426 {0, 0, 1, 1, 1, 1, 0, 0, 1};
427 const static char* t5_res[] =
428 {t5_res_0, t5_res_1};
430 const static size_t t5_n_output_items = sizeof (t5_res_0);
431 const static size_t t5_n_code_outputs = sizeof (t5_res) / sizeof (char*);
434 qa_encoder_convolutional_ic1_ic1::t5
437 do_encoder_check (g_do_encode_in_or_out_0_22,
438 (const char**) t5_in, (const char**) t5_res,
439 1, (const size_t*) &t5_n_input_items,
440 (const size_t*) &t5_n_output_items, 100,
441 t5_n_code_inputs, t5_n_code_outputs,
442 (const int*) t5_code_generator,
443 (const int*) t5_code_feedback, true,
444 0, 0, t5_encode_soai);
450 // start state is 0, no feedback, termination to 0 state
452 const static int t6_code_generator[] = {1, 0, 5, 0, 1, 6};
454 const static char t6_in_0[] =
456 const static char t6_in_1[] =
458 const static char t6_in_2[] =
460 const static char* t6_in[] =
461 {t6_in_0, t6_in_1, t6_in_2};
463 const static size_t t6_n_input_items = sizeof (t6_in_0);
464 const static size_t t6_n_code_inputs = sizeof (t6_in) / sizeof (char*);
466 const static char t6_res_0[] =
467 {0, 1, 1, 1, 1, 1, 1, 0};
468 const static char t6_res_1[] =
469 {0, 1, 0, 1, 0, 0, 1, 0};
470 const static char* t6_res[] =
471 {t6_res_0, t6_res_1};
473 const static size_t t6_n_output_items = sizeof (t6_res_0);
474 const static size_t t6_n_code_outputs = sizeof (t6_res) / sizeof (char*);
477 qa_encoder_convolutional_ic1_ic1::t6
480 do_encoder_check (g_do_encode_in_or_out_0_22,
481 (const char**) t6_in, (const char**) t6_res,
482 1, (const size_t*) &t6_n_input_items,
483 (const size_t*) &t6_n_output_items, 5, t6_n_code_inputs,
484 t6_n_code_outputs, (const int*) t6_code_generator);
490 // start state is 0, same feedback, termination to 0 state
491 // # of termination bits = 2
493 const static int t7_code_generator[] = {1, 0, 5, 0, 1, 6};
494 const static int t7_code_feedback[] = {0, 0, 7, 0, 0, 7};
496 const static char t7_in_0[] =
497 {0, 1, 1, 0, 0, 0, 0};
498 const static char t7_in_1[] =
499 {0, 1, 0, 1, 0, 0, 0};
500 const static char t7_in_2[] =
501 {0, 0, 0, 0, 1, 0, 1};
502 const static char* t7_in[] =
503 {t7_in_0, t7_in_1, t7_in_2};
505 const static size_t t7_n_input_items = sizeof (t7_in_0);
506 const static size_t t7_n_code_inputs = sizeof (t7_in) / sizeof (char*);
508 const static char t7_res_0[] =
509 {0, 1, 1, 0, 1, 0, 1, 0, 1};
510 const static char t7_res_1[] =
511 {0, 1, 0, 1, 0, 1, 1, 0, 0};
512 const static char* t7_res[] =
513 {t7_res_0, t7_res_1};
515 const static size_t t7_n_output_items = sizeof (t7_res_0);
516 const static size_t t7_n_code_outputs = sizeof (t7_res) / sizeof (char*);
519 qa_encoder_convolutional_ic1_ic1::t7
522 do_encoder_check (g_do_encode_in_or_out_0_22,
523 (const char**) t7_in, (const char**) t7_res,
524 1, (const size_t*) &t7_n_input_items,
525 (const size_t*) &t7_n_output_items, 5, t7_n_code_inputs,
526 t7_n_code_outputs, (const int*) t7_code_generator,
527 (const int*) t7_code_feedback);
533 // state state is 0, different feedbacks, termination to 0 state
534 // # of term bits will be 4
536 const static int t8_code_generator[] = {1, 4, 0, 3, 1, 6};
537 const static int t8_code_feedback[] = {0, 5, 0, 7, 0, 7};
539 const static char t8_in_0[] =
540 {0, 1, 0, 0, 0, 1, 0, 1, 1};
541 const static char t8_in_1[] =
542 {0, 0, 0, 1, 1, 1, 0, 1, 0};
543 const static char* t8_in[] =
546 const static size_t t8_n_input_items = sizeof (t8_in_0);
547 const static size_t t8_n_code_inputs = sizeof (t8_in) / sizeof (char*);
549 const static char t8_res_0[] =
550 {0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1};
551 const static char t8_res_1[] =
552 {0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0};
553 const static char t8_res_2[] =
554 {0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0};
555 const static char* t8_res[] =
556 {t8_res_0, t8_res_1, t8_res_2};
558 const static size_t t8_n_output_items = sizeof (t8_res_0);
559 const static size_t t8_n_code_outputs = sizeof (t8_res) / sizeof (char*);
562 qa_encoder_convolutional_ic1_ic1::t8
565 do_encoder_check (g_do_encode_in_or_out_0_22,
566 (const char**) t8_in, (const char**) t8_res,
567 1, (const size_t*) &t8_n_input_items,
568 (const size_t*) &t8_n_output_items, 6, t8_n_code_inputs,
569 t8_n_code_outputs, (const int*) t8_code_generator,
570 (const int*) t8_code_feedback);
576 // start state is 0, different feedbacks, termination to non-0 state
577 // # of term bits will be 2
579 const static int t9_code_generator[] = {1, 0, 1, 4, 3, 6};
580 const static int t9_code_feedback[] = {0, 0, 0, 5, 7, 7};
581 const static size_t t9_term_state = 4;
583 const static char t9_in_0[] =
584 {0, 1, 0, 0, 0, 0, 1};
585 const static char t9_in_1[] =
586 {0, 0, 1, 0, 1, 0, 1};
587 const static char t9_in_2[] =
588 {0, 0, 0, 1, 0, 0, 1};
589 const static char* t9_in[] =
590 {t9_in_0, t9_in_1, t9_in_2};
592 const static size_t t9_n_input_items = sizeof (t9_in_0);
593 const static size_t t9_n_code_inputs = sizeof (t9_in) / sizeof (char*);
595 const static char t9_res_0[] =
596 {0, 1, 0, 1, 0, 1, 1, 0, 0};
597 const static char t9_res_1[] =
598 {0, 0, 1, 1, 1, 1, 1, 0, 1};
599 const static char* t9_res[] =
600 {t9_res_0, t9_res_1};
602 const static size_t t9_n_output_items = sizeof (t9_res_0);
603 const static size_t t9_n_code_outputs = sizeof (t9_res) / sizeof (char*);
606 qa_encoder_convolutional_ic1_ic1::t9
609 do_encoder_check (g_do_encode_in_or_out_0_22,
610 (const char**) t9_in, (const char**) t9_res,
611 1, (const size_t*) &t9_n_input_items,
612 (const size_t*) &t9_n_output_items, 5, t9_n_code_inputs,
613 t9_n_code_outputs, (const int*) t9_code_generator,
614 (const int*) t9_code_feedback, true, 0, t9_term_state);
619 // checking for termination to non-0 state, no feedback
621 const static int t10_code_generator[] = {1, 0, 3, 0, 1, 6};
622 const static size_t t10_term_state = 2;
624 const static char t10_in_0[] =
625 {0, 1, 0, 1, 0, 0, 1, 1};
626 const static char t10_in_1[] =
627 {0, 1, 0, 0, 1, 0, 1, 1};
628 const static char t10_in_2[] =
629 {0, 1, 0, 1, 1, 0, 0, 1};
630 const static char* t10_in[] =
631 {t10_in_0, t10_in_1, t10_in_2};
633 const static size_t t10_n_input_items = sizeof (t10_in_0);
634 const static size_t t10_n_code_inputs = sizeof (t10_in) / sizeof (char*);
636 const static char t10_res_0[] =
637 {0, 0, 1, 0, 0, 0, 1, 0, 1, 0};
638 const static char t10_res_1[] =
639 {0, 1, 1, 1, 0, 0, 0, 0, 1, 1};
640 const static char* t10_res[] =
641 {t10_res_0, t10_res_1};
643 const static size_t t10_n_output_items = sizeof (t10_res_0);
644 const static size_t t10_n_code_outputs = sizeof (t10_res) / sizeof (char*);
647 qa_encoder_convolutional_ic1_ic1::t10
650 do_encoder_check (g_do_encode_in_or_out_0_22,
651 (const char**) t10_in, (const char**) t10_res,
652 1, (const size_t*) &t10_n_input_items,
653 (const size_t*) &t10_n_output_items, 5,
654 t10_n_code_inputs, t10_n_code_outputs,
655 (const int*) t10_code_generator,
656 0, true, 0, t10_term_state);
662 // start state is not 0, no feedback, terminating to 0 state
664 const static int t11_code_generator[] = {1, 0, 3, 0, 1, 6};
665 const static size_t t11_start_state = 1;
667 const static char t11_in_0[] =
668 {0, 1, 0, 0, 0, 1, 0};
669 const static char t11_in_1[] =
670 {0, 0, 1, 0, 0, 1, 0};
671 const static char t11_in_2[] =
672 {0, 1, 1, 1, 0, 1, 1};
673 const static char* t11_in[] =
674 {t11_in_0, t11_in_1, t11_in_2};
676 const static size_t t11_n_input_items = sizeof (t11_in_0);
677 const static size_t t11_n_code_inputs = sizeof (t11_in) / sizeof (char*);
679 const static char t11_res_0[] =
680 {1, 0, 0, 0, 1, 0, 0, 1, 0};
681 const static char t11_res_1[] =
682 {1, 1, 0, 0, 0, 1, 0, 0, 0};
683 const static char* t11_res[] =
684 {t11_res_0, t11_res_1};
686 const static size_t t11_n_output_items = sizeof (t11_res_0);
687 const static size_t t11_n_code_outputs = sizeof (t11_res) / sizeof (char*);
690 qa_encoder_convolutional_ic1_ic1::t11
693 do_encoder_check (g_do_encode_in_or_out_0_22,
694 (const char**) t11_in, (const char**) t11_res,
695 1, (const size_t*) &t11_n_input_items,
696 (const size_t*) &t11_n_output_items, 5,
697 t11_n_code_inputs, t11_n_code_outputs,
698 (const int*) t11_code_generator,
699 0, true, t11_start_state);
705 // start state is not 0, no feedback, terminating to non-0 state
707 const static int t12_code_generator[] = {1, 0, 3, 0, 1, 6};
708 const static size_t t12_start_state = 2;
709 const static size_t t12_term_state = 2;
711 const static char t12_in_0[] =
712 {0, 1, 1, 1, 0, 1, 0};
713 const static char t12_in_1[] =
714 {0, 1, 0, 0, 0, 0, 1};
715 const static char t12_in_2[] =
716 {0, 1, 1, 0, 1, 0, 1};
717 const static char* t12_in[] =
718 {t12_in_0, t12_in_1, t12_in_2};
720 const static size_t t12_n_input_items = sizeof (t12_in_0);
721 const static size_t t12_n_code_inputs = sizeof (t12_in) / sizeof (char*);
723 const static char t12_res_0[] =
724 {0, 0, 1, 0, 1, 0, 1, 1, 1};
725 const static char t12_res_1[] =
726 {1, 1, 1, 0, 1, 1, 0, 1, 1};
727 const static char* t12_res[] =
728 {t12_res_0, t12_res_1};
730 const static size_t t12_n_output_items = sizeof (t12_res_0);
731 const static size_t t12_n_code_outputs = sizeof (t12_res) / sizeof (char*);
734 qa_encoder_convolutional_ic1_ic1::t12
737 do_encoder_check (g_do_encode_in_or_out_0_22,
738 (const char**) t12_in, (const char**) t12_res,
739 1, (const size_t*) &t12_n_input_items,
740 (const size_t*) &t12_n_output_items, 5, t12_n_code_inputs,
741 t12_n_code_outputs, (const int*) t12_code_generator,
742 0, true, t12_start_state, t12_term_state);
748 // start state is not 0, any feedback, termination to 0 state
750 const static int t13_code_generator[] = {1, 0, 5, 0, 1, 6};
751 const static int t13_code_feedback[] = {0, 0, 7, 0, 0, 7};
752 const static size_t t13_start_state = 2;
753 const static size_t t13_term_state = 0;
755 const static char t13_in_0[] =
756 {0, 1, 0, 0, 0, 1, 0};
757 const static char t13_in_1[] =
758 {0, 0, 1, 1, 0, 1, 0};
759 const static char t13_in_2[] =
760 {0, 0, 0, 0, 1, 0, 0};
761 const static char* t13_in[] =
762 {t13_in_0, t13_in_1, t13_in_2};
764 const static size_t t13_n_input_items = sizeof (t13_in_0);
765 const static size_t t13_n_code_inputs = sizeof (t13_in) / sizeof (char*);
767 const static char t13_res_0[] =
768 {0, 0, 1, 0, 0, 1, 0, 1, 1};
769 const static char t13_res_1[] =
770 {1, 1, 1, 0, 1, 1, 0, 0, 1};
771 const static char* t13_res[] =
772 {t13_res_0, t13_res_1};
774 const static size_t t13_n_output_items = sizeof (t13_res_0);
775 const static size_t t13_n_code_outputs = sizeof (t13_res) / sizeof (char*);
778 qa_encoder_convolutional_ic1_ic1::t13
781 do_encoder_check (g_do_encode_in_or_out_0_22,
782 (const char**) t13_in, (const char**) t13_res,
783 1, (const size_t*) &t13_n_input_items,
784 (const size_t*) &t13_n_output_items, 5,
785 t13_n_code_inputs, t13_n_code_outputs,
786 (const int*) t13_code_generator,
787 (const int*) t13_code_feedback,
788 true, t13_start_state, t13_term_state);
794 // start state is not 0, any feedback, termination to non-zero state
796 const static int t14_code_generator[] = {1, 0, 5, 0, 1, 6};
797 const static int t14_code_feedback[] = {0, 0, 7, 0, 0, 7};
798 const static size_t t14_start_state = 1;
799 const static size_t t14_term_state = 2;
801 const static char t14_in_0[] =
802 {0, 1, 0, 1, 0, 1, 0};
803 const static char t14_in_1[] =
804 {0, 0, 0, 0, 1, 1, 0};
805 const static char t14_in_2[] =
806 {0, 1, 0, 0, 0, 1, 1};
807 const static char* t14_in[] =
808 {t14_in_0, t14_in_1, t14_in_2};
810 const static size_t t14_n_input_items = sizeof (t14_in_0);
811 const static size_t t14_n_code_inputs = sizeof (t14_in) / sizeof (char*);
813 const static char t14_res_0[] =
814 {1, 1, 1, 1, 1, 0, 1, 1, 1};
815 const static char t14_res_1[] =
816 {1, 0, 0, 1, 0, 0, 0, 0, 1};
817 const static char* t14_res[] =
818 {t14_res_0, t14_res_1};
820 const static size_t t14_n_output_items = sizeof (t14_res_0);
821 const static size_t t14_n_code_outputs = sizeof (t14_res) / sizeof (char*);
824 qa_encoder_convolutional_ic1_ic1::t14
827 do_encoder_check (g_do_encode_in_or_out_0_22,
828 (const char**) t14_in, (const char**) t14_res,
829 1, (const size_t*) &t14_n_input_items,
830 (const size_t*) &t14_n_output_items, 5,
831 t14_n_code_inputs, t14_n_code_outputs,
832 (const int*) t14_code_generator,
833 (const int*) t14_code_feedback,
834 true, t14_start_state, t14_term_state);
840 // no feedback, block coding but no termination
842 const static int t15_code_generator[] = {1, 0, 3, 0, 1, 6};
844 const static char t15_in_0[] =
845 {0, 1, 0, 1, 0, 0, 1, 1};
846 const static char t15_in_1[] =
847 {0, 1, 0, 0, 1, 0, 1, 1};
848 const static char t15_in_2[] =
849 {0, 1, 0, 1, 1, 0, 0, 1};
850 const static char* t15_in[] =
851 {t15_in_0, t15_in_1, t15_in_2};
853 const static size_t t15_n_input_items = sizeof (t15_in_0);
854 const static size_t t15_n_code_inputs = sizeof (t15_in) / sizeof (char*);
856 const static char t15_res_0[] =
857 {0, 0, 1, 0, 0, 0, 1, 0};
858 const static char t15_res_1[] =
859 {0, 1, 1, 1, 0, 0, 1, 1};
860 const static char* t15_res[] =
861 {t15_res_0, t15_res_1};
863 const static size_t t15_n_output_items = sizeof (t15_res_0);
864 const static size_t t15_n_code_outputs = sizeof (t15_res) / sizeof (char*);
867 qa_encoder_convolutional_ic1_ic1::t15
870 do_encoder_check (g_do_encode_in_or_out_0_22,
871 (const char**) t15_in, (const char**) t15_res,
872 1, (const size_t*) &t15_n_input_items,
873 (const size_t*) &t15_n_output_items, 5,
874 t15_n_code_inputs, t15_n_code_outputs,
875 (const int*) t15_code_generator, 0, false);
881 // start state is 0, same feedback, block but no termination
883 const static int t16_code_generator[] = {1, 0, 5, 0, 1, 6};
884 const static int t16_code_feedback[] = {0, 0, 7, 0, 0, 7};
886 const static char t16_in_0[] =
887 {0, 1, 1, 0, 0, 0, 0};
888 const static char t16_in_1[] =
889 {0, 1, 0, 1, 0, 0, 0};
890 const static char t16_in_2[] =
891 {0, 0, 0, 0, 1, 0, 1};
892 const static char* t16_in[] =
893 {t16_in_0, t16_in_1, t16_in_2};
895 const static size_t t16_n_input_items = sizeof (t16_in_0);
896 const static size_t t16_n_code_inputs = sizeof (t16_in) / sizeof (char*);
898 const static char t16_res_0[] =
899 {0, 1, 1, 0, 1, 0, 1};
900 const static char t16_res_1[] =
901 {0, 1, 0, 1, 0, 0, 0};
902 const static char* t16_res[] =
903 {t16_res_0, t16_res_1};
905 const static size_t t16_n_output_items = sizeof (t16_res_0);
906 const static size_t t16_n_code_outputs = sizeof (t16_res) / sizeof (char*);
909 qa_encoder_convolutional_ic1_ic1::t16
912 do_encoder_check (g_do_encode_in_or_out_0_22,
913 (const char**) t16_in, (const char**) t16_res,
914 1, (const size_t*) &t16_n_input_items,
915 (const size_t*) &t16_n_output_items, 5, t16_n_code_inputs,
916 t16_n_code_outputs, (const int*) t16_code_generator,
917 (const int*) t16_code_feedback, false);
923 // state state is 0, different feedbacks, block but no termination
925 const static int t17_code_generator[] = {1, 4, 0, 3, 1, 6};
926 const static int t17_code_feedback[] = {0, 5, 0, 7, 0, 7};
928 const static char t17_in_0[] =
929 {0, 1, 0, 0, 0, 1, 0, 1, 1};
930 const static char t17_in_1[] =
931 {0, 0, 0, 1, 1, 1, 0, 1, 0};
932 const static char* t17_in[] =
933 {t17_in_0, t17_in_1};
935 const static size_t t17_n_input_items = sizeof (t17_in_0);
936 const static size_t t17_n_code_inputs = sizeof (t17_in) / sizeof (char*);
938 const static char t17_res_0[] =
939 {0, 1, 0, 0, 0, 0, 0, 1, 1};
940 const static char t17_res_1[] =
941 {0, 0, 0, 1, 1, 0, 0, 1, 0};
942 const static char t17_res_2[] =
943 {0, 1, 0, 0, 1, 0, 0, 1, 0};
944 const static char* t17_res[] =
945 {t17_res_0, t17_res_1, t17_res_2};
947 const static size_t t17_n_output_items = sizeof (t17_res_0);
948 const static size_t t17_n_code_outputs = sizeof (t17_res) / sizeof (char*);
951 qa_encoder_convolutional_ic1_ic1::t17
954 do_encoder_check (g_do_encode_in_or_out_0_22,
955 (const char**) t17_in, (const char**) t17_res,
956 1, (const size_t*) &t17_n_input_items,
957 (const size_t*) &t17_n_output_items, 6, t17_n_code_inputs,
958 t17_n_code_outputs, (const int*) t17_code_generator,
959 (const int*) t17_code_feedback, false);
965 // start state is not 0, no feedback, terminating to non-0 state
966 // multi-encode, stop output before term bits
968 const static int t18_code_generator[] = {1, 0, 3, 0, 1, 6};
969 const static size_t t18_start_state = 2;
970 const static size_t t18_term_state = 2;
972 const static char t18_in_0[] =
973 {0, 1, 1, 1, 0, 1, 0};
974 const static char t18_in_1[] =
975 {0, 1, 0, 0, 0, 0, 1};
976 const static char t18_in_2[] =
977 {0, 1, 1, 0, 1, 0, 1};
978 const static char* t18_in[] =
979 {t18_in_0, t18_in_1, t18_in_2};
981 const static size_t t18_n_input_items[] = {3, 2, 2};
982 const static size_t t18_n_io_items = (sizeof (t18_n_input_items) /
984 const static size_t t18_n_code_inputs = sizeof (t18_in) / sizeof (char*);
986 const static char t18_res_0[] =
987 {0, 0, 1, 0, 1, 0, 1, 1, 1};
988 const static char t18_res_1[] =
989 {1, 1, 1, 0, 1, 1, 0, 1, 1};
990 const static char* t18_res[] =
991 {t18_res_0, t18_res_1};
993 const static size_t t18_n_output_items[] = {3, 2, 4};
994 const static size_t t18_n_code_outputs = sizeof (t18_res) / sizeof (char*);
997 qa_encoder_convolutional_ic1_ic1::t18
1000 do_encoder_check (g_do_encode_in_or_out_0_22,
1001 (const char**) t18_in, (const char**) t18_res,
1002 t18_n_io_items, (const size_t*) t18_n_input_items,
1003 (const size_t*) t18_n_output_items, 5, t18_n_code_inputs,
1004 t18_n_code_outputs, (const int*) t18_code_generator,
1005 0, true, t18_start_state, t18_term_state);
1011 // start state is not 0, any feedback, termination to non-zero state
1012 // multi-encode, stop output in the middle of term bits
1014 const static int t19_code_generator[] = {1, 0, 5, 0, 1, 6};
1015 const static int t19_code_feedback[] = {0, 0, 7, 0, 0, 7};
1016 const static size_t t19_start_state = 1;
1017 const static size_t t19_term_state = 2;
1019 const static char t19_in_0[] =
1020 {0, 1, 0, 1, 0, 1, 0};
1021 const static char t19_in_1[] =
1022 {0, 0, 0, 0, 1, 1, 0};
1023 const static char t19_in_2[] =
1024 {0, 1, 0, 0, 0, 1, 1};
1025 const static char* t19_in[] =
1026 {t19_in_0, t19_in_1, t19_in_2};
1028 const static size_t t19_n_input_items[] = {2, 2, 1, 1, 1};
1029 const static size_t t19_n_io_items = (sizeof (t19_n_input_items) /
1031 const static size_t t19_n_code_inputs = sizeof (t19_in) / sizeof (char*);
1033 const static char t19_res_0[] =
1034 {1, 1, 1, 1, 1, 0, 1, 1, 1};
1035 const static char t19_res_1[] =
1036 {1, 0, 0, 1, 0, 0, 0, 0, 1};
1037 const static char* t19_res[] =
1038 {t19_res_0, t19_res_1};
1040 const static size_t t19_n_output_items[] = {2, 2, 2, 2, 1};
1041 const static size_t t19_n_code_outputs = sizeof (t19_res) / sizeof (char*);
1044 qa_encoder_convolutional_ic1_ic1::t19
1047 do_encoder_check (g_do_encode_in_or_out_0_22,
1048 (const char**) t19_in, (const char**) t19_res,
1049 1, (const size_t*) &t19_n_input_items,
1050 (const size_t*) &t19_n_output_items, 5,
1051 t19_n_code_inputs, t19_n_code_outputs,
1052 (const int*) t19_code_generator,
1053 (const int*) t19_code_feedback,
1054 true, t19_start_state, t19_term_state);
1060 // no feedback, block coding but no termination
1063 const static int t20_code_generator[] = {1, 0, 3, 0, 1, 6};
1065 const static char t20_in_0[] =
1066 {0, 1, 0, 1, 0, 0, 1, 1};
1067 const static char t20_in_1[] =
1068 {0, 1, 0, 0, 1, 0, 1, 1};
1069 const static char t20_in_2[] =
1070 {0, 1, 0, 1, 1, 0, 0, 1};
1071 const static char* t20_in[] =
1072 {t20_in_0, t20_in_1, t20_in_2};
1074 const static size_t t20_n_input_items[] = {2, 2, 2, 2};
1075 const static size_t t20_n_n_input_items = (sizeof (t20_n_input_items) /
1077 const static size_t t20_n_code_inputs = sizeof (t20_in) / sizeof (char*);
1079 const static char t20_res_0[] =
1080 {0, 0, 1, 0, 0, 0, 1, 0};
1081 const static char t20_res_1[] =
1082 {0, 1, 1, 1, 0, 0, 1, 1};
1083 const static char* t20_res[] =
1084 {t20_res_0, t20_res_1};
1086 const static size_t t20_n_output_items[] = {2, 2, 2, 2};
1087 const static size_t t20_n_code_outputs = sizeof (t20_res) / sizeof (char*);
1090 qa_encoder_convolutional_ic1_ic1::t20
1093 do_encoder_check (g_do_encode_in_or_out_0_22,
1094 (const char**) t20_in, (const char**) t20_res,
1095 t20_n_n_input_items, (const size_t*) t20_n_input_items,
1096 (const size_t*) t20_n_output_items, 5,
1097 t20_n_code_inputs, t20_n_code_outputs,
1098 (const int*) t20_code_generator, 0, false);
1104 // start state is 0, same feedback, block but no termination
1107 const static int t21_code_generator[] = {1, 0, 5, 0, 1, 6};
1108 const static int t21_code_feedback[] = {0, 0, 7, 0, 0, 7};
1110 const static char t21_in_0[] =
1111 {0, 1, 1, 0, 0, 0, 0};
1112 const static char t21_in_1[] =
1113 {0, 1, 0, 1, 0, 0, 0};
1114 const static char t21_in_2[] =
1115 {0, 0, 0, 0, 1, 0, 1};
1116 const static char* t21_in[] =
1117 {t21_in_0, t21_in_1, t21_in_2};
1119 const static size_t t21_n_input_items[] = {5, 1, 1};
1120 const static size_t t21_n_n_input_items = (sizeof (t21_n_input_items) /
1122 const static size_t t21_n_code_inputs = sizeof (t21_in) / sizeof (char*);
1124 const static char t21_res_0[] =
1125 {0, 1, 1, 0, 1, 0, 1};
1126 const static char t21_res_1[] =
1127 {0, 1, 0, 1, 0, 0, 0};
1128 const static char* t21_res[] =
1129 {t21_res_0, t21_res_1};
1131 const static size_t t21_n_output_items[] = {5, 1, 1};
1132 const static size_t t21_n_code_outputs = sizeof (t21_res) / sizeof (char*);
1135 qa_encoder_convolutional_ic1_ic1::t21
1138 do_encoder_check (g_do_encode_in_or_out_0_22,
1139 (const char**) t21_in, (const char**) t21_res,
1140 t21_n_n_input_items, (const size_t*) t21_n_input_items,
1141 (const size_t*) t21_n_output_items, 5, t21_n_code_inputs,
1142 t21_n_code_outputs, (const int*) t21_code_generator,
1143 (const int*) t21_code_feedback, false);
1149 // state state is 0, different feedbacks, block but no termination
1152 const static int t22_code_generator[] = {1, 4, 0, 3, 1, 6};
1153 const static int t22_code_feedback[] = {0, 5, 0, 7, 0, 7};
1155 const static char t22_in_0[] =
1156 {0, 1, 0, 0, 0, 1, 0, 1, 1};
1157 const static char t22_in_1[] =
1158 {0, 0, 0, 1, 1, 1, 0, 1, 0};
1159 const static char* t22_in[] =
1160 {t22_in_0, t22_in_1};
1162 const static size_t t22_n_input_items[] = {5, 4};
1163 const static size_t t22_n_n_input_items = (sizeof (t22_n_input_items) /
1165 const static size_t t22_n_code_inputs = sizeof (t22_in) / sizeof (char*);
1167 const static char t22_res_0[] =
1168 {0, 1, 0, 0, 0, 0, 0, 1, 1};
1169 const static char t22_res_1[] =
1170 {0, 0, 0, 1, 1, 0, 0, 1, 0};
1171 const static char t22_res_2[] =
1172 {0, 1, 0, 0, 1, 0, 0, 1, 0};
1173 const static char* t22_res[] =
1174 {t22_res_0, t22_res_1, t22_res_2};
1176 const static size_t t22_n_output_items[] = {5, 4};
1177 const static size_t t22_n_code_outputs = sizeof (t22_res) / sizeof (char*);
1180 qa_encoder_convolutional_ic1_ic1::t22
1183 do_encoder_check (g_do_encode_in_or_out_0_22,
1184 (const char**) t22_in, (const char**) t22_res,
1185 t22_n_n_input_items, (const size_t*) t22_n_input_items,
1186 (const size_t*) t22_n_output_items, 6, t22_n_code_inputs,
1187 t22_n_code_outputs, (const int*) t22_code_generator,
1188 (const int*) t22_code_feedback, false);
1191 // TESTS 23 through 45 use do_encode_in_or_out as true
1193 static const bool g_do_encode_in_or_out_23_45 = true;
1198 // SIAO realization (implicitely)
1199 // start state is 0, no feedback, no termination
1201 const static int t23_code_generator[] = {1, 0, 5, 0, 1, 6};
1202 const static size_t t23_encode_soai = 0;
1204 const static char t23_in_0[] =
1205 {0, 1, 0, 0, 1, 0, 1, 0, 0, 0};
1206 const static char t23_in_1[] =
1207 {0, 1, 0, 0, 0, 1, 1, 0, 0, 0};
1208 const static char t23_in_2[] =
1209 {0, 0, 1, 1, 1, 1, 1, 0, 0, 0};
1210 const static char* t23_in[] =
1211 {t23_in_0, t23_in_1, t23_in_2};
1213 const static size_t t23_n_input_items = sizeof (t23_in_0);
1214 const static size_t t23_n_code_inputs = sizeof (t23_in) / sizeof (char*);
1216 const static char t23_res_0[] =
1217 {0, 1, 1, 1, 1, 0, 1, 1, 1, 0};
1218 const static char t23_res_1[] =
1219 {0, 1, 0, 1, 0, 1, 1, 0, 1, 0};
1220 const static char* t23_res[] =
1221 {t23_res_0, t23_res_1};
1223 const static size_t t23_n_output_items = sizeof (t23_res_0);
1224 const static size_t t23_n_code_outputs = sizeof (t23_res) / sizeof (char*);
1227 qa_encoder_convolutional_ic1_ic1::t23
1230 do_encoder_check (g_do_encode_in_or_out_23_45,
1231 (const char**) t23_in, (const char**) t23_res,
1232 1, (const size_t*) &t23_n_input_items,
1233 (const size_t*) &t23_n_output_items, 100,
1234 t23_n_code_inputs, t23_n_code_outputs,
1235 (const int*) t23_code_generator,
1236 0, true, 0, 0, t23_encode_soai);
1241 // checking for SIAO realization (implicitely)
1242 // start state is 0, no feedback, no termination
1244 const static int t24_code_generator[] = {1, 0, 0, 1, 5, 6};
1245 const static size_t t24_encode_soai = 1;
1247 const static char t24_in_0[] =
1248 {0, 1, 1, 1, 0, 0, 0, 1, 0};
1249 const static char t24_in_1[] =
1250 {0, 0, 0, 0, 0, 1, 1, 1, 0};
1251 const static char* t24_in[] =
1252 {t24_in_0, t24_in_1};
1254 const static size_t t24_n_input_items = sizeof (t24_in_0);
1255 const static size_t t24_n_code_inputs = sizeof (t24_in) / sizeof (char*);
1257 const static char t24_res_0[] =
1258 {0, 1, 1, 1, 0, 0, 0, 1, 0};
1259 const static char t24_res_1[] =
1260 {0, 0, 0, 0, 0, 1, 1, 1, 0};
1261 const static char t24_res_2[] =
1262 {0, 1, 1, 0, 1, 1, 1, 1, 0};
1263 const static char* t24_res[] =
1264 {t24_res_0, t24_res_1, t24_res_2};
1266 const static size_t t24_n_output_items = sizeof (t24_res_0);
1267 const static size_t t24_n_code_outputs = sizeof (t24_res) / sizeof (char*);
1270 qa_encoder_convolutional_ic1_ic1::t24
1273 do_encoder_check (g_do_encode_in_or_out_23_45,
1274 (const char**) t24_in, (const char**) t24_res,
1275 1, (const size_t*) &t24_n_input_items,
1276 (const size_t*) &t24_n_output_items, 100,
1277 t24_n_code_inputs, t24_n_code_outputs,
1278 (const int*) t24_code_generator,
1279 0, true, 0, 0, t24_encode_soai);
1284 // checking for SOAI realization (implicitely)
1285 // start state is 0, same feedback, no termination
1287 const static int t25_code_generator[] = {1, 0, 0, 1, 5, 6};
1288 const static int t25_code_feedback[] = {0, 0, 0, 0, 7, 7};
1289 const static int t25_encode_soai = 1;
1291 const static char t25_in_0[] =
1292 {0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0};
1293 const static char t25_in_1[] =
1294 {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0};
1295 const static char* t25_in[] =
1296 {t25_in_0, t25_in_1};
1298 const static size_t t25_n_input_items = sizeof (t25_in_0);
1299 const static size_t t25_n_code_inputs = sizeof (t25_in) / sizeof (char*);
1301 const static char t25_res_0[] =
1302 {0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0};
1303 const static char t25_res_1[] =
1304 {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0};
1305 const static char t25_res_2[] =
1306 {0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0};
1307 const static char* t25_res[] =
1308 {t25_res_0, t25_res_1, t25_res_2};
1310 const static size_t t25_n_output_items = sizeof (t25_res_0);
1311 const static size_t t25_n_code_outputs = sizeof (t25_res) / sizeof (char*);
1314 qa_encoder_convolutional_ic1_ic1::t25
1317 do_encoder_check (g_do_encode_in_or_out_23_45,
1318 (const char**) t25_in, (const char**) t25_res,
1319 1, (const size_t*) &t25_n_input_items,
1320 (const size_t*) &t25_n_output_items, 100,
1321 t25_n_code_inputs, t25_n_code_outputs,
1322 (const int*) t25_code_generator,
1323 (const int*) t25_code_feedback,
1324 true, 0, 0, t25_encode_soai);
1329 // checking for SIAO realization (implicitely)
1330 // start state is 0, same feedback, no termination
1332 const static int t26_code_generator[] = {1, 0, 5, 0, 1, 6};
1333 const static int t26_code_feedback[] = {0, 0, 7, 0, 0, 7};
1334 const static int t26_encode_soai = 0;
1336 const static char t26_in_0[] =
1337 {0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0};
1338 const static char t26_in_1[] =
1339 {0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
1340 const static char t26_in_2[] =
1341 {0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0};
1342 const static char* t26_in[] =
1343 {t26_in_0, t26_in_1, t26_in_2};
1345 const static size_t t26_n_input_items = sizeof (t26_in_0);
1346 const static size_t t26_n_code_inputs = sizeof (t26_in) / sizeof (char*);
1348 const static char t26_res_0[] =
1349 {0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0};
1350 const static char t26_res_1[] =
1351 {0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0};
1352 const static char* t26_res[] =
1353 {t26_res_0, t26_res_1};
1355 const static size_t t26_n_output_items = sizeof (t26_res_0);
1356 const static size_t t26_n_code_outputs = sizeof (t26_res) / sizeof (char*);
1359 qa_encoder_convolutional_ic1_ic1::t26
1362 do_encoder_check (g_do_encode_in_or_out_23_45,
1363 (const char**) t26_in, (const char**) t26_res,
1364 1, (const size_t*) &t26_n_input_items,
1365 (const size_t*) &t26_n_output_items, 100,
1366 t26_n_code_inputs, t26_n_code_outputs,
1367 (const int*) t26_code_generator,
1368 (const int*) t26_code_feedback,
1369 true, 0, 0, t26_encode_soai);
1374 // checking for SIAO realization (implicitely),
1375 // start state is 0, different feedbacks, no termination
1377 const static int t27_code_generator[] = {1, 4, 0, 3, 1, 6};
1378 const static int t27_code_feedback[] = {0, 7, 0, 5, 0, 5};
1379 const static int t27_encode_soai = 0;
1381 const static char t27_in_0[] =
1382 {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0};
1383 const static char t27_in_1[] =
1384 {0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0};
1385 const static char* t27_in[] =
1386 {t27_in_0, t27_in_1};
1388 const static size_t t27_n_input_items = sizeof (t27_in_0);
1389 const static size_t t27_n_code_inputs = sizeof (t27_in) / sizeof (char*);
1391 const static char t27_res_0[] =
1392 {0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0};
1393 const static char t27_res_1[] =
1394 {0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0};
1395 const static char t27_res_2[] =
1396 {0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0};
1397 const static char* t27_res[] =
1398 {t27_res_0, t27_res_1, t27_res_2};
1400 const static size_t t27_n_output_items = sizeof (t27_res_0);
1401 const static size_t t27_n_code_outputs = sizeof (t27_res) / sizeof (char*);
1404 qa_encoder_convolutional_ic1_ic1::t27
1407 do_encoder_check (g_do_encode_in_or_out_23_45,
1408 (const char**) t27_in, (const char**) t27_res,
1409 1, (const size_t*) &t27_n_input_items,
1410 (const size_t*) &t27_n_output_items, 100,
1411 t27_n_code_inputs, t27_n_code_outputs,
1412 (const int*) t27_code_generator,
1413 (const int*) t27_code_feedback,
1414 true, 0, 0, t27_encode_soai);
1419 // checking for SOAI realization (implicitely),
1420 // with different feedbacks, no termination
1422 const static int t28_code_generator[] = {1, 0, 1, 4, 3, 6};
1423 const static int t28_code_feedback[] = {0, 0, 0, 5, 7, 7};
1424 const static int t28_encode_soai = 1;
1426 const static char t28_in_0[] =
1427 {0, 1, 0, 0, 0, 1, 0, 0, 1};
1428 const static char t28_in_1[] =
1429 {0, 0, 1, 0, 1, 1, 0, 0, 1};
1430 const static char t28_in_2[] =
1431 {0, 0, 0, 1, 0, 0, 0, 0, 1};
1432 const static char* t28_in[] =
1433 {t28_in_0, t28_in_1, t28_in_2};
1435 const static size_t t28_n_input_items = sizeof (t28_in_0);
1436 const static size_t t28_n_code_inputs = sizeof (t28_in) / sizeof (char*);
1438 const static char t28_res_0[] =
1439 {0, 1, 0, 1, 0, 1, 0, 0, 0};
1440 const static char t28_res_1[] =
1441 {0, 0, 1, 1, 1, 1, 0, 0, 1};
1442 const static char* t28_res[] =
1443 {t28_res_0, t28_res_1};
1445 const static size_t t28_n_output_items = sizeof (t28_res_0);
1446 const static size_t t28_n_code_outputs = sizeof (t28_res) / sizeof (char*);
1449 qa_encoder_convolutional_ic1_ic1::t28
1452 do_encoder_check (g_do_encode_in_or_out_23_45,
1453 (const char**) t28_in, (const char**) t28_res,
1454 1, (const size_t*) &t28_n_input_items,
1455 (const size_t*) &t28_n_output_items, 100,
1456 t28_n_code_inputs, t28_n_code_outputs,
1457 (const int*) t28_code_generator,
1458 (const int*) t28_code_feedback, true,
1459 0, 0, t28_encode_soai);
1465 // start state is 0, no feedback, termination to 0 state
1467 const static int t29_code_generator[] = {1, 0, 5, 0, 1, 6};
1469 const static char t29_in_0[] =
1471 const static char t29_in_1[] =
1473 const static char t29_in_2[] =
1475 const static char* t29_in[] =
1476 {t29_in_0, t29_in_1, t29_in_2};
1478 const static size_t t29_n_input_items = sizeof (t29_in_0);
1479 const static size_t t29_n_code_inputs = sizeof (t29_in) / sizeof (char*);
1481 const static char t29_res_0[] =
1482 {0, 1, 1, 1, 1, 1, 1, 0};
1483 const static char t29_res_1[] =
1484 {0, 1, 0, 1, 0, 0, 1, 0};
1485 const static char* t29_res[] =
1486 {t29_res_0, t29_res_1};
1488 const static size_t t29_n_output_items = sizeof (t29_res_0);
1489 const static size_t t29_n_code_outputs = sizeof (t29_res) / sizeof (char*);
1492 qa_encoder_convolutional_ic1_ic1::t29
1495 do_encoder_check (g_do_encode_in_or_out_23_45,
1496 (const char**) t29_in, (const char**) t29_res,
1497 1, (const size_t*) &t29_n_input_items,
1498 (const size_t*) &t29_n_output_items, 5, t29_n_code_inputs,
1499 t29_n_code_outputs, (const int*) t29_code_generator);
1505 // start state is 0, same feedback, termination to 0 state
1506 // # of termination bits = 2
1508 const static int t30_code_generator[] = {1, 0, 5, 0, 1, 6};
1509 const static int t30_code_feedback[] = {0, 0, 7, 0, 0, 7};
1511 const static char t30_in_0[] =
1512 {0, 1, 1, 0, 0, 0, 0};
1513 const static char t30_in_1[] =
1514 {0, 1, 0, 1, 0, 0, 0};
1515 const static char t30_in_2[] =
1516 {0, 0, 0, 0, 1, 0, 1};
1517 const static char* t30_in[] =
1518 {t30_in_0, t30_in_1, t30_in_2};
1520 const static size_t t30_n_input_items = sizeof (t30_in_0);
1521 const static size_t t30_n_code_inputs = sizeof (t30_in) / sizeof (char*);
1523 const static char t30_res_0[] =
1524 {0, 1, 1, 0, 1, 0, 1, 0, 1};
1525 const static char t30_res_1[] =
1526 {0, 1, 0, 1, 0, 1, 1, 0, 0};
1527 const static char* t30_res[] =
1528 {t30_res_0, t30_res_1};
1530 const static size_t t30_n_output_items = sizeof (t30_res_0);
1531 const static size_t t30_n_code_outputs = sizeof (t30_res) / sizeof (char*);
1534 qa_encoder_convolutional_ic1_ic1::t30
1537 do_encoder_check (g_do_encode_in_or_out_23_45,
1538 (const char**) t30_in, (const char**) t30_res,
1539 1, (const size_t*) &t30_n_input_items,
1540 (const size_t*) &t30_n_output_items, 5, t30_n_code_inputs,
1541 t30_n_code_outputs, (const int*) t30_code_generator,
1542 (const int*) t30_code_feedback);
1548 // state state is 0, different feedbacks, termination to 0 state
1549 // # of term bits will be 4
1551 const static int t31_code_generator[] = {1, 4, 0, 3, 1, 6};
1552 const static int t31_code_feedback[] = {0, 5, 0, 7, 0, 7};
1554 const static char t31_in_0[] =
1555 {0, 1, 0, 0, 0, 1, 0, 1, 1};
1556 const static char t31_in_1[] =
1557 {0, 0, 0, 1, 1, 1, 0, 1, 0};
1558 const static char* t31_in[] =
1559 {t31_in_0, t31_in_1};
1561 const static size_t t31_n_input_items = sizeof (t31_in_0);
1562 const static size_t t31_n_code_inputs = sizeof (t31_in) / sizeof (char*);
1564 const static char t31_res_0[] =
1565 {0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1};
1566 const static char t31_res_1[] =
1567 {0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0};
1568 const static char t31_res_2[] =
1569 {0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0};
1570 const static char* t31_res[] =
1571 {t31_res_0, t31_res_1, t31_res_2};
1573 const static size_t t31_n_output_items = sizeof (t31_res_0);
1574 const static size_t t31_n_code_outputs = sizeof (t31_res) / sizeof (char*);
1577 qa_encoder_convolutional_ic1_ic1::t31
1580 do_encoder_check (g_do_encode_in_or_out_23_45,
1581 (const char**) t31_in, (const char**) t31_res,
1582 1, (const size_t*) &t31_n_input_items,
1583 (const size_t*) &t31_n_output_items, 6, t31_n_code_inputs,
1584 t31_n_code_outputs, (const int*) t31_code_generator,
1585 (const int*) t31_code_feedback);
1591 // start state is 0, different feedbacks, termination to non-0 state
1592 // # of term bits will be 2
1594 const static int t32_code_generator[] = {1, 0, 1, 4, 3, 6};
1595 const static int t32_code_feedback[] = {0, 0, 0, 5, 7, 7};
1596 const static size_t t32_term_state = 4;
1598 const static char t32_in_0[] =
1599 {0, 1, 0, 0, 0, 0, 1};
1600 const static char t32_in_1[] =
1601 {0, 0, 1, 0, 1, 0, 1};
1602 const static char t32_in_2[] =
1603 {0, 0, 0, 1, 0, 0, 1};
1604 const static char* t32_in[] =
1605 {t32_in_0, t32_in_1, t32_in_2};
1607 const static size_t t32_n_input_items = sizeof (t32_in_0);
1608 const static size_t t32_n_code_inputs = sizeof (t32_in) / sizeof (char*);
1610 const static char t32_res_0[] =
1611 {0, 1, 0, 1, 0, 1, 1, 0, 0};
1612 const static char t32_res_1[] =
1613 {0, 0, 1, 1, 1, 1, 1, 0, 1};
1614 const static char* t32_res[] =
1615 {t32_res_0, t32_res_1};
1617 const static size_t t32_n_output_items = sizeof (t32_res_0);
1618 const static size_t t32_n_code_outputs = sizeof (t32_res) / sizeof (char*);
1621 qa_encoder_convolutional_ic1_ic1::t32
1624 do_encoder_check (g_do_encode_in_or_out_23_45,
1625 (const char**) t32_in, (const char**) t32_res,
1626 1, (const size_t*) &t32_n_input_items,
1627 (const size_t*) &t32_n_output_items, 5, t32_n_code_inputs,
1628 t32_n_code_outputs, (const int*) t32_code_generator,
1629 (const int*) t32_code_feedback, true, 0, t32_term_state);
1634 // checking for termination to non-0 state, no feedback
1636 const static int t33_code_generator[] = {1, 0, 3, 0, 1, 6};
1637 const static size_t t33_term_state = 2;
1639 const static char t33_in_0[] =
1640 {0, 1, 0, 1, 0, 0, 1, 1};
1641 const static char t33_in_1[] =
1642 {0, 1, 0, 0, 1, 0, 1, 1};
1643 const static char t33_in_2[] =
1644 {0, 1, 0, 1, 1, 0, 0, 1};
1645 const static char* t33_in[] =
1646 {t33_in_0, t33_in_1, t33_in_2};
1648 const static size_t t33_n_input_items = sizeof (t33_in_0);
1649 const static size_t t33_n_code_inputs = sizeof (t33_in) / sizeof (char*);
1651 const static char t33_res_0[] =
1652 {0, 0, 1, 0, 0, 0, 1, 0, 1, 0};
1653 const static char t33_res_1[] =
1654 {0, 1, 1, 1, 0, 0, 0, 0, 1, 1};
1655 const static char* t33_res[] =
1656 {t33_res_0, t33_res_1};
1658 const static size_t t33_n_output_items = sizeof (t33_res_0);
1659 const static size_t t33_n_code_outputs = sizeof (t33_res) / sizeof (char*);
1662 qa_encoder_convolutional_ic1_ic1::t33
1665 do_encoder_check (g_do_encode_in_or_out_23_45,
1666 (const char**) t33_in, (const char**) t33_res,
1667 1, (const size_t*) &t33_n_input_items,
1668 (const size_t*) &t33_n_output_items, 5,
1669 t33_n_code_inputs, t33_n_code_outputs,
1670 (const int*) t33_code_generator,
1671 0, true, 0, t33_term_state);
1677 // start state is not 0, no feedback, terminating to 0 state
1679 const static int t34_code_generator[] = {1, 0, 3, 0, 1, 6};
1680 const static size_t t34_start_state = 1;
1682 const static char t34_in_0[] =
1683 {0, 1, 0, 0, 0, 1, 0};
1684 const static char t34_in_1[] =
1685 {0, 0, 1, 0, 0, 1, 0};
1686 const static char t34_in_2[] =
1687 {0, 1, 1, 1, 0, 1, 1};
1688 const static char* t34_in[] =
1689 {t34_in_0, t34_in_1, t34_in_2};
1691 const static size_t t34_n_input_items = sizeof (t34_in_0);
1692 const static size_t t34_n_code_inputs = sizeof (t34_in) / sizeof (char*);
1694 const static char t34_res_0[] =
1695 {1, 0, 0, 0, 1, 0, 0, 1, 0};
1696 const static char t34_res_1[] =
1697 {1, 1, 0, 0, 0, 1, 0, 0, 0};
1698 const static char* t34_res[] =
1699 {t34_res_0, t34_res_1};
1701 const static size_t t34_n_output_items = sizeof (t34_res_0);
1702 const static size_t t34_n_code_outputs = sizeof (t34_res) / sizeof (char*);
1705 qa_encoder_convolutional_ic1_ic1::t34
1708 do_encoder_check (g_do_encode_in_or_out_23_45,
1709 (const char**) t34_in, (const char**) t34_res,
1710 1, (const size_t*) &t34_n_input_items,
1711 (const size_t*) &t34_n_output_items, 5,
1712 t34_n_code_inputs, t34_n_code_outputs,
1713 (const int*) t34_code_generator,
1714 0, true, t34_start_state);
1720 // start state is not 0, no feedback, terminating to non-0 state
1722 const static int t35_code_generator[] = {1, 0, 3, 0, 1, 6};
1723 const static size_t t35_start_state = 2;
1724 const static size_t t35_term_state = 2;
1726 const static char t35_in_0[] =
1727 {0, 1, 1, 1, 0, 1, 0};
1728 const static char t35_in_1[] =
1729 {0, 1, 0, 0, 0, 0, 1};
1730 const static char t35_in_2[] =
1731 {0, 1, 1, 0, 1, 0, 1};
1732 const static char* t35_in[] =
1733 {t35_in_0, t35_in_1, t35_in_2};
1735 const static size_t t35_n_input_items = sizeof (t35_in_0);
1736 const static size_t t35_n_code_inputs = sizeof (t35_in) / sizeof (char*);
1738 const static char t35_res_0[] =
1739 {0, 0, 1, 0, 1, 0, 1, 1, 1};
1740 const static char t35_res_1[] =
1741 {1, 1, 1, 0, 1, 1, 0, 1, 1};
1742 const static char* t35_res[] =
1743 {t35_res_0, t35_res_1};
1745 const static size_t t35_n_output_items = sizeof (t35_res_0);
1746 const static size_t t35_n_code_outputs = sizeof (t35_res) / sizeof (char*);
1749 qa_encoder_convolutional_ic1_ic1::t35
1752 do_encoder_check (g_do_encode_in_or_out_23_45,
1753 (const char**) t35_in, (const char**) t35_res,
1754 1, (const size_t*) &t35_n_input_items,
1755 (const size_t*) &t35_n_output_items, 5, t35_n_code_inputs,
1756 t35_n_code_outputs, (const int*) t35_code_generator,
1757 0, true, t35_start_state, t35_term_state);
1763 // start state is not 0, any feedback, termination to 0 state
1765 const static int t36_code_generator[] = {1, 0, 5, 0, 1, 6};
1766 const static int t36_code_feedback[] = {0, 0, 7, 0, 0, 7};
1767 const static size_t t36_start_state = 2;
1768 const static size_t t36_term_state = 0;
1770 const static char t36_in_0[] =
1771 {0, 1, 0, 0, 0, 1, 0};
1772 const static char t36_in_1[] =
1773 {0, 0, 1, 1, 0, 1, 0};
1774 const static char t36_in_2[] =
1775 {0, 0, 0, 0, 1, 0, 0};
1776 const static char* t36_in[] =
1777 {t36_in_0, t36_in_1, t36_in_2};
1779 const static size_t t36_n_input_items = sizeof (t36_in_0);
1780 const static size_t t36_n_code_inputs = sizeof (t36_in) / sizeof (char*);
1782 const static char t36_res_0[] =
1783 {0, 0, 1, 0, 0, 1, 0, 1, 1};
1784 const static char t36_res_1[] =
1785 {1, 1, 1, 0, 1, 1, 0, 0, 1};
1786 const static char* t36_res[] =
1787 {t36_res_0, t36_res_1};
1789 const static size_t t36_n_output_items = sizeof (t36_res_0);
1790 const static size_t t36_n_code_outputs = sizeof (t36_res) / sizeof (char*);
1793 qa_encoder_convolutional_ic1_ic1::t36
1796 do_encoder_check (g_do_encode_in_or_out_23_45,
1797 (const char**) t36_in, (const char**) t36_res,
1798 1, (const size_t*) &t36_n_input_items,
1799 (const size_t*) &t36_n_output_items, 5,
1800 t36_n_code_inputs, t36_n_code_outputs,
1801 (const int*) t36_code_generator,
1802 (const int*) t36_code_feedback,
1803 true, t36_start_state, t36_term_state);
1809 // start state is not 0, any feedback, termination to non-zero state
1811 const static int t37_code_generator[] = {1, 0, 5, 0, 1, 6};
1812 const static int t37_code_feedback[] = {0, 0, 7, 0, 0, 7};
1813 const static size_t t37_start_state = 1;
1814 const static size_t t37_term_state = 2;
1816 const static char t37_in_0[] =
1817 {0, 1, 0, 1, 0, 1, 0};
1818 const static char t37_in_1[] =
1819 {0, 0, 0, 0, 1, 1, 0};
1820 const static char t37_in_2[] =
1821 {0, 1, 0, 0, 0, 1, 1};
1822 const static char* t37_in[] =
1823 {t37_in_0, t37_in_1, t37_in_2};
1825 const static size_t t37_n_input_items = sizeof (t37_in_0);
1826 const static size_t t37_n_code_inputs = sizeof (t37_in) / sizeof (char*);
1828 const static char t37_res_0[] =
1829 {1, 1, 1, 1, 1, 0, 1, 1, 1};
1830 const static char t37_res_1[] =
1831 {1, 0, 0, 1, 0, 0, 0, 0, 1};
1832 const static char* t37_res[] =
1833 {t37_res_0, t37_res_1};
1835 const static size_t t37_n_output_items = sizeof (t37_res_0);
1836 const static size_t t37_n_code_outputs = sizeof (t37_res) / sizeof (char*);
1839 qa_encoder_convolutional_ic1_ic1::t37
1842 do_encoder_check (g_do_encode_in_or_out_23_45,
1843 (const char**) t37_in, (const char**) t37_res,
1844 1, (const size_t*) &t37_n_input_items,
1845 (const size_t*) &t37_n_output_items, 5,
1846 t37_n_code_inputs, t37_n_code_outputs,
1847 (const int*) t37_code_generator,
1848 (const int*) t37_code_feedback,
1849 true, t37_start_state, t37_term_state);
1855 // no feedback, block coding but no termination
1857 const static int t38_code_generator[] = {1, 0, 3, 0, 1, 6};
1859 const static char t38_in_0[] =
1860 {0, 1, 0, 1, 0, 0, 1, 1};
1861 const static char t38_in_1[] =
1862 {0, 1, 0, 0, 1, 0, 1, 1};
1863 const static char t38_in_2[] =
1864 {0, 1, 0, 1, 1, 0, 0, 1};
1865 const static char* t38_in[] =
1866 {t38_in_0, t38_in_1, t38_in_2};
1868 const static size_t t38_n_input_items = sizeof (t38_in_0);
1869 const static size_t t38_n_code_inputs = sizeof (t38_in) / sizeof (char*);
1871 const static char t38_res_0[] =
1872 {0, 0, 1, 0, 0, 0, 1, 0};
1873 const static char t38_res_1[] =
1874 {0, 1, 1, 1, 0, 0, 1, 1};
1875 const static char* t38_res[] =
1876 {t38_res_0, t38_res_1};
1878 const static size_t t38_n_output_items = sizeof (t38_res_0);
1879 const static size_t t38_n_code_outputs = sizeof (t38_res) / sizeof (char*);
1882 qa_encoder_convolutional_ic1_ic1::t38
1885 do_encoder_check (g_do_encode_in_or_out_23_45,
1886 (const char**) t38_in, (const char**) t38_res,
1887 1, (const size_t*) &t38_n_input_items,
1888 (const size_t*) &t38_n_output_items, 5,
1889 t38_n_code_inputs, t38_n_code_outputs,
1890 (const int*) t38_code_generator, 0, false);
1896 // start state is 0, same feedback, block but no termination
1898 const static int t39_code_generator[] = {1, 0, 5, 0, 1, 6};
1899 const static int t39_code_feedback[] = {0, 0, 7, 0, 0, 7};
1901 const static char t39_in_0[] =
1902 {0, 1, 1, 0, 0, 0, 0};
1903 const static char t39_in_1[] =
1904 {0, 1, 0, 1, 0, 0, 0};
1905 const static char t39_in_2[] =
1906 {0, 0, 0, 0, 1, 0, 1};
1907 const static char* t39_in[] =
1908 {t39_in_0, t39_in_1, t39_in_2};
1910 const static size_t t39_n_input_items = sizeof (t39_in_0);
1911 const static size_t t39_n_code_inputs = sizeof (t39_in) / sizeof (char*);
1913 const static char t39_res_0[] =
1914 {0, 1, 1, 0, 1, 0, 1};
1915 const static char t39_res_1[] =
1916 {0, 1, 0, 1, 0, 0, 0};
1917 const static char* t39_res[] =
1918 {t39_res_0, t39_res_1};
1920 const static size_t t39_n_output_items = sizeof (t39_res_0);
1921 const static size_t t39_n_code_outputs = sizeof (t39_res) / sizeof (char*);
1924 qa_encoder_convolutional_ic1_ic1::t39
1927 do_encoder_check (g_do_encode_in_or_out_23_45,
1928 (const char**) t39_in, (const char**) t39_res,
1929 1, (const size_t*) &t39_n_input_items,
1930 (const size_t*) &t39_n_output_items, 5, t39_n_code_inputs,
1931 t39_n_code_outputs, (const int*) t39_code_generator,
1932 (const int*) t39_code_feedback, false);
1938 // state state is 0, different feedbacks, block but no termination
1940 const static int t40_code_generator[] = {1, 4, 0, 3, 1, 6};
1941 const static int t40_code_feedback[] = {0, 5, 0, 7, 0, 7};
1943 const static char t40_in_0[] =
1944 {0, 1, 0, 0, 0, 1, 0, 1, 1};
1945 const static char t40_in_1[] =
1946 {0, 0, 0, 1, 1, 1, 0, 1, 0};
1947 const static char* t40_in[] =
1948 {t40_in_0, t40_in_1};
1950 const static size_t t40_n_input_items = sizeof (t40_in_0);
1951 const static size_t t40_n_code_inputs = sizeof (t40_in) / sizeof (char*);
1953 const static char t40_res_0[] =
1954 {0, 1, 0, 0, 0, 0, 0, 1, 1};
1955 const static char t40_res_1[] =
1956 {0, 0, 0, 1, 1, 0, 0, 1, 0};
1957 const static char t40_res_2[] =
1958 {0, 1, 0, 0, 1, 0, 0, 1, 0};
1959 const static char* t40_res[] =
1960 {t40_res_0, t40_res_1, t40_res_2};
1962 const static size_t t40_n_output_items = sizeof (t40_res_0);
1963 const static size_t t40_n_code_outputs = sizeof (t40_res) / sizeof (char*);
1966 qa_encoder_convolutional_ic1_ic1::t40
1969 do_encoder_check (g_do_encode_in_or_out_23_45,
1970 (const char**) t40_in, (const char**) t40_res,
1971 1, (const size_t*) &t40_n_input_items,
1972 (const size_t*) &t40_n_output_items, 6, t40_n_code_inputs,
1973 t40_n_code_outputs, (const int*) t40_code_generator,
1974 (const int*) t40_code_feedback, false);
1980 // start state is not 0, no feedback, terminating to non-0 state
1981 // multi-encode, forced to retrieve all term outputs
1983 const static int t41_code_generator[] = {1, 0, 3, 0, 1, 6};
1984 const static size_t t41_start_state = 2;
1985 const static size_t t41_term_state = 2;
1987 const static char t41_in_0[] =
1988 {0, 1, 1, 1, 0, 1, 0};
1989 const static char t41_in_1[] =
1990 {0, 1, 0, 0, 0, 0, 1};
1991 const static char t41_in_2[] =
1992 {0, 1, 1, 0, 1, 0, 1};
1993 const static char* t41_in[] =
1994 {t41_in_0, t41_in_1, t41_in_2};
1996 const static size_t t41_n_input_items[] = {3, 2, 2};
1997 const static size_t t41_n_io_items = (sizeof (t41_n_input_items) /
1999 const static size_t t41_n_code_inputs = sizeof (t41_in) / sizeof (char*);
2001 const static char t41_res_0[] =
2002 {0, 0, 1, 0, 1, 0, 1, 1, 1};
2003 const static char t41_res_1[] =
2004 {1, 1, 1, 0, 1, 1, 0, 1, 1};
2005 const static char* t41_res[] =
2006 {t41_res_0, t41_res_1};
2008 const static size_t t41_n_output_items[] = {3, 4, 2};
2009 const static size_t t41_n_code_outputs = sizeof (t41_res) / sizeof (char*);
2012 qa_encoder_convolutional_ic1_ic1::t41
2015 do_encoder_check (g_do_encode_in_or_out_23_45,
2016 (const char**) t41_in, (const char**) t41_res,
2017 t41_n_io_items, (const size_t*) t41_n_input_items,
2018 (const size_t*) t41_n_output_items, 5, t41_n_code_inputs,
2019 t41_n_code_outputs, (const int*) t41_code_generator,
2020 0, true, t41_start_state, t41_term_state);
2026 // start state is not 0, any feedback, termination to non-zero state
2029 const static int t42_code_generator[] = {1, 0, 5, 0, 1, 6};
2030 const static int t42_code_feedback[] = {0, 0, 7, 0, 0, 7};
2031 const static size_t t42_start_state = 1;
2032 const static size_t t42_term_state = 2;
2034 const static char t42_in_0[] =
2035 {0, 1, 0, 1, 0, 1, 0};
2036 const static char t42_in_1[] =
2037 {0, 0, 0, 0, 1, 1, 0};
2038 const static char t42_in_2[] =
2039 {0, 1, 0, 0, 0, 1, 1};
2040 const static char* t42_in[] =
2041 {t42_in_0, t42_in_1, t42_in_2};
2043 const static size_t t42_n_input_items[] = {2, 2, 1, 1, 1};
2044 const static size_t t42_n_io_items = (sizeof (t42_n_input_items) /
2046 const static size_t t42_n_code_inputs = sizeof (t42_in) / sizeof (char*);
2048 const static char t42_res_0[] =
2049 {1, 1, 1, 1, 1, 0, 1, 1, 1};
2050 const static char t42_res_1[] =
2051 {1, 0, 0, 1, 0, 0, 0, 0, 1};
2052 const static char* t42_res[] =
2053 {t42_res_0, t42_res_1};
2055 const static size_t t42_n_output_items[] = {2, 2, 3, 1, 1};
2056 const static size_t t42_n_code_outputs = sizeof (t42_res) / sizeof (char*);
2059 qa_encoder_convolutional_ic1_ic1::t42
2062 do_encoder_check (g_do_encode_in_or_out_23_45,
2063 (const char**) t42_in, (const char**) t42_res,
2064 1, (const size_t*) &t42_n_input_items,
2065 (const size_t*) &t42_n_output_items, 5,
2066 t42_n_code_inputs, t42_n_code_outputs,
2067 (const int*) t42_code_generator,
2068 (const int*) t42_code_feedback,
2069 true, t42_start_state, t42_term_state);
2075 // no feedback, block coding but no termination
2078 const static int t43_code_generator[] = {1, 0, 3, 0, 1, 6};
2080 const static char t43_in_0[] =
2081 {0, 1, 0, 1, 0, 0, 1, 1};
2082 const static char t43_in_1[] =
2083 {0, 1, 0, 0, 1, 0, 1, 1};
2084 const static char t43_in_2[] =
2085 {0, 1, 0, 1, 1, 0, 0, 1};
2086 const static char* t43_in[] =
2087 {t43_in_0, t43_in_1, t43_in_2};
2089 const static size_t t43_n_input_items[] = {2, 2, 2, 2};
2090 const static size_t t43_n_n_input_items = (sizeof (t43_n_input_items) /
2092 const static size_t t43_n_code_inputs = sizeof (t43_in) / sizeof (char*);
2094 const static char t43_res_0[] =
2095 {0, 0, 1, 0, 0, 0, 1, 0};
2096 const static char t43_res_1[] =
2097 {0, 1, 1, 1, 0, 0, 1, 1};
2098 const static char* t43_res[] =
2099 {t43_res_0, t43_res_1};
2101 const static size_t t43_n_output_items[] = {2, 2, 2, 2};
2102 const static size_t t43_n_code_outputs = sizeof (t43_res) / sizeof (char*);
2105 qa_encoder_convolutional_ic1_ic1::t43
2108 do_encoder_check (g_do_encode_in_or_out_23_45,
2109 (const char**) t43_in, (const char**) t43_res,
2110 t43_n_n_input_items, (const size_t*) t43_n_input_items,
2111 (const size_t*) t43_n_output_items, 5,
2112 t43_n_code_inputs, t43_n_code_outputs,
2113 (const int*) t43_code_generator, 0, false);
2119 // start state is 0, same feedback, block but no termination
2122 const static int t44_code_generator[] = {1, 0, 5, 0, 1, 6};
2123 const static int t44_code_feedback[] = {0, 0, 7, 0, 0, 7};
2125 const static char t44_in_0[] =
2126 {0, 1, 1, 0, 0, 0, 0};
2127 const static char t44_in_1[] =
2128 {0, 1, 0, 1, 0, 0, 0};
2129 const static char t44_in_2[] =
2130 {0, 0, 0, 0, 1, 0, 1};
2131 const static char* t44_in[] =
2132 {t44_in_0, t44_in_1, t44_in_2};
2134 const static size_t t44_n_input_items[] = {5, 1, 1};
2135 const static size_t t44_n_n_input_items = (sizeof (t44_n_input_items) /
2137 const static size_t t44_n_code_inputs = sizeof (t44_in) / sizeof (char*);
2139 const static char t44_res_0[] =
2140 {0, 1, 1, 0, 1, 0, 1};
2141 const static char t44_res_1[] =
2142 {0, 1, 0, 1, 0, 0, 0};
2143 const static char* t44_res[] =
2144 {t44_res_0, t44_res_1};
2146 const static size_t t44_n_output_items[] = {5, 1, 1};
2147 const static size_t t44_n_code_outputs = sizeof (t44_res) / sizeof (char*);
2150 qa_encoder_convolutional_ic1_ic1::t44
2153 do_encoder_check (g_do_encode_in_or_out_23_45,
2154 (const char**) t44_in, (const char**) t44_res,
2155 t44_n_n_input_items, (const size_t*) t44_n_input_items,
2156 (const size_t*) t44_n_output_items, 5, t44_n_code_inputs,
2157 t44_n_code_outputs, (const int*) t44_code_generator,
2158 (const int*) t44_code_feedback, false);
2164 // state state is 0, different feedbacks, block but no termination
2167 const static int t45_code_generator[] = {1, 4, 0, 3, 1, 6};
2168 const static int t45_code_feedback[] = {0, 5, 0, 7, 0, 7};
2170 const static char t45_in_0[] =
2171 {0, 1, 0, 0, 0, 1, 0, 1, 1};
2172 const static char t45_in_1[] =
2173 {0, 0, 0, 1, 1, 1, 0, 1, 0};
2174 const static char* t45_in[] =
2175 {t45_in_0, t45_in_1};
2177 const static size_t t45_n_input_items[] = {5, 4};
2178 const static size_t t45_n_n_input_items = (sizeof (t45_n_input_items) /
2180 const static size_t t45_n_code_inputs = sizeof (t45_in) / sizeof (char*);
2182 const static char t45_res_0[] =
2183 {0, 1, 0, 0, 0, 0, 0, 1, 1};
2184 const static char t45_res_1[] =
2185 {0, 0, 0, 1, 1, 0, 0, 1, 0};
2186 const static char t45_res_2[] =
2187 {0, 1, 0, 0, 1, 0, 0, 1, 0};
2188 const static char* t45_res[] =
2189 {t45_res_0, t45_res_1, t45_res_2};
2191 const static size_t t45_n_output_items[] = {5, 4};
2192 const static size_t t45_n_code_outputs = sizeof (t45_res) / sizeof (char*);
2195 qa_encoder_convolutional_ic1_ic1::t45
2198 do_encoder_check (g_do_encode_in_or_out_23_45,
2199 (const char**) t45_in, (const char**) t45_res,
2200 t45_n_n_input_items, (const size_t*) t45_n_input_items,
2201 (const size_t*) t45_n_output_items, 6, t45_n_code_inputs,
2202 t45_n_code_outputs, (const int*) t45_code_generator,
2203 (const int*) t45_code_feedback, false);
2209 // start state is not 0, no feedback, terminating to non-0 state
2210 // multi-encode, input dictates encoding: forced to retrieve all term
2211 // outputs; multiple encoding blocks
2213 const static int t46_code_generator[] = {1, 0, 3, 0, 1, 6};
2214 const static size_t t46_start_state = 2;
2215 const static size_t t46_term_state = 2;
2217 const static char t46_in_0[] =
2218 {0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0};
2219 const static char t46_in_1[] =
2220 {0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0};
2221 const static char t46_in_2[] =
2222 {0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0};
2223 const static char* t46_in[] =
2224 {t46_in_0, t46_in_1, t46_in_2};
2226 const static size_t t46_n_input_items[] = {5, 0, 4, 1, 1};
2227 const static size_t t46_n_io_items = (sizeof (t46_n_input_items) /
2229 const static size_t t46_n_code_inputs = sizeof (t46_in) / sizeof (char*);
2231 const static char t46_res_0[] =
2232 {0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0};
2233 const static char t46_res_1[] =
2234 {1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1};
2235 const static char* t46_res[] =
2236 {t46_res_0, t46_res_1};
2238 const static size_t t46_n_output_items[] = {7, 0, 4, 3, 1};
2239 const static size_t t46_n_code_outputs = sizeof (t46_res) / sizeof (char*);
2242 qa_encoder_convolutional_ic1_ic1::t46
2245 do_encoder_check (true,
2246 (const char**) t46_in, (const char**) t46_res,
2247 t46_n_io_items, (const size_t*) t46_n_input_items,
2248 (const size_t*) t46_n_output_items, 5, t46_n_code_inputs,
2249 t46_n_code_outputs, (const int*) t46_code_generator,
2250 0, true, t46_start_state, t46_term_state);
2256 // start state is not 0, no feedback, terminating to non-0 state
2257 // multi-encode, output dictates encoding; multiple encoding blocks
2259 const static int t47_code_generator[] = {1, 0, 3, 0, 1, 6};
2260 const static size_t t47_start_state = 2;
2261 const static size_t t47_term_state = 2;
2263 const static char t47_in_0[] =
2264 {0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0};
2265 const static char t47_in_1[] =
2266 {0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0};
2267 const static char t47_in_2[] =
2268 {0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0};
2269 const static char* t47_in[] =
2270 {t47_in_0, t47_in_1, t47_in_2};
2272 const static size_t t47_n_input_items[] = {5, 0, 0, 4, 1, 0, 0, 1};
2273 const static size_t t47_n_io_items = (sizeof (t47_n_input_items) /
2275 const static size_t t47_n_code_inputs = sizeof (t47_in) / sizeof (char*);
2277 const static char t47_res_0[] =
2278 {0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0};
2279 const static char t47_res_1[] =
2280 {1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1};
2281 const static char* t47_res[] =
2282 {t47_res_0, t47_res_1};
2284 const static size_t t47_n_output_items[] = {6, 0, 1, 4, 1, 1, 1, 1};
2285 const static size_t t47_n_code_outputs = sizeof (t47_res) / sizeof (char*);
2288 qa_encoder_convolutional_ic1_ic1::t47
2291 do_encoder_check (false,
2292 (const char**) t47_in, (const char**) t47_res,
2293 t47_n_io_items, (const size_t*) t47_n_input_items,
2294 (const size_t*) t47_n_output_items, 5, t47_n_code_inputs,
2295 t47_n_code_outputs, (const int*) t47_code_generator,
2296 0, true, t47_start_state, t47_term_state);