📄 amtxhal.h
字号:
WINAPI AMTXHAL_CMDQ_ExeGetScanOutData(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
char *pc_scanOutDataByteBuffer,// I - pointer to scanOutData (TDO when JTAG scan)
long *pl_scanOutNumBytesReturned); // O - pointer to the number of returned bytes
//####################################################################################################
// COMMAND QUEUE (CMDQ) : CLEAR COMMAND QUEUE
//####################################################################################################
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_CMDQ_Clr(
long l_iceHandle); // I - handle returned by AMTXHAL_ICE_Open function
//####################################################################################################
// SCAN OUT BUFFER (SOBB) : Byte Buffer
//####################################################################################################
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SCOB_Initialize(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
char *pc_scanOutDataByteBuffer, // I - pointer to the output buffer
long l_bufferSize); // I - bytes buffer size of the output buffer (x bytes)
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SCOB_Finalize(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long *pl_scanOutNumBytesReturned); // O - number of returned bytes in the buffer
//####################################################################################################
// JTAG : GET FREQUENCY
//####################################################################################################
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_GetFrequency(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long *pl_frequencyIsInCMDQ, // O - return AMTXHAL_JTAG_FREQUENCY_IS_IN_QUEUE_
long *pl_frequencyInCMDQ, // O - return JTAG frequency in the CMDQ if isInCMDQ
long *pl_frequencyInCMDQ1, // O - return JTAG frequency in the CMDQ if isInCMDQ
long *pl_frequencyInICE); // O - return JTAG frequency actually in the ICE
//####################################################################################################
// JTAG : TDO ERROR
//####################################################################################################
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_GetTdoErrorFlag(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long *pl_tdoErrorFlag); // O - return AMTXHAL_BOOLEAN_TRUE if TDO check Error
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_GetTdoErrorInfo(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long *pl_tdoErrorFlag, // O - return AMTXHAL_BOOLEAN_TRUE if TDO check Error
long *pl_tdoErrorTargetID, // O - return Target ID where TDO error
long *pl_tdoErrorScanID, // O - return Scan ID where TDO error
long *pl_tdoErrorScanBitPos, // O - return Bit position where TDO error
long *pl_tdoErrorScanBytePos, // O - return Byte position where TDO error
long *pl_tdoErrorByteBitPos, // O - return bit position in bytewhere TDO error
char *pc_tdoErrorReadByte, // O - return the read TDO Byte where TDO error
char *pc_tdoErrorExpectedByte,// O - return the Expected TDO Byte where TDO error
char *pc_tdoErrorMaskedByte); // O - return the MASK TDO Byte where TDO error
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_ClrTdoErrorFlag(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID); // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
//####################################################################################################
// JTAG : JTAG ABSOLUTE TRAILER & HEADER
//####################################################################################################
// Allow to set the absolute Trailer and Header of your JTAG Chain.
// Using these functions, you have to make sure all your TAPs respect some JTAG rules:
// - Bypass mode is selected by setting all Instruction Register to '1'
// - Bypass mode shifts Data (TDI -> TDO) by one TCK (one Flip-Flop between TDI and TDO of the TAP)
// If one of the TAPs do not respect these rules, errors can occurs.
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_SetAbsoluteTrailer( // *** NOT YET IMPLEMENTED ***
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_trailerNumTap, // I - Number of TAP in the Trailer of the JTAG chain
long l_trailerIRLength); // I - Absolute Instruction Register Length for trailer
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAG_SetAbsoluteHeader( // *** NOT YET IMPLEMENTED ***
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_headerNumTap, // I - Number of TAP in the Header of the JTAG chain
long l_headerIRLength); // I - Absolute Instruction Register Length for Header
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////
// HIGH ABSTRACTION LAYER LEVEL //
//////////////////////////////////
//####################################################################################################
// JTAGXPLORE : some basic functions to get info on the JTAG scan chain, TAP IDCODE ...
//####################################################################################################
// Allow to check integrity of your JTAG Chain.
// Using these functions, you have to make sure all your TAPs respect some JTAG rules:
// - Bypass mode is selected by setting all Instruction Register to '1'
// - Bypass mode shift Data Register by one TCK (one Flip-Flop between TDI and TDO of the TAP)
// - After a RESET TJAG state, the IDCODE register is selected to be driven on TDO
// If one of the present TAPs does not respect these rules, errors can occurs.
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAGXPLORE_GetSafeChainInfo(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long *pl_safeChainStatus, // O - return AMTXHAL_XPLORE_JTAG_CHAIN_STATUS_
long *pl_safeTrstLevel, // O - return the level of the TRST see following note
long *pl_safeFrequency, // O - return maximal frequency in Hertz
long *pl_safeTapNum); // O - return the number of TAPs in the JTAG chain
// Note :
// TRST Level : If returned value is AMTXHAL_PORT_IO_LEVEL_1, your TRST signal must be driven to '1'
// before executing any JTAG scan.
// Otherwise, you could let your TRST signal as open (AMTXHAL_PORT_IO_LEVEL_Z)
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_JTAGXPLORE_GetTapID(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_tapIndex, // I - 0 to(tapNum-1). _XPLORE_JTAG_GetChainInfo->safeTapNum
long *pl_tapStatus, // O - return AMTXHAL_XPLORE_JTAG_TAP_
long *pl_tapID); // O - return TAP ID code on 32 bits
// Important note: The TAP Index 0 is corresponding to the tap returning the last TDO to the ICE
// Please see the following JTAG chain description example:
// JTAG chain construction. And where is my TAP[tapIndex] ?
// -------------------------------------------------------
// ICE PORT[X] (JTAGkey) -> TDI
// +
// TDI
// TAP[tapNum-1]
// TDO
// +
// TDI
// TAP[1]
// TDO
// +
// TDI
// TAP[0]
// TDO
// +
// ICE PORT[X] (JTAGkey) <- TDO
//####################################################################################################
// SVF : Serial Vector Format (USE JTAG and PIO). PIO NOT implemented yet!
//####################################################################################################
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_SetFrequencyFactor(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_percent); // I - x% frequency factor and adapt by x% runtest factor too
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_SetRuntestFactor(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_percent); // I - x% runtest factor
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_SetRuntestGuard(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_runtestGuard); // I - the maximum runtest to guard
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_SetOptimizer(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
long l_optimizerEn); // I - use AMTXHAL_SVF_OPTIMIZER_ENABLE_
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_ExeFile(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
char *pc_svfFileBuffer, // I - pointer to SVF filename buffer (pointer to char)
long l_bufferSize); // I - SVF filename buffer size
AMTXHAL_API
long // O - exit status
WINAPI AMTXHAL_SVF_ExeLine(
long l_iceHandle, // I - handle returned by AMTXHAL_ICE_Open function
long l_portID, // I - for non-expert, use AMTXHAL_PORT_ID_DEFAULT
char *pc_svfLineBuffer, // I - pointer to SVF Line buffer (pointer to char)
long l_bufferSize); // I - SVF line buffer size
#ifdef __cplusplus
}
#endif
#endif /* AMTXHAL_H */
//----------------------------------------------------------------------------------------------------
// END-OF amtxhal.h Amontec Hardware Abstraction Layer. More on http://www.amontec.com
//----------------------------------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -