main_ctcenc.c
来自「介绍关于WiMax(IEEE802.16)物理层调制解调编码等相关设计实现」· C语言 代码 · 共 55 行
C
55 行
/*****************************************************************************//* FIle Name : main_turbo.c *//* Description : Main routine to Test FEC Type2 *//* author : miffie *//* Date : sep/26/05 *//* Copyright (c) 2005 miffie All rights reserved. *//*****************************************************************************/#include <math.h>#include <stdio.h>#include <stdlib.h>//Global variableschar print_on = 1 ;#define PRINTF if (print_on) printf#define FPRINTF if (print_on) fprintf#include "../env/binaryset.c"#include "../env/utility.c"#include "ctc_enc.c"main(){ register int ii , jj, kk ; char fail ; short NN , noise ; struct binaryset exp , encoded, bset0, bset1; unsigned char data[512] ; char fec_code_type ; //multiple tests for (jj=0;jj<10000;jj++) { //each test /* for known data, stick a few numbers into a zero codeword. Data is in polynomial form. */ //make a binary set NN = (int_random(27) +1)*16 ; //16-27*16 fec_code_type = 13 ; // int_random(7) + 13 ; //13-19 printf("\n %d th Test(fec_code_type=%d NN=%d\n\n", jj, NN, fec_code_type ) ; for (ii=0; ii<NN/4; ii++) data[ii] = int_random(256) ; bset0.format = 1 ; bset0.data = &data[0] ; bset0.size = NN/4 ; exp = copy_binaryset(bset0) ; //print_binaryset(bset0) ; bset0 = ctc_encoder(bset0, fec_code_type , 16 ) ; print_binaryset(bset0) ; } //each test}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?