From 642f3fb5823f292ae29cc38c8897327dfbdc3c15 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Mon, 7 Apr 2014 14:58:25 -0700 Subject: b2xx: Pulling FX3 and AD9361 source code into master. --- .../fx3/gpif2_designer/b200_v2.cydsn/b200_v2.cyfx | 30 ++++ .../gpif2_designer/b200_v2.cydsn/cyfxgpif2config.h | 174 ++++++++++++++++++++ .../b200_v2.cydsn/projectfiles/gpif2model.xml | 140 ++++++++++++++++ .../projectfiles/gpif2timingsimulation.xml | 49 ++++++ .../b200_v2.cydsn/projectfiles/gpif2view.xml | 183 +++++++++++++++++++++ 5 files changed, 576 insertions(+) create mode 100644 firmware/fx3/gpif2_designer/b200_v2.cydsn/b200_v2.cyfx create mode 100644 firmware/fx3/gpif2_designer/b200_v2.cydsn/cyfxgpif2config.h create mode 100644 firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2model.xml create mode 100644 firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2timingsimulation.xml create mode 100644 firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2view.xml (limited to 'firmware/fx3/gpif2_designer') diff --git a/firmware/fx3/gpif2_designer/b200_v2.cydsn/b200_v2.cyfx b/firmware/fx3/gpif2_designer/b200_v2.cydsn/b200_v2.cyfx new file mode 100644 index 000000000..3e6eb0719 --- /dev/null +++ b/firmware/fx3/gpif2_designer/b200_v2.cydsn/b200_v2.cyfx @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/firmware/fx3/gpif2_designer/b200_v2.cydsn/cyfxgpif2config.h b/firmware/fx3/gpif2_designer/b200_v2.cydsn/cyfxgpif2config.h new file mode 100644 index 000000000..d16cdf038 --- /dev/null +++ b/firmware/fx3/gpif2_designer/b200_v2.cydsn/cyfxgpif2config.h @@ -0,0 +1,174 @@ +/* + * Project Name: b200_v2.cyfx + * Time : 10/23/2013 12:03:48 + * 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.715.0 + * + */ + +#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 0x8 + + +/* Summary + Transition function values used in the state machine. + */ +uint16_t CyFxGpifTransition[] = { + 0x0000, 0x8080, 0x2222, 0x5555, 0x7F7F, 0x1F1F, 0x8888 +}; + +/* 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[] = { + {{0x1E086001,0x000100C4,0x80000000},{0x00000000,0x00000000,0x00000000}}, + {{0x4E080302,0x00000200,0x80000000},{0x00000000,0x00000000,0x00000000}}, + {{0x1E086001,0x000100C4,0x80000000},{0x4E040704,0x20000200,0xC0100000}}, + {{0x00000000,0x00000000,0x00000000},{0x00000000,0x00000000,0x00000000}}, + {{0x00000000,0x00000000,0x00000000},{0x3E738705,0x00000200,0xC0100000}}, + {{0x00000000,0x00000000,0x00000000},{0x5E002703,0x2001020C,0x80000000}}, + {{0x00000000,0x00000000,0x00000000},{0x4E040704,0x20000200,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[] = { + 0x80000380, /* CY_U3P_PIB_GPIF_CONFIG */ + 0x000010AC, /* CY_U3P_PIB_GPIF_BUS_CONFIG */ + 0x01070002, /* 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 */ + 0x0000FFCF, /* CY_U3P_PIB_GPIF_CTRL_BUS_DEFAULT */ + 0x000000BF, /* 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 */ + 0x00000018, /* CY_U3P_PIB_GPIF_CTRL_BUS_SELECT */ + 0x00000019, /* 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 */ + 0x00080000, /* 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 */ + 0xFFFFFFF1 /* 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_ */ diff --git a/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2model.xml b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2model.xml new file mode 100644 index 000000000..477bad9e7 --- /dev/null +++ b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2model.xml @@ -0,0 +1,140 @@ + + + + + False + False + False + False + False + Slave + Synchronous + External + Positive + LittleEndian + Bit32 + 2 + + + + + SLOE + GPIO_19 + ActiveLow + + + SLCS + GPIO_17 + ActiveLow + + + SLWR + GPIO_18 + ActiveLow + + + SLRD + GPIO_20 + ActiveLow + + + PKEND + GPIO_24 + ActiveLow + + + FLAG0 + GPIO_21 + Low + ActiveLow + Current_Thread_DMA_Ready + + + FLAG1 + GPIO_22 + Low + ActiveLow + Current_Thread_DMA_WaterMark + + + + + + + + + + + + + RESET + True + 0 + + + IDLE + True + 0 + + ThreadSelection + DMAAccessAndRegisterAccess + + + + READ + True + 0 + + False + Socket + Thread0 + Enable + DriveNewData + True + + + + WRITE + True + 0 + + Socket + Thread0 + True + True + + + + SHORT_PKT + False + 0 + + Thread0 + + + Socket + Thread0 + True + True + + + + ZLP + False + 0 + + Thread0 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2timingsimulation.xml b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2timingsimulation.xml new file mode 100644 index 000000000..e6b10027b --- /dev/null +++ b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2timingsimulation.xml @@ -0,0 +1,49 @@ + + + 100 + 512 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2view.xml b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2view.xml new file mode 100644 index 000000000..730be04ab --- /dev/null +++ b/firmware/fx3/gpif2_designer/b200_v2.cydsn/projectfiles/gpif2view.xml @@ -0,0 +1,183 @@ + + + + + 363 + 96.4466666666667 + 83 + 70 + STATE1 + IDLE + 1 + False + 00000000-0000-0000-0000-000000000000 + + + 237 + 390.446666666667 + 83 + 70 + STATE2 + READ + 1 + False + 00000000-0000-0000-0000-000000000000 + + + 551 + 379.446666666667 + 83 + 70 + STATE3 + WRITE + 1 + False + 00000000-0000-0000-0000-000000000000 + + + 773 + 233.446666666667 + 83 + 70 + STATE4 + SHORT_PKT + 1 + False + 00000000-0000-0000-0000-000000000000 + + + 11 + 196.446666666667 + 83 + 70 + STATE5 + ZLP + 1 + False + 00000000-0000-0000-0000-000000000000 + + + 29 + 18.4466666666667 + 83 + 70 + STARTSTATE1 + RESET + 1 + False + 00000000-0000-0000-0000-000000000000 + + + + + TRANSITION1 + LOGIC_ONE + STARTSTATE1 + STATE1 + Connector + Connector + None + Arrow + 0 + + + TRANSITION2 + SLWR&!SLCS&PKEND&!SLRD&!SLOE + STATE1 + STATE2 + Connector + Connector + None + Arrow + 0 + + + TRANSITION3 + !SLWR&!SLCS&PKEND&SLRD + STATE1 + STATE3 + Connector + Connector + None + Arrow + 0 + + + TRANSITION4 + !SLWR&!SLCS&!PKEND&SLRD + STATE1 + STATE4 + Connector + Connector + None + Arrow + 0 + + + TRANSITION5 + SLWR&!SLCS&!PKEND&SLRD + STATE1 + STATE5 + Connector + Connector + None + Arrow + 0 + + + TRANSITION6 + PKEND + STATE5 + STATE1 + Connector + Connector + None + Arrow + 0 + + + TRANSITION7 + SLRD|SLCS|SLOE + STATE2 + STATE1 + Connector + Connector + None + Arrow + 0 + + + TRANSITION8 + (PKEND&SLWR)|SLCS + STATE3 + STATE1 + Connector + Connector + None + Arrow + 0 + + + TRANSITION9 + !SLWR&!PKEND + STATE3 + STATE4 + Connector + Connector + None + Arrow + 0 + + + TRANSITION10 + PKEND|SLCS|SLWR + STATE4 + STATE1 + Connector + Connector + None + Arrow + 0 + + + \ No newline at end of file -- cgit v1.2.3