# 3.2.2. Source parameters¶

The source generates $$K$$ information bits: it is the simulation starting point.

## 3.2.2.1. --src-info-bits, -K¶

Type: integer --src-info-bits 64 -K 128

Select the number of information bits $$K$$.

Warning

This argument is required only with the UNCODED simulation code type (cf. the --sim-cde-type, -C parameter).

## 3.2.2.2. --src-type¶

Type: text AZCW RAND USER USER_BIN RAND --src-type AZCW

Method used to generate the $$K$$ information bits.

Description of the allowed values:

Value Description
AZCW Set all the information bits to 0.
RAND Generate randomly the information bits based on the MT 19937 PRNG [MN98].
USER Read the information bits from a given file, the path can be set with the --src-path parameter.
USER_BIN Read the information bits from a given file in binary mode , the path can be set with the --src-path parameter.

Note

For the USER type, when the number of simulated frames exceeds the number of frames contained in the files, the frames are replayed from the beginning of the file and this is repeated until the end of the simulation.

Note

For the USER_BIN type, raw data is read from the file that is open in binary mode. When the end of the file is reached, the source goes back to the beginning of the file and continues to generate bits from there.

## 3.2.2.3. --src-implem¶

Type: text FAST STD STD --src-implem FAST

Select the implementation of the algorithm to generate the information bits.

Description of the allowed values:

Value Description
STD Standard implementation working for any source type.
FAST Fast implementation, only available for the RAND source type.

## 3.2.2.4. --src-path¶

Type: file read only --src-path conf/src/GSM-LDPC_2112.src

Set the path to a file containing one or more frames (informations bits), to use with the USER or USER_BIN source type.

With the USER_BIN source type, raw binary data is directly read from the file.

With the USER source type, an ASCII file is expected:

# 'F' has to be replaced by the number of contained frames.
F

# 'K' has to be replaced by the number of information bits.
K

# a sequence of 'F * K' bits (separated by spaces)
B_0 B_1 B_2 B_3 B_4 B_5 [...] B_{(F*K)-1}


## 3.2.2.5. --src-no-reset¶

Do not reset the source (start to the beginning) if the file reach EOF and pad with zeros after EOF (work only for USER_BIN source type).

## 3.2.2.6. --src-fifo¶

If the FIFO (or pipe) reach the end, then reset the EOF flag and retry to read in loop.

## 3.2.2.7. --src-start-idx¶

Type: integer 0 --src-start-idx 42

Give the start index to use in the USER source type. It is the index of the first frame to read from the given file.

## 3.2.2.8. References¶

 [MN98] M. Matsumoto and T. Nishimura. Mersenne twister: a 623-dimensionally equidistributed uniform pseudo-random number generator. ACM Transactions on Modeling and Computer Simulation (TOMACS), 8(1):3–30, 1998. doi:10.1145/272991.272995.