📄 csl_vcp2aux.h
字号:
* <b>Return Value </b> bitStatus
* @li bitStatus WIC 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 waiting for input configuration words.
* @li 1 - VCP is waiting for input configuration words.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
If (VCP2_statWaitIc ()) {
...
} // end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statWaitIc (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_WIC);
}
/**
* ============================================================================
* @n@b VCP2_start
*
* @b Description
* @n This function starts the VCP by writing a start command to the VCPEXE
* register.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n VCP is started.
*
* @b Modifies
* @n VCP execution register.
*
* @b Example
* @verbatim
VCP2_start ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_start (
void
)
{
CSL_FINST (hVcp2->VCPEXE, VCP2_VCPEXE_COMMAND, START);
}
/**
* ============================================================================
* @n@b VCP2_pause
*
* @b Description
* @n This function pauses the VCP by writing a pause command to the VCPEXE
* register.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n The VCP should be operating in debug/emulation mode.
*
* <b>Post Condition </b>
* @n VCP is paused.
*
* @b Modifies
* @n VCP execution register.
*
* @b Example
* @verbatim
VCP2_pause ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_pause (
void
)
{
CSL_FINST (hVcp2->VCPEXE, VCP2_VCPEXE_COMMAND, PAUSE);
}
/**
* ============================================================================
* @n@b VCP2_unpause
*
* @b Description
* @n This function un-pauses the VCP, previously paused by VCP2_pause()
* function, by writing the un-pause command to the VCPEXE register.
* This function restarts the VCP at the beginning of current
* traceback, and VCP will run to normal completion.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n The VCP should be operating in debug/emulation mode.
*
* <b>Post Condition </b>
* @n VCP is restarted.
*
* @b Modifies
* @n VCP execution register.
*
* @b Example
* @verbatim
VCP2_unpause ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_unpause (
void
)
{
CSL_FINST (hVcp2->VCPEXE, VCP2_VCPEXE_COMMAND, RESTART);
}
/**
* ============================================================================
* @n@b VCP2_stepTraceback
*
* @b Description
* @n This function un-pauses the VCP, previously paused by VCP2_pause()
* function, by writing the un-pause command to the VCPEXE register.
* This function restarts the VCP at the beginning of current
* traceback and halts at the next traceback (i.e Step Single Traceback).
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n The VCP should be operating in debug/emulation mode.
*
* <b>Post Condition </b>
* @n VCP is restarted.
*
* @b Modifies
* @n VCP execution register.
*
* @b Example
* @verbatim
VCP2_stepTraceback ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_stepTraceback (
void
)
{
CSL_FINST (hVcp2->VCPEXE, VCP2_VCPEXE_COMMAND, RESTART_PAUSE);
}
/**
* ============================================================================
* @n@b VCP2_reset
*
* @b Description
* @n This function sets all the VCP control registers to their default
* values.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n All registers in the VCP are reset except for the execution register,
* endian register, emulation register and other internal registers.
*
* @b Modifies
* @n VCP execution register.
*
* @b Example
* @verbatim
VCP2_reset ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_reset (
void
)
{
CSL_FINST (hVcp2->VCPEXE, VCP2_VCPEXE_COMMAND, STOP);
}
/**
* ============================================================================
* @n@b VCP2_getErrors
*
* @b Description
* @n This function will acquire the VCPERR register values and fill in the
* fields of VCP2_Error structure and pass it back as the results.
*
* @b Arguments
@verbatim
pVcpErr Pointer to the VCP2_Errors structure instance.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The fields of the VCP2_Errors structure indicate the respective errors if
* occurred.
*
* @b Modifies
* @n VCPSTAT0 register, as a side effect. Clears ERR bit.
*
* @b Example
* @verbatim
VCP2_Errors error;
// check whether an error has occurred
if (VCP2_statError ()) {
VCP2_getErrors (&error);
} // end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_getErrors (
VCP2_Errors *pVcpErr
)
{
pVcpErr->tbnaErr = (Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_TBNAERR);
pVcpErr->ftlErr = (Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_FTLERR);
pVcpErr->fctlErr = (Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_FCTLERR);
pVcpErr->maxminErr =
(Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_MAXMINERR);
pVcpErr->symxErr = (Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_E_SYMX);
pVcpErr->symrErr = (Bool) CSL_FEXT (hVcp2->VCPERR, VCP2_VCPERR_E_SYMR);
}
/**
* ============================================================================
* @n@b VCP2_statEmuHalt
*
* @b Description
* @n This function returns the EMUHALT bit status indicating whether the VCP
* halt is due to emulation or not.
*
* @b Arguments
@verbatim
None.
@endverbatim
*
* <b>Return Value </b> bitStatus
* @li bitStatus Emuhalt 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 - Not halt due to emulation.
* @li 1 - Halt due to emulation.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
If (VCP2_statEmuHalt ()) {
...
}// end if
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_statEmuHalt (
void
)
{
return CSL_FEXT (hVcp2->VCPSTAT0, VCP2_VCPSTAT0_EMUHALT);
}
/**
* ============================================================================
* @n@b VCP2_getVssSleepMode
*
* @b Description
* @n This function returns the value programmed into VCPEND register for
* sleep mode indicating if sleep mode is disabled or if internal power
* down control is enabled for SPLZVSS.
*
* @b Arguments
@verbatim
None
@endverbatim
*
* <b>Return Value </b> Value
* @li Value Sleep mode enable/disable.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - Sleep mode disabled.
* @li 1 - Sleep mode enabled.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
Uint32 slpMode;
slpMode = VCP2_getVssSleepMode ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_getVssSleepMode (
void
)
{
return CSL_FEXT (hVcp2->VCPEND, VCP2_VCPEND_SLPZVSS_EN);
}
/**
* ============================================================================
* @n@b VCP2_getVddSleepMode
*
* @b Description
* @n This function returns the value programmed into VCPEND register for
* sleep mode indicating if sleep mode is disabled or if internal power
* down control is enabled for SPLZVDD.
*
* @b Arguments
@verbatim
None
@endverbatim
*
* <b>Return Value </b> Value
* @li Value Sleep mode enable/disable.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n The returned value indicates
* @li 0 - Sleep mode disabled.
* @li 1 - Sleep mode enabled.
*
* @b Modifies
* @n None.
*
* @b Example
* @verbatim
Uint32 slpMode;
slpMode = VCP2_getVddSleepMode ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
Uint32 VCP2_getVddSleepMode (
void
)
{
return CSL_FEXT (hVcp2->VCPEND, VCP2_VCPEND_SLPZVDD_EN);
}
/**
* ============================================================================
* @n@b VCP2_setVssSleepMode
*
* @b Description
* @n This function either disables sleep mode or enables the internal power
* down control of SLPZVSS.
*
* @b Arguments
@verbatim
slpMode '0' to disable sleep mode and '1' to enable internal
power down control for SLPZVSS.
@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_setVssSleepMode (1);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setVssSleepMode (
Uint32 slpMode
)
{
CSL_FINS (hVcp2->VCPEND, VCP2_VCPEND_SLPZVSS_EN, slpMode);
}
/**
* ============================================================================
* @n@b VCP2_setVddSleepMode
*
* @b Description
* @n This function either disables sleep mode or enables the internal power
* down control of SLPZVDD.
*
* @b Arguments
@verbatim
slpMode '0' to disable sleep mode and '1' to enable internal
power down control for SLPZVDD.
@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_setVDDSleepMode (1);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_setVddSleepMode (
Uint32 slpMode
)
{
CSL_FINS (hVcp2->VCPEND, VCP2_VCPEND_SLPZVDD_EN, slpMode);
}
/**
* ============================================================================
* @n@b VCP2_emuEnable
*
* @b Description
* @n This function enables the emulation/debug mode of VCP.
*
* @b Arguments
@verbatim
emuMode '0' to halt VCP at the end of completion of the current
window of state metric processing or at the end of a
frame. '1' to halt the VCP at the end of completion of
the processing of the frame.
@endverbatim
*
* <b>Return Value </b>
* @n None.
*
* <b>Pre Condition </b>
* @n None.
*
* <b>Post Condition </b>
* @n Emulation mode is enabled.
*
* @b Modifies
* @n VCP emulation control register.
*
* @b Example
* @verbatim
Uint16 emuMode = VCP2_EMUHALT_DEFAULT;
VCP2_emuEnable (emuMode);
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_emuEnable (
Uint16 emuMode
)
{
CSL_FINST (hVcp2->VCPEMU, VCP2_VCPEMU_FREE, SOFT_EN);
CSL_FINS (hVcp2->VCPEMU, VCP2_VCPEMU_SOFT, emuMode);
}
/**
* ============================================================================
* @n@b VCP2_emuDisable
*
* @b Description
* @n This function disables the emulation/debug mode of VCP.
*
* @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 emulation control register.
*
* @b Example
* @verbatim
VCP2_emuDisable ();
@endverbatim
* ============================================================================
*/
CSL_IDEF_INLINE
void VCP2_emuDisable (
void
)
{
CSL_FINST (hVcp2->VCPEMU, VCP2_VCPEMU_FREE, FREE);
}
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -