⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 经典的Fano编码源代码
💻
字号:
Fano decoder v1.1Copyright 1995 Phil KarnThis package includes an encoder and a soft-decision sequentialdecoder for K=32, rate 1/2 convolutional codes. The decoder uses theFano algorithm.Also included are support routines to generate metric tables that areoptimized for gaussian noise with a specified Eb/N0 ratio, and a testdriver that exercises the encoder/decoder routines and keeps statistics.The files are as follows:README		this fileMakefile	Makefile for GCC under BSDI 2.0 (edit to taste)fano.h		header file with declarations for fano.cfano.c		the encoder and Fano decoder routinesmetrics.c	metric table generatorsim.c		transmitter/channel simulator (including gaussian noise gen)seqtest.c	driver program for testingtab.c		parity lookup tableThe test program in seqtest.c creates a test frame, encodes it, addsgaussian noise and decodes it. It then repeats a specified number oftimes, keeping a histogram on the number of decoder cycles requiredper bit. By default, the program continuously displays the statisticsusing the UNIX "curses" package; this can be suppressed with the -q(quiet) option.The gaussian random number generator in sim.c uses the traditional"rejection" method. This requires slightly more than one floatingpoint square root and log function per pair of gaussian numbers. Thismakes noise generation rather slow, much slower in fact than theactual sequential decoding process (except for very noisypackets). The BSDI 2.0 math library routines do not make use of thenative 387 FPU instructions, and this made it even slower. So themakefile specifies a separate library that I built locally (-lm387)with versions of the log and sqrt functions that do use the FPU. Other386/486 UNIX clones apparently do have updated math libraries, so thisspecial library shouldn't be necessary. In that case, simply eliminatethe reference to -lm387. If you do need my lm387 library, let me knowand I can package it up for release.If you want to time the speed of the decoder, use the -t (timetest)option.  This executes the decoder in a tight loop repeatedly decodingthe same packet, allowing you to test just the decoder and not thenoise generator or screen update routines. Use the UNIX "time" commandto get your results.Three code polynomials are supported as described in fano.c. A #definestatement at the top of fano.c selects the polynomial.The arguments to the encoder and decoder routines are documented incomments in fano.c. Note that the encoded symbols created by encode()take on the values 0 and 1, while fano() ordinarily expects 8-bitsoft-decision receive symbols. The interpretation of these symbols bythe decoder is completely determined by the metric table.The metric table generator in gen_met() in metrics.c assumes thechannel is corrupted by gaussian noise at some specified level, thatthe received symbols from the modem are offset-128 binary with somespecified amplitude, and that symbol value corresponding to atransmitted "1" is larger than for a "0".  Given these parameters itbuilds the table from by computing the log-likelihood function foreach possible received symbol value.The performance of a sequential decoder depends critically on theaccuracy of its metric table. In some cases (e.g., the estimated noiselevel is incorrect) the degradation may be relatively minor. But ifthe table is way off, e.g., if the signal level is so low compared tothe expected values that a negative metric results even on the correctpath, then the decoder won't work even if the signal is otherwisecompletely clean.By generating the appropriate metric table, you could use the decoderon some other kind of channel. For example, on a binary (harddecision) channel there would only be four table entries correspondingto the four channel transition probabilities. And if the channel issymmetric (BSC), this 2x2 matrix would also be symmetric.If you use this decoder in an actual application, you won't need sim.cand seqtest.c. Also, instead of including metrics.c to compute themetric tables at application run time, you could build a set of metrictables into static tables, perhaps for several fixed Eb/N0s. Thiswould avoid floating point math in your runtime package.Any real application will also probably require an interleaver, sinceconvolutional coders (especially sequential decoders) are highlysensitive to burst errors.Phil KarnMarch 1995: version 1.0Original release for BSDI 1.1August 5, 1995: version 1.1Updated for BSDI 2.0 - changes in curses/termcapSeveral minor bugs fixed: - fencepost error in cycle count returned by fano() - correct returned value of cumulative metric - clean up computation of noise level for gen_met() in seqtest.c, change   convention to conform to viterbi 1.1 package

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -