Giter Site home page Giter Site logo

turbofec's Introduction

About TurboFEC

TurboFEC is an implementation of LTE forward error correction encoders and decoders. Included are convolutional codes, turbo codes, and associated rate matching units that handle block interleaving, bit selection, and pruning.

Using x86 SIMD instructions, the convolutional and turbo decoders are currently the fastest implementations openly available. If you believe the preceding statement to be false, please contact the author to discuss further optimizations.

Convolutional decoding uses Intel SSE3, SSE4, and AVX2 instructions if available.

Turbo decoding requires Intel SSE3 or higher.

LTE specification and sections:

3GPP TS 36.212 "LTE Multiplexing and channel coding"

5.1.3.1 "Tail biting convolutional code"

5.1.3.2 "Turbo encoding"

5.1.3.1 "Rate matching for turbo coded transport channels"

5.1.3.2 "Rate matching for convolutionally coded transport channels and control information"

Compile

$ autoreconf -i
$ ./configure
$ make

Test

$ make check

A collection of GSM, LTE, and other forward error correcting codes will be tested.

=================================================
[+] Testing: GSM TCH/AHS 5.15
[.] Specs: (N=3, K=5, recursive, flushed, punctured)

[.] BER test:
[..] Testing:
[..] Input BER.......................... 0.007450
[..] Output BER......................... 0.000000
[..] Output FER......................... 0.000000

=================================================
[+] Testing: LTE PBCH
[.] Specs: (N=3, K=7, non-recursive, tail-biting, non-punctured)

[.] BER test:
[..] Testing:
[..] Input BER.......................... 0.007478
[..] Output BER......................... 0.000000
[..] Output FER......................... 0.000000

PASS: conv_test

=================================================
[+] Testing: 3GPP LTE turbo
[.] Specs: (N=2, K=4), Length 6144

[.] BER test:
[..] Testing:
[..] Input BER.......................... 0.007479
[..] Output BER......................... 0.000000
[..] Output FER......................... 0.000000

PASS: turbo_test

Install

$ sudo make install

Benchmark

Various convolutional and turbo decoding tests are available.

$ tests/turbo_test -h
Options:
  -h    This text
  -p    Number of packets (per thread)
  -j    Number of threads for benchmark
  -i    Number of turbo iterations
  -a    Run all tests
  -b    Run benchmark tests
  -n    Run length checks
  -r    Specify SNR in dB (default 8.0 dB)
  -e    Run bit error rate tests
  -c    Test specific code
  -l    List supported codes

Benchmark LTE turbo codes with 8 threads, 4 iterations, and 10000 blocks per thread.

$ tests/turbo_test -b -j 8 -i 4 -p 10000

=================================================
[+] Testing: 3GPP LTE turbo
[.] Specs: (N=2, K=4), Length 6144

[.] Performance benchmark:
[..] Decoding 80000 bursts on 8 thread(s) with 4 iteration(s)
[..] Testing:
[..] Elapsed time....................... 5.925372 secs
[..] Rate............................... 83.043313 Mbps

turbofec's People

Contributors

neofob avatar openphy avatar ttsou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

turbofec's Issues

Running on windows

Hi,

I want to run this code along with tests on windows 10. Can you let me know which software tools i need to use to run this code.

Regards
Shivani

autoreconf failure

The current state of the repository could not be built. The autoreconf -i command leads to the following error:
$ autoreconf -i
libtoolize: putting auxiliary files in .'. libtoolize: copying file ./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, m4'. libtoolize: copying file m4/libtool.m4'
libtoolize: copying file m4/ltoptions.m4' libtoolize: copying file m4/ltsugar.m4'
libtoolize: copying file m4/ltversion.m4' libtoolize: copying file m4/lt~obsolete.m4'
configure.ac:6: installing ./config.guess' configure.ac:6: installing ./config.sub'
configure.ac:5: installing ./install-sh' configure.ac:5: installing ./missing'
src/Makefile.am: installing ./depcomp' tests/Makefile.am:1: option serial-tests' not recognized
autoreconf: automake failed with exit status: 1

some info are needed

Hi Tom,
i need to ask you some questions about your project.

Are you still active?

Thansk a lot.

Kind Regards,
Francesco

Your turbo encoder/decoder and AFF3CT

Hi,

It is a very interesting work, really!

I contact you because I'm a part on the AFF3CT project (see https://github.com/aff3ct/aff3ct).
Our motivations are detailed here: https://aff3ct.readthedocs.io/en/v2.2.2/user/introduction/introduction.html.

We previously worked a little bit on LTE Turbo decoder (see https://doi.org/10.1109/ISTC.2016.7593092) and I found that your source code is well optimized and I think that it could be nice to have your code integrated into AFF3CT.
To my mind here are some advantages to be a part of AFF3CT:

  • a continuous integration platform (limit the possible regressions),
  • we hope that to be a part of AFF3CT will give more visibility for everyone (common interfaces between all the ECCs, documentation, code reusability, etc.),
  • many modules like modems and channels can be reused.

And you what do you think?

Having some issues

Thank you for providing this code.

I was having problems in my own code with the decoder returning all zeros, so I changed turbo_test.c to not pass the correct info to the decoder, but rather get the decoder to return the decoded bits in a separate array as follows:

static int error_test(const struct lte_test_vector *test,
		      int num_pkts, int iter, float snr)
{
	int i, n, l, iber = 0, ober = 0, fer = 0;
	int8_t *bs0, *bs1, *bs2;
	uint8_t *in, *bu0, *bu1, *bu2, *decoded;  // Added decoded array

	in  = malloc(sizeof(uint8_t) * MAX_LEN_BITS);
	bu0 = malloc(sizeof(uint8_t) * MAX_LEN_BITS);
	decoded = malloc(sizeof(uint8_t) * MAX_LEN_BITS); // Allocate space for the decoded bits
	bu1 = malloc(sizeof(uint8_t) * MAX_LEN_BITS);
	bu2 = malloc(sizeof(uint8_t) * MAX_LEN_BITS);
	bs0 = malloc(sizeof(int8_t) * MAX_LEN_BITS);
	bs1 = malloc(sizeof(int8_t) * MAX_LEN_BITS);
	bs2 = malloc(sizeof(int8_t) * MAX_LEN_BITS);

	struct tdecoder *tdec = alloc_tdec();

	for (i = 0; i < num_pkts; i++) {
		fill_random(in, test->in_len);
		l = lte_turbo_encode(test->code, in, bu0, bu1, bu2);
		if (l != test->out_len) {
			printf("ERROR !\n");
			fprintf(stderr, "[!] Failed encoding length check (%i)\n",
				l);
			return -1;
		}

		iber += uint8_to_err(bs0, bu0, LEN + 4, snr);
		iber += uint8_to_err(bs1, bu1, LEN + 4, snr);
		iber += uint8_to_err(bs2, bu2, LEN + 4, snr);

// Request the decoder put the decisions in the new decoded array
		lte_turbo_decode_unpack(tdec, LEN, iter, decoded, bs0, bs1, bs2);

// Check for bit errors using new decoded array
	        for (n = 0; n < test->in_len; n++) {
			if (in[n] != decoded[n])
				ober++;
		}

// Check for frame errors using new decoded array
		if (memcmp(in, decoded, test->in_len))
			fer++;
	}

	print_error_results(test, iber, ober, fer, num_pkts);

	free(in);
	free(bs0);
	free(bs1);
	free(bs2);
	free(bu0);
	free(bu1);
	free(bu2);

	return 0;
}

'
Then I get:

/turbo_test -e

=================================================
[+] Testing: 3GPP LTE turbo
[.] Specs: (N=2, K=4), Length 10000

[.] BER test:
[..] Testing:
[..] Input BER.......................... 0.007483
[..] Output BER......................... 0.500183
[..] Output FER......................... 1.000000

which leads me to believe there is a problem, either with the build or with the code. Can you check this on your system? Do you see any problem with my new version of error_test?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.