-
Notifications
You must be signed in to change notification settings - Fork 141
/
encoder.rst
87 lines (61 loc) · 2.51 KB
/
encoder.rst
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
.. _enc-common-encoder-parameters:
Common Encoder parameters
-------------------------
This section describes the parameters common to all encoders.
.. _enc-common-enc-type:
``--enc-type``
""""""""""""""
:Type: text
:Allowed values: ``NO`` ``AZCW`` ``COSET`` ``USER``
:Examples: ``--enc-type AZCW``
|factory::Encoder::parameters::p+type|
Description of the allowed values:
+-----------+------------------------+
| Value | Description |
+===========+========================+
| ``AZCW`` | |enc-type_descr_azcw| |
+-----------+------------------------+
| ``COSET`` | |enc-type_descr_coset| |
+-----------+------------------------+
| ``USER`` | |enc-type_descr_user| |
+-----------+------------------------+
.. |enc-type_descr_azcw| replace:: Select the |AZCW| encoder which is optimized
to encode :math:`K` information bits all set to 0.
.. |enc-type_descr_coset| replace:: Select the coset encoder (see the
:ref:`sim-sim-coset` parameter), this encoder add random bits from
:math:`X_K` to :math:`X_N`.
.. |enc-type_descr_user| replace:: Read the codewords from a given file, the
path can be set with the :ref:`enc-common-enc-path` parameter.
.. tip:: The |AZCW| encoder allows to have a working communication chain
without implementing an encoder. This technique can also reduce the
simulation time especially when the *encode* task is time consuming.
.. danger:: Be careful, the |AZCW| technique can lead to unexpected behaviors
with broken decoders.
.. note:: Only use the ``COSET`` encoder if know what you are doing. This
encoder is set by default when the simulation is run with the
:ref:`sim-sim-coset` parameter.
.. note:: For the ``USER`` type, when the number of simulated frames exceeds the
number of codewords contained in the files, the codewords are replayed from
the beginning of the file and this is repeated until the end of the
simulation.
.. _enc-common-enc-path:
``--enc-path``
""""""""""""""
:Type: file
:Rights: read only
:Examples: ``--enc-path example/path/to/the/right/file``
|factory::Encoder::parameters::p+path|
An |ASCII| file is expected:
.. code-block:: bash
# 'F' has to be replaced by the number of contained frames.
F
# 'N' has to be replaced by the codeword size.
N
# a sequence of 'F * N' bits (separated by spaces)
B_0 B_1 B_2 B_3 B_4 B_5 [...] B_{(F*N)-1}
.. _enc-common-enc-start-idx:
``--enc-start-idx``
"""""""""""""""""""
:Type: integer
:Examples: ``--enc-start-idx 1``
|factory::Encoder::parameters::p+start-idx|