📄 csl_vcp2aux.h
字号:
x0 = vcpConfigIc->ic0;
x1 = vcpConfigIc->ic1;
x2 = vcpConfigIc->ic2;
x3 = vcpConfigIc->ic3;
x4 = vcpConfigIc->ic4;
x5 = vcpConfigIc->ic5;
hVcp2Vbus->VCPIC0 = x0;
hVcp2Vbus->VCPIC1 = x1;
hVcp2Vbus->VCPIC2 = x2;
hVcp2Vbus->VCPIC3 = x3;
hVcp2Vbus->VCPIC4 = x4;
hVcp2Vbus->VCPIC5 = x5;
}
/**
* ============================================================================
* @n@b VCP2_icConfigArgs
*
* @b Description
* @n This function programs the VCP input configuration registers with the
* given values.
*
* @b Arguments
@verbatim
ic0 Value to program input configuration register 0.
ic1 Value to program input configuration register 1.
ic2 Value to program input configuration register 2.
ic3 Value to program input configuration register 3.
ic4 Value to program input configuration register 4.
ic5 Value to program input configuration register 5.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n VCP input configuration registers.
*
* @b Example
* @verbatim
Uint32 ic0, ic1, ic2, ic3, ic4, ic5;
...
ic0 = 0xf0b07050;
ic1 = 0x10320000;
ic2 = 0x000007fa;
ic3 = 0x00000054;
ic4 = 0x00800800;
ic5 = 0x51f3000c;
...
VCP2_icConfigArgs (ic0, ic1, ic2, ic3, ic4, ic5);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_icConfigArgs (
Uint32 ic0,
Uint32 ic1,
Uint32 ic2,
Uint32 ic3,
Uint32 ic4,
Uint32 ic5
)
{
hVcp2Vbus->VCPIC0 = ic0;
hVcp2Vbus->VCPIC1 = ic1;
hVcp2Vbus->VCPIC2 = ic2;
hVcp2Vbus->VCPIC3 = ic3;
hVcp2Vbus->VCPIC4 = ic4;
hVcp2Vbus->VCPIC5 = ic5;
}
/**
* ============================================================================
* @n@b VCP2_setBmEndian
*
* @b Description
* @n This function programs the VCP to view the format of the branch metrics
* data as either native 8-bit format ('1') or values packed into 32-bit
* words in little endian format ('0').
*
* @b Arguments
@verbatim
bmEnd '1' for native 8-bit format and '0' for 32-bit word packed
format
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n VCP endian register.
*
* @b Example
* @verbatim
Uint32 bmEnd = VCP2_END_NATIVE;
VCP2_setBmEndian (bmEnd);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setBmEndian (
Uint32 bmEnd
)
{
CSL_FINS (hVcp2->VCPEND, VCP2_VCPEND_BM, bmEnd);
}
/**
* ============================================================================
* @n@b VCP2_setNativeEndian
*
* @b Description
* @n This function programs the VCP to view the format of all data as native
* 8-bit format.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n VCP endian register.
*
* @b Example
* @verbatim
VCP2_setNativeEndian ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setNativeEndian (
void
)
{
CSL_FINST (hVcp2->VCPEND, VCP2_VCPEND_BM, NATIVE);
CSL_FINST (hVcp2->VCPEND, VCP2_VCPEND_SD, NATIVE);
}
/**
* ============================================================================
* @n@b VCP2_setPacked32Endian
*
* @b Description
* @n This function programs the VCP to view the format of all data as packed
* data in 32-bit words.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n VCP endian register.
*
* @b Example
* @verbatim
VCP2_setPacked32Endian ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setPacked32Endian (
void
)
{
CSL_FINST (hVcp2->VCPEND, VCP2_VCPEND_BM, 32BIT);
CSL_FINST (hVcp2->VCPEND, VCP2_VCPEND_SD, 32BIT);
}
/**
* ============================================================================
* @n@b VCP2_setSdEndian
*
* @b Description
* @n This function programs the VCP to view the format of the soft decision
* data as either native 8-bit format ('1') or values packed into 32-bit
* words in little endian format ('0').
*
* @b Arguments
@verbatim
sdEnd '1' for native 8-bit format and '0' for 32-bit word packed
format
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n VCP endian register.
*
* @b Example
* @verbatim
Uint32 sdEnd = VCP2_END_NATIVE;
VCP2_setSdEndian (sdEnd);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setSdEndian (
Uint32 sdEnd
)
{
CSL_FINS (hVcp2->VCPEND, VCP2_VCPEND_SD, sdEnd);
}
/**
* ============================================================================
* @n@b VCP2_addPoly
*
* @b Description
* @n This function is used to add either predefined or user defined
* Polynomials to the generated VCP2_Params.
*
* @b Arguments
@verbatim
pPoly Pointer to the structure of type VCP2_Poly containing
the values of generator polynomials.
pParams Pointer to the structure of type VCP2_Params containing
the generated values for input configuration registers.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n Structure of type VCP2_Params passed as arguement to the function.
*
* @b Example
* @verbatim
VCP2_Poly poly = {VCP2_GEN_POLY_3, VCP2_GEN_POLY_1,
VCP2_GEN_POLY_2, VCP2_GEN_POLY_3};
VCP2_Params params;
VCP2_Baseparams baseParams;
...
VCP2_genParams (&baseParams, ¶ms);
VCP2_addPoly (&poly, ¶ms);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_addPoly (
VCP2_Poly *poly,
VCP2_Params *params
)
{
Uint8 x0, x1, x2, x3;
x0 = poly->poly0;
x1 = poly->poly1;
x2 = poly->poly2;
x3 = poly->poly3;
params->poly0 = x0;
params->poly1 = x1;
params->poly2 = x2;
params->poly3 = x3;
}
/**
* ============================================================================
* @n@b VCP2_statError
*
* @b Description
* @n This function returns a Boolean value indicating whether any VCP error
* has occurred.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> Boolean value
* @li bitStatus ERR bit field value of VCP status register 0.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li FALSE - No error.
* @li TRUE - VCP paused due to error.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
VCP2_Error error;
// check whether an error has occurred
if (VCP2_statError ()) {
VCP2_getErrors (&error);
} // end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Bool VCP2_statError (
void
)
{
return (Bool) CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_ERR);
}
/**
* ============================================================================
* @n@b VCP2_statInFifo
*
* @b Description
* @n This function returns the input FIFO's empty status flag. A '1'
* indicates that the input FIFO is empty and a '0' indicates it is not
* empty.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> bitStatus
* @li bitStatus IFEMP bit field value of VCP status register 0.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - Input FIFO is not empty.
* @li 1 - Input FIFO is empty.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
If (VCP2_statInFifo ()) {
...
} // end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statInFifo (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_IFEMP);
}
/**
* ============================================================================
* @n@b VCP2_statOutFifo
*
* @b Description
* @n This function returns the output FIFO's full status flag. A '1'
* indicates that the output FIFO is full and a '0' indicates it is not.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> bitStatus
* @li bitStatus OFFUL bit field value of VCP status register 0.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - Output FIFO is not full.
* @li 1 - Output FIFO is full.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
If (VCP2_statOutFifo ()) {
...
} // end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statOutFifo (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_OFFUL);
}
/**
* ============================================================================
* @n@b VCP2_statPause
*
* @b Description
* @n This function returns the PAUSE bit status indicating whether the VCP is
* paused or not.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> bitStatus
* @li bitStatus PAUSE bit field value of VCP status register 0.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - VCP is not paused.
* @li 1 - VCP is paused.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
// Pause the VCP.
VCP2_pause ();
// Wait for pause to take place
while (! VCP2_statPause ());
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statPause (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_PAUSE);
}
/**
* ============================================================================
* @n@b VCP2_statRun
*
* @b Description
* @n This function returns the RUN bit status indicating whether the VCP is
* running or not.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> bitStatus
* @li bitStatus RUN bit field value of VCP status register 0.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - VCP is not running.
* @li 1 - VCP is running.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
// start the VCP
VCP2_start ();
// check that the VCP is running
while (! VCP2_statRun ());
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statRun (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_RUN);
}
/**
* ============================================================================
* @n@b VCP2_statSymProc
*
* @b Description
* @n This function returns the number of symbols processed, NSYMPROC bitfield
* of VCP.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> Value
* @li Value Number of symbols processed.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n None.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
Uint32 numSym;
...
numSym = VCP2_statSymProc ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statSymProc (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_NSYMPROC);
}
/**
* ============================================================================
* @n@b VCP2_statWaitIc
*
* @b Description
* @n This function returns the WIC bit status indicating whether the VCP is
* waiting to receive new input configuration values.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -