Capsim Block Documentation
Blind adaptive equalization
Num | Type | Name | Initial Value | Description |
---|---|---|---|---|
0 | float** | x_P | ||
1 | float** | w_P | ||
2 | int | mucounter | ||
3 | int | varcounter | ||
4 | float | tmpvar | ||
5 | float | tmpmu |
int i; int j, k; float register1[2]; float register2[2]; float output[2]; float lambda11=0.0, lambda21=0.0, lambda22=0.0, lambda12=0.0; float xtemp=0.0, ytemp=0.0; FILE *fopen(); FILE *imp_F; FILE *imp; FILE *imp_W; |
---|
/* * Allocate memory and return pointers for tapped delay line x_P and * array containing impulse response samples, h_P. * */ if( (x_P = (float**)calloc(2,sizeof(float*))) == NULL || (w_P = (float**)calloc(2,sizeof(float*))) == NULL ) { fprintf(stderr,"convolve: can't allocate work space\n"); return(4); } for(i=0; i<2; i++) if( (x_P[i] = (float*)calloc(N,sizeof(float))) == NULL || (w_P[i] = (float*)calloc(N,sizeof(float))) == NULL ) { fprintf(stderr,"convolve: can't allocate work space\n"); return(4); } /* * Read in the impulse response samples into the array * and initialize the tapped delay line to zero. * According to this for loop the impulse data is assumed to be * in the order of first real then imaginary value for each tap * */ tmpvar = var; tmpmu = mu; mucounter = 0; varcounter = 0; w_P[0][0] = init; for(j=1;j |
---|
while(IT_IN(0) && IT_IN(1)){ /* * Shift input samples into tapped delay line */ mucounter++ ; varcounter++ ; for( i=0 ; i<2 ; i++) register2[i] = INF(i,0); for(i=0; i |
---|
free(x_P); free(w_P); |
---|
/* Capsim (r) Text Mode Kernel (TMK) Star Library (Blocks) Copyright (C) 1989-2017 Silicon DSP Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA http://www.silicondsp.com Silicon DSP Corporation Las Vegas, Nevada */ |
---|
/* blindadapt.s */ /*********************************************************************** blindadapt() ************************************************************************ |
---|