URL
https://opencores.org/ocsvn/usb_fpga_2_14/usb_fpga_2_14/trunk
Subversion Repositories usb_fpga_2_14
[/] [usb_fpga_2_14/] [trunk/] [default/] [fpga-fx3/] [ezusb_io.cydsn/] [cyfxgpif2config.h] - Rev 2
Compare with Previous | Blame | View Log
/* * Project Name: ezusb_io.cyfx * Time : 01/24/2016 12:01:18 * Device Type: FX3 * Project Type: GPIF2 * * * * * This is a generated file and should not be modified * This file need to be included only once in the firmware * This file is generated by Gpif2 designer tool version - 1.0.837.1 * */ #ifndef _INCLUDED_CYFXGPIF2CONFIG_ #define _INCLUDED_CYFXGPIF2CONFIG_ #include "cyu3types.h" #include "cyu3gpif.h" /* Summary Number of states in the state machine */ #define CY_NUMBER_OF_STATES 6 /* Summary Mapping of user defined state names to state indices */ #define RESET 0 #define IDLE 1 #define READ 2 #define WRITE 3 #define SHORT_PKT 4 #define ZLP 5 /* Summary Initial value of early outputs from the state machine. */ #define ALPHA_RESET 0x0 /* Summary Transition function values used in the state machine. */ uint16_t CyFxGpifTransition[] = { 0x0000, 0xAAAA, 0x5555, 0x1111, 0x8888, 0x7777 }; /* Summary Table containing the transition information for various states. This table has to be stored in the WAVEFORM Registers. This array consists of non-replicated waveform descriptors and acts as a waveform table. */ CyU3PGpifWaveData CyFxGpifWavedata[] = { {{0x1E738301,0x040100C4,0x80000000},{0x00000000,0x00000000,0x00000000}}, {{0x2E738302,0x04000000,0x80000000},{0x00000000,0x00000000,0x00000000}}, {{0x1E738301,0x040100C4,0x80000000},{0x5E702004,0x20000000,0xC0100000}}, {{0x00000000,0x00000000,0x00000000},{0x00000000,0x00000000,0x00000000}}, {{0x00000000,0x00000000,0x00000000},{0x2E738005,0x00000000,0xC0100000}}, {{0x00000000,0x00000000,0x00000000},{0x3E702003,0x20010008,0x80000000}}, {{0x00000000,0x00000000,0x00000000},{0x5E702004,0x20000000,0xC0100000}} }; /* Summary Table that maps state indices to the descriptor table indices. */ uint8_t CyFxGpifWavedataPosition[] = { 0,1,0,2,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 0,4,0,2,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 0,5,0,2,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, 0,6,0,2,0,0 }; /* Summary GPIF II configuration register values. */ uint32_t CyFxGpifRegValue[] = { 0x800083B0, /* CY_U3P_PIB_GPIF_CONFIG */ 0x00001467, /* CY_U3P_PIB_GPIF_BUS_CONFIG */ 0x01000002, /* CY_U3P_PIB_GPIF_BUS_CONFIG2 */ 0x00000044, /* CY_U3P_PIB_GPIF_AD_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_STATUS */ 0x00000000, /* CY_U3P_PIB_GPIF_INTR */ 0x00000000, /* CY_U3P_PIB_GPIF_INTR_MASK */ 0x00000082, /* CY_U3P_PIB_GPIF_SERIAL_IN_CONFIG */ 0x00000782, /* CY_U3P_PIB_GPIF_SERIAL_OUT_CONFIG */ 0x00000500, /* CY_U3P_PIB_GPIF_CTRL_BUS_DIRECTION */ 0x0000FFFF, /* CY_U3P_PIB_GPIF_CTRL_BUS_DEFAULT */ 0x0000003F, /* CY_U3P_PIB_GPIF_CTRL_BUS_POLARITY */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_TOGGLE */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000011, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000010, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ 0x00000006, /* CY_U3P_PIB_GPIF_CTRL_COUNT_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_COUNT_RESET */ 0x0000FFFF, /* CY_U3P_PIB_GPIF_CTRL_COUNT_LIMIT */ 0x0000010A, /* CY_U3P_PIB_GPIF_ADDR_COUNT_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_ADDR_COUNT_RESET */ 0x0000FFFF, /* CY_U3P_PIB_GPIF_ADDR_COUNT_LIMIT */ 0x00000000, /* CY_U3P_PIB_GPIF_STATE_COUNT_CONFIG */ 0x0000FFFF, /* CY_U3P_PIB_GPIF_STATE_COUNT_LIMIT */ 0x0000010A, /* CY_U3P_PIB_GPIF_DATA_COUNT_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_DATA_COUNT_RESET */ 0x0000FFFF, /* CY_U3P_PIB_GPIF_DATA_COUNT_LIMIT */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_COMP_VALUE */ 0x00000000, /* CY_U3P_PIB_GPIF_CTRL_COMP_MASK */ 0x00000000, /* CY_U3P_PIB_GPIF_DATA_COMP_VALUE */ 0x00000000, /* CY_U3P_PIB_GPIF_DATA_COMP_MASK */ 0x00000000, /* CY_U3P_PIB_GPIF_ADDR_COMP_VALUE */ 0x00000000, /* CY_U3P_PIB_GPIF_ADDR_COMP_MASK */ 0x00000000, /* CY_U3P_PIB_GPIF_DATA_CTRL */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_DATA */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_INGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_ADDRESS */ 0x00000000, /* CY_U3P_PIB_GPIF_EGRESS_ADDRESS */ 0x80010400, /* CY_U3P_PIB_GPIF_THREAD_CONFIG */ 0x80010401, /* CY_U3P_PIB_GPIF_THREAD_CONFIG */ 0x80010402, /* CY_U3P_PIB_GPIF_THREAD_CONFIG */ 0x80010403, /* CY_U3P_PIB_GPIF_THREAD_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_LAMBDA_STAT */ 0x00000000, /* CY_U3P_PIB_GPIF_ALPHA_STAT */ 0x00000000, /* CY_U3P_PIB_GPIF_BETA_STAT */ 0x00000000, /* CY_U3P_PIB_GPIF_WAVEFORM_CTRL_STAT */ 0x00000000, /* CY_U3P_PIB_GPIF_WAVEFORM_SWITCH */ 0x00000000, /* CY_U3P_PIB_GPIF_WAVEFORM_SWITCH_TIMEOUT */ 0x00000000, /* CY_U3P_PIB_GPIF_CRC_CONFIG */ 0x00000000, /* CY_U3P_PIB_GPIF_CRC_DATA */ 0xFFFFFFC1 /* CY_U3P_PIB_GPIF_BETA_DEASSERT */ }; /* Summary This structure holds all the configuration inputs for the GPIF II. */ const CyU3PGpifConfig_t CyFxGpifConfig = { (uint16_t)(sizeof(CyFxGpifWavedataPosition)/sizeof(uint8_t)), CyFxGpifWavedata, CyFxGpifWavedataPosition, (uint16_t)(sizeof(CyFxGpifTransition)/sizeof(uint16_t)), CyFxGpifTransition, (uint16_t)(sizeof(CyFxGpifRegValue)/sizeof(uint32_t)), CyFxGpifRegValue }; #endif /* _INCLUDED_CYFXGPIF2CONFIG_ */