/******************************************************************************* NAME fpgaCwtDiag.h SUMMARY header file for Zebulon fpga CWT function diagnostics VERSION %version: 1 % UPDATE DATE %date_modified: Apr 28 15:45 2009 % PROGRAMMER %created_by: Jim Tu % Copyright 2009 Quanta Corporation. All Rights Reserved. DESCRIPTION: This file has code to test CWT function of Zebulon fpga NOTES: REFERENCE: *******************************************************************************/ #ifndef __FPGA_CWT_DIAG_H__ #define __FPGA_CWT_DIAG_H__ #define FPGA_CWT_WRANING_DELAY 500 #define FPGA_CWT_FAULTED_DELAY 810 #define FPGA_CWT_WRANING_TEST_TIMES 100 //CWT test status code #define FPGA_CWT_SEQ_NORMAL 0x00 #define FPGA_CWT_SEQ_WARNING 0x04 #define FPGA_CWT_SEQ_WARNING_TIME_CORRECT 0x06 #define FPGA_CWT_SEQ_FAULTED 0x08 #define FPGA_CWT_RESULT_GOOD 0x00 #define FPGA_CWT_RESULT_WARNING_FAIL 0x01 #define FPGA_CWT_RESULT_FAULTED_FAIL 0x02 #define FPGA_CWT_RESULT_RESET_FAIL 0x04 #define FPGA_CWT_RESULT_TIMER_FAIL 0x08 //CWT test information offset (in NVSRAM) #define FPGA_CWT_DIAG_SEQ_RECORD_OFFSET 0x06 #define FPGA_CWT_ENCODED_UINT8_0_LOCATION 0x07 #define FPGA_CWT_ENCODED_UINT8_1_LOCATION 0x08 #define FPGA_CWT_ENCODED_UINT8_2_LOCATION 0x09 #define FPGA_CWT_RESULT_OFFSET 0x0A //CWT encoded pattern (reset use) #define FPGA_CWT_ENCODED_PATTERN_0 0xC5 #define FPGA_CWT_ENCODED_PATTERN_1 0x3A #define FPGA_CWT_ENCODED_PATTERN_2 0x72 /*** Export Function ***/ INT32 fpgaCwtDiag(VOID); #endif //__FPGA_CWT_DIAG_H__