XilinxProcessorIPLib/drivers/v_vscaler/src/xv_vscaler_l2.c
static void XV_VScalerSetCoeff(XV_Vscaler_l2 *VscPtr)
{
  int num_phases = 1<<VscPtr->Vsc.Config.PhaseShift;
  int num_taps   = VscPtr->Vsc.Config.NumTaps/2;
  int val,i,j,offset,rdIndx;
  UINTPTR baseAddr;

  offset = (XV_VSCALER_MAX_V_TAPS - VscPtr->Vsc.Config.NumTaps)/2;
  baseAddr = XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress(&VscPtr->Vsc);
  for (i=0; i < num_phases; i++)
  {
    for(j=0; j < num_taps; j++)
    {
       rdIndx = j*2+offset;
       val = (VscPtr->coeff[i][rdIndx+1] << 16) | (VscPtr->coeff[i][rdIndx] & XVSC_MASK_LOW_16BITS);
       Xil_Out32(baseAddr+((i*num_taps+j)*4), val);
    }
  }
}
/*****************************************************************************/
/**
* This function programs the computed filter coefficients and phase data into
* core registers
*
* @param  InstancePtr is a pointer to the core instance to be worked on.
* @param  VCoeff is the array that holds computed coefficients
*
* @return None
*
* @Note  This version of driver does not make use of computed coefficients.
*        Pre-computed coefficients are stored in a local table which are used
*        to overwrite any computed coefficients before being programmed into
*        the core registers. Control flow still computes the coefficients to
*        maintain the sw latency for driver version which would eventually use
*        computed coefficients
******************************************************************************/
This function programs the computed filter coefficients and phase data into
core registers
This function programs the computed filter coefficients and phase data into core registers
static void XV_VScalerSetCoeff(XV_Vscaler_l2 *VscPtr)
{
  int num_phases = 1<<VscPtr->Vsc.Config.PhaseShift;
  int num_taps   = VscPtr->Vsc.Config.NumTaps/2;
  int val,i,j,offset,rdIndx;
  UINTPTR baseAddr;
  offset = (XV_VSCALER_MAX_V_TAPS - VscPtr->Vsc.Config.NumTaps)/2;
  baseAddr = XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress(&VscPtr->Vsc);
  for (i=0; i < num_phases; i++)
  {
    for(j=0; j < num_taps; j++)
    {
       rdIndx = j*2+offset;
       val = (VscPtr->coeff[i][rdIndx+1] << 16) | (VscPtr->coeff[i][rdIndx] & XVSC_MASK_LOW_16BITS);
       Xil_Out32(baseAddr+((i*num_taps+j)*4), val);
    }
  }
}
static void XV_VScalerSetCoeff ( XV_Vscaler_l2 * VscPtr ) { int num_phases = 1 << VscPtr -> Vsc . Config . PhaseShift ; int num_taps = VscPtr -> Vsc . Config . NumTaps / 2 ; int val , i , j , offset , rdIndx ; UINTPTR baseAddr ; offset = ( XV_VSCALER_MAX_V_TAPS - VscPtr -> Vsc . Config . NumTaps ) / 2 ; baseAddr = XV_vscaler_Get_HwReg_vfltCoeff_BaseAddress ( & VscPtr -> Vsc ) ; for ( i = 0 ; i < num_phases ; i ++ ) { for ( j = 0 ; j < num_taps ; j ++ ) { rdIndx = j * 2 + offset ; val = ( VscPtr -> coeff [ i ] [ rdIndx + 1 ] << 16 ) | ( VscPtr -> coeff [ i ] [ rdIndx ] & XVSC_MASK_LOW_16BITS ) ; Xil_Out32 ( baseAddr + ( ( i * num_taps + j ) * 4 ) , val ) ; } } }
This function programs the computed filter coefficients and phase data into
core registers
This function programs the computed filter coefficients and phase data into core registers