?? convolution.c
字號:
/*************************************************************************** * convolution.c - Software Radio convolutional coding module * ------------------- * begin : 03/12/10 * authors : Roman Hofer * emails : roman.hofer@epfl.ch ***************************************************************************//*************************************************************************** * Changes * ------- * date - name - description * **************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#include "spc.h"/** * This module does a convolutional encoding/decoding. * The code can be chosen according to the following parameters * n Number of transmitted bits per k data bits * k Number of data bits per n transmitted bits * m Number of memory registers * polys Array of polynome definition. The number of polynomes must be equal to n * * Any values of n and k are legal, but a useful code can only be achieved * if k>=n and n<=m * * The transmitted code blocklength is >= n/k times the data blocklength. Thus * a large n/k reduces capacity but improves error resistance due to higher redundancy. * * For implementation reasons, m is limited to 32 (number of bits in an int value). * Still, for memory and performance reasons only m << 32 are possible */#define DBG_LVL 0int rcv_module_init( void );void rcv_module_exit( void );int send_module_init( void );void send_module_exit( void );/* * Just call the two init-functions */int spc_module_init(void) { if( rcv_module_init() < 0 ) { PR_DBG( 0, "Couldn't init rcv-part\n" ); return -1; } if ( send_module_init() < 0 ) { rcv_module_exit(); PR_DBG( 0, "Couldn't init send-part\n" ); return -1; } return 0;}/* * And call the two exit-funcitons */void spc_module_exit( void ) { rcv_module_exit(); send_module_exit();}module_init( spc_module_init );module_exit( spc_module_exit );
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -