/******************************************************************************* NAME fpgaProgramDiag.h SUMMARY header file for Zebulon fpga programming function diagnostics VERSION %version: 1 % UPDATE DATE %date_modified: Apr 28 17:00 2009 % PROGRAMMER %created_by: Jim Tu % Copyright 2009 Quanta Corporation. All Rights Reserved. DESCRIPTION: This file has code to test programming function of Zebulon fpga NOTES: REFERENCE: *******************************************************************************/ #ifndef __FPGA_PROGRAM_DIAG_H__ #define __FPGA_PROGRAM_DIAG_H__ /*** Operation Code ***/ #define WRITE_ENABLE (UINT8)0x06 #define WRITE_DISABLE (UINT8)0x04 #define READ_STATUS (UINT8)0x05 #define READ_UINT8S (UINT8)0x03 #define READ_SILICON_ID (UINT8)0xAB #define WRITE_STATUS (UINT8)0x01 #define WRITE_UINT8S (UINT8)0x02 #define ERASE_BULK (UINT8)0xC7 #define ERASE_SECTOR (UINT8)0xD8 #define DUMMY (UINT8)0x08 /*** EPCS ID ***/ #define EPCS1_ID 0x10 #define EPCS4_ID 0x12 /*** EPCS information ***/ #define EPCS_PAGE_SIZE 0x100 #define EPCS_BULK_SIZE 0x80000 //512KB #define EPCS_SECTOR_SIZE (EPCS_BULK_SIZE >> 3) //64KB #define EPCS_SECTOR_NUM 8 /*** Function ***/ VOID fpgaReconfig(BOOLEAN status); INT32 fpgaProgramEpcs(UINT32 address, INT32 length, UINT8 *data); INT32 fpgaProgramInterfaceDiag(VOID); #endif //__FPGA_PROGRAM_DIAG_H__