summaryrefslogtreecommitdiffstats
path: root/tests/conv/conv_test.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-01-15 12:55:57 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2017-01-16 12:52:01 +0000
commit12142950625df5e16be936057be388290c07750f (patch)
tree34b1fe295ad2d38483a11e18a421910971f3cece /tests/conv/conv_test.c
parent8928747a3ea1c1d02239b422c0ad25b8e22bcaf2 (diff)
tests/conv: add LTE PBCH test vector
Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b
Diffstat (limited to 'tests/conv/conv_test.c')
-rw-r--r--tests/conv/conv_test.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/conv/conv_test.c b/tests/conv/conv_test.c
index 608f829b..ed1257e6 100644
--- a/tests/conv/conv_test.c
+++ b/tests/conv/conv_test.c
@@ -120,6 +120,57 @@ static const struct osmo_conv_code conv_wimax_fch = {
.next_state = conv_wimax_fch_next_state,
};
+/**
+ * LTE PBCH
+ * Non recursive code, tail-biting, non-punctured
+ */
+static const uint8_t conv_lte_pbch_next_output[][2] = {
+ { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 },
+ { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 },
+ { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 },
+ { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 },
+ { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 },
+ { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 },
+ { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 },
+ { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 },
+ { 7, 0 }, { 4, 3 }, { 0, 7 }, { 3 , 4 },
+ { 1, 6 }, { 2, 5 }, { 6, 1 }, { 5 , 2 },
+ { 6, 1 }, { 5, 2 }, { 1, 6 }, { 2 , 5 },
+ { 0, 7 }, { 3, 4 }, { 7, 0 }, { 4 , 3 },
+ { 3, 4 }, { 0, 7 }, { 4, 3 }, { 7 , 0 },
+ { 5, 2 }, { 6, 1 }, { 2, 5 }, { 1 , 6 },
+ { 2, 5 }, { 1, 6 }, { 5, 2 }, { 6 , 1 },
+ { 4, 3 }, { 7, 0 }, { 3, 4 }, { 0 , 7 },
+};
+
+static const uint8_t conv_lte_pbch_next_state[][2] = {
+ { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 },
+ { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 },
+ { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 },
+ { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 },
+ { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 },
+ { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 },
+ { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 },
+ { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 },
+ { 0, 1 }, { 2, 3 }, { 4, 5 }, { 6, 7 },
+ { 8, 9 }, { 10, 11 }, { 12, 13 }, { 14, 15 },
+ { 16, 17 }, { 18, 19 }, { 20, 21 }, { 22, 23 },
+ { 24, 25 }, { 26, 27 }, { 28, 29 }, { 30, 31 },
+ { 32, 33 }, { 34, 35 }, { 36, 37 }, { 38, 39 },
+ { 40, 41 }, { 42, 43 }, { 44, 45 }, { 46, 47 },
+ { 48, 49 }, { 50, 51 }, { 52, 53 }, { 54, 55 },
+ { 56, 57 }, { 58, 59 }, { 60, 61 }, { 62, 63 },
+};
+
+const struct osmo_conv_code conv_lte_pbch = {
+ .N = 3,
+ .K = 7,
+ .len = 40,
+ .term = CONV_TERM_TAIL_BITING,
+ .next_output = conv_lte_pbch_next_output,
+ .next_state = conv_lte_pbch_next_state,
+};
+
/* ------------------------------------------------------------------------ */
/* Test vectors */
/* ------------------------------------------------------------------------ */
@@ -219,6 +270,15 @@ int main(int argc, char *argv[])
0x8a, 0xed, 0x21, 0xed },
},
{
+ .name = "LTE PBCH (non-recursive, tail-biting, non-punctured)",
+ .code = &conv_lte_pbch,
+ .in_len = 40,
+ .out_len = 120,
+ .has_vec = 0,
+ .vec_in = { },
+ .vec_out = { },
+ },
+ {
.name = "??? (non-recursive, direct truncation, not punctured)",
.code = &conv_trunc,
.in_len = 224,