Creates a file of random messages bits called
source-file, which is suitable for testing the
correctness and performance of other programs. The bits in the file
are independent, and are equally likely to be 0 or 1. They are
generated pseudo-randomly based on seed. The actual
random number seed used will be seed times 10 plus 2,
so that the stream of pseudo-random numbers will not be the same as
any that might have been used by another program.
The n-bits argument specifies the number of bits to
produce. It can be a single number, or it can consist of a block size
and a number of blocks, written with x separating these
numbers, with no spaces. Each block is written as a single line, with
the bits in the block represented by the characters '0' and '1', with
no intervening spaces. If the bit count is given by a single number,
the block size is assumed to be one.
Example: The following command produces a file containing
3 blocks, each consisting of 15 random bits, produced using the pseudo-random
number stream identified by the seed of 17:
Checks whether or not the blocks in decoded-file
are codewords, according to the parity check matrix in
pchk-file. If gen-file is specified,
the message bits of the blocks are also checked against the
corresponding blocks of source-file, or against zero
if source-file is not given. (Normally, one would
leave out source-file only if the transmit command was used
with an argument specifying that zeros are to be transmitted, rather
than a file of encoded data.)
A summary of the results is displayed on standard error, giving the
total numbers of blocks, the number with parity check errors, and, if
gen-file was specified, the number of blocks with
source errors and the number with errors of both kinds. If
gen-file was specified, a second
summary line displays the bit error rate from
comparing the decoded message bits with the true message bits (zeros
if no source file was given).
If the -t option is given, block-by-block results are
printed on standard output in two or three columns, giving the block
number (from zero), the number of parity check errors for that block,
and the number of errors in source bits. The last column is omitted
if gen-file is not specified. The columns are
preceded by a line of headers, so the file is suitable for reading
into the S-Plus or R statistics packages, with a command such as
Warning messages are displayed on standard error if the number of
bits in decoded-file is not a multiple of the block
length, or if source-file is too short. Newlines
in these files are ignored, even though they would normally occur
at the ends of blocks.
Given a generator matrix in gen-file, this
program writes the positions of the systematic bits in a codeword to the
file systematic-file. The output file has the list of systematic positions, one on each line.
rand-src: Generate random message bits.
rand-src source-file seed n-bits
111011000110000
010010110010111
100000000000111
verify: Verify that decoded blocks are
codewords, and that they match the source.
verify [ -t ] pchk-file decoded-file [ gen-file [ source-file ] ]
data <- read.table(file,header=T)
extract_systematic: Extract the message bits from a block.
extract_systematic gen-file systematic-file
Back to index for LDPC software