415 lines
8.2 KiB
C
415 lines
8.2 KiB
C
|
#ifndef PROJECT_SETUP_H
|
|||
|
#define PROJECT_SETUP_H
|
|||
|
|
|||
|
/*
|
|||
|
|
|||
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> myXilinx
|
|||
|
<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> C_PROJECT_TYPE <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
project_setup.h <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> /main/
|
|||
|
<EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD><EFBFBD> /myXilinx/
|
|||
|
<EFBFBD>.<EFBFBD>. <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
|
|||
|
*/
|
|||
|
|
|||
|
/*------------------------------------------------------------------------------
|
|||
|
Project type
|
|||
|
------------------------------------------------------------------------------*/
|
|||
|
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
#define PROJECT_22220 10
|
|||
|
#define PROJECT_21300 11
|
|||
|
#define PROJECT_21180 12
|
|||
|
#define PROJECT_BALZAM 13
|
|||
|
#define PROJECT_23470 14
|
|||
|
#define PROJECT_23550 15
|
|||
|
#define PROJECT_10510 16
|
|||
|
|
|||
|
|
|||
|
#define PROJECT_STEND_D PROJECT_BALZAM
|
|||
|
|
|||
|
///////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
///////////////////////////////////////////////
|
|||
|
|
|||
|
//#define C_PROJECT_TYPE PROJECT_21180
|
|||
|
//#define C_PROJECT_TYPE PROJECT_21300
|
|||
|
//#define C_PROJECT_TYPE PROJECT_22220
|
|||
|
//#define C_PROJECT_TYPE PROJECT_BALZAM
|
|||
|
//#define C_PROJECT_TYPE PROJECT_23470
|
|||
|
//#define C_PROJECT_TYPE PROJECT_STEND_D
|
|||
|
|
|||
|
#define C_PROJECT_TYPE PROJECT_23550
|
|||
|
//#define C_PROJECT_TYPE PROJECT_10510
|
|||
|
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RS232
|
|||
|
#define RS232_SPEED_A 57600//115200//57600
|
|||
|
#define RS232_SPEED_B 57600//115200//57600//
|
|||
|
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|||
|
#if (C_PROJECT_TYPE==PROJECT_23550 || C_PROJECT_TYPE==PROJECT_BALZAM)
|
|||
|
#define XPWMGEN 1 // <20><><EFBFBD> <20><> xilinx 24
|
|||
|
#define TMSPWMGEN 0 // <20><><EFBFBD> <20><> tms
|
|||
|
#else
|
|||
|
#define XPWMGEN 0 // <20><><EFBFBD> <20><> xilinx 24
|
|||
|
#define TMSPWMGEN 1 // <20><><EFBFBD> <20><> tms
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
///////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
|||
|
#if (TMSPWMGEN==1) && (XPWMGEN==1)
|
|||
|
#error "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>!!!"
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#if (TMSPWMGEN==1)
|
|||
|
|
|||
|
#else //TMSPWMGEN
|
|||
|
|
|||
|
#if (XPWMGEN==1)
|
|||
|
#else
|
|||
|
|
|||
|
#error "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>!!!"
|
|||
|
|
|||
|
#endif //XPWMGEN
|
|||
|
#endif //TMSPWMGEN
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
/////////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
////////////////////////////////////////////////
|
|||
|
/////////////////////////////////////////////////
|
|||
|
#if (_FLOOR6==0)
|
|||
|
#define USE_ADC_0 1
|
|||
|
#define USE_ADC_1 1
|
|||
|
////#define USE_ADC_2 1
|
|||
|
//
|
|||
|
#define USE_IN_0 1
|
|||
|
|
|||
|
#define USE_IN_1 1
|
|||
|
//////#define USE_IN_2 1
|
|||
|
////
|
|||
|
#define USE_OUT_0 1
|
|||
|
//////#define USE_OUT_1 1
|
|||
|
//////#define USE_OUT_2 1
|
|||
|
////
|
|||
|
////
|
|||
|
#define USE_TK_0 1
|
|||
|
#define USE_TK_1 1
|
|||
|
////
|
|||
|
#define USE_TK_2 1
|
|||
|
#define USE_TK_3 1
|
|||
|
////
|
|||
|
//////#define USE_TK_4 1
|
|||
|
//////#define USE_TK_5 1
|
|||
|
//////#define USE_TK_6 1
|
|||
|
//////#define USE_TK_7 1
|
|||
|
////
|
|||
|
#define USE_HWP_0 1
|
|||
|
////#define USE_HWP_1 1
|
|||
|
//////#define USE_HWP_2 1
|
|||
|
////
|
|||
|
//////#define USE_ROT_1 1
|
|||
|
|
|||
|
#else
|
|||
|
|
|||
|
#if (_FLOOR6_ADD==1)
|
|||
|
|
|||
|
#define USE_ADC_0 1
|
|||
|
#define USE_ADC_1 1
|
|||
|
//////
|
|||
|
#define USE_IN_0 1
|
|||
|
////
|
|||
|
//#define USE_IN_1 1
|
|||
|
////////
|
|||
|
//#define USE_OUT_0 1
|
|||
|
////////
|
|||
|
////////
|
|||
|
#define USE_TK_0 1
|
|||
|
#define USE_TK_1 1
|
|||
|
//////
|
|||
|
#define USE_TK_2 1
|
|||
|
#define USE_TK_3 1
|
|||
|
|
|||
|
//#define USE_HWP_0 1
|
|||
|
|
|||
|
|
|||
|
#else
|
|||
|
|
|||
|
#define USE_ADC_0 1
|
|||
|
#define USE_ADC_1 1
|
|||
|
////
|
|||
|
#define USE_IN_0 1
|
|||
|
//
|
|||
|
#define USE_IN_1 1
|
|||
|
//////
|
|||
|
#define USE_OUT_0 1
|
|||
|
//////
|
|||
|
//////
|
|||
|
#define USE_TK_0 1
|
|||
|
#define USE_TK_1 1
|
|||
|
////
|
|||
|
#define USE_TK_2 1
|
|||
|
#define USE_TK_3 1
|
|||
|
|
|||
|
#define USE_HWP_0 1
|
|||
|
#define USE_HWP_1 1
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> SP2 <20><><EFBFBD> SP6
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
#define TYPE_CDS_XILINX_IN_0 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_IN_1 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_IN_2 TYPE_CDS_XILINX_SP2
|
|||
|
|
|||
|
#define TYPE_CDS_XILINX_OUT_0 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_OUT_1 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_OUT_2 TYPE_CDS_XILINX_SP2
|
|||
|
|
|||
|
#define TYPE_CDS_XILINX_TK_0 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_1 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_2 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_3 TYPE_CDS_XILINX_SP6
|
|||
|
#define TYPE_CDS_XILINX_TK_4 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_5 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_6 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_TK_7 TYPE_CDS_XILINX_SP2
|
|||
|
|
|||
|
#define TYPE_CDS_XILINX_ADC_0 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_ADC_1 TYPE_CDS_XILINX_SP2
|
|||
|
#define TYPE_CDS_XILINX_ADC_2 TYPE_CDS_XILINX_SP2
|
|||
|
|
|||
|
#define TYPE_CDS_XILINX_RS_0 TYPE_CDS_XILINX_SP2
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
//#define TYPE_CDS_XILINX_HWP_0_1 MODE_HWP_SPEED_SLOW
|
|||
|
|
|||
|
#ifndef USE_ADC_0
|
|||
|
#define USE_ADC_0 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_ADC_1
|
|||
|
#define USE_ADC_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_ADC_2
|
|||
|
#define USE_ADC_2 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_IN_0
|
|||
|
#define USE_IN_0 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_IN_1
|
|||
|
#define USE_IN_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_IN_2
|
|||
|
#define USE_IN_2 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_OUT_0
|
|||
|
#define USE_OUT_0 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_OUT_1
|
|||
|
#define USE_OUT_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_OUT_2
|
|||
|
#define USE_OUT_2 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_TK_0
|
|||
|
#define USE_TK_0 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_TK_1
|
|||
|
#define USE_TK_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
//
|
|||
|
#ifndef USE_TK_2
|
|||
|
#define USE_TK_2 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_TK_3
|
|||
|
#define USE_TK_3 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_TK_4
|
|||
|
#define USE_TK_4 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_TK_5
|
|||
|
#define USE_TK_5 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_TK_6
|
|||
|
#define USE_TK_6 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_TK_7
|
|||
|
#define USE_TK_7 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_HWP_0
|
|||
|
#define USE_HWP_0 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_HWP_1
|
|||
|
#define USE_HWP_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
#ifndef USE_HWP_2
|
|||
|
#define USE_HWP_2 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
#ifndef USE_ROT_1
|
|||
|
#define USE_ROT_1 0
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
////////////////////////////////////////////////
|
|||
|
#if (USE_HWP_2==1)
|
|||
|
#define MAX_COUNT_PLATES_HWP 3
|
|||
|
#else
|
|||
|
#if (USE_HWP_1==1)
|
|||
|
#define MAX_COUNT_PLATES_HWP 2
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_HWP 1
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
#if (USE_TK_7==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 8
|
|||
|
#else
|
|||
|
#if (USE_TK_6==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 7
|
|||
|
#else
|
|||
|
#if (USE_TK_5==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 6
|
|||
|
#else
|
|||
|
#if (USE_TK_4==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 5
|
|||
|
#else
|
|||
|
#if (USE_TK_3==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 4
|
|||
|
#else
|
|||
|
#if (USE_TK_2==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 3
|
|||
|
#else
|
|||
|
#if (USE_TK_1==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 2
|
|||
|
#else
|
|||
|
#if (USE_TK_0==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 1
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_CDS_TK 1
|
|||
|
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
#if (USE_ADC_2==1)
|
|||
|
#define MAX_COUNT_PLATES_ADC 3
|
|||
|
#else
|
|||
|
#if (USE_ADC_1==1)
|
|||
|
#define MAX_COUNT_PLATES_ADC 2
|
|||
|
#else
|
|||
|
#if (USE_ADC_0==1)
|
|||
|
#define MAX_COUNT_PLATES_ADC 1
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_ADC 1
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
#if (USE_OUT_2==1)
|
|||
|
#define MAX_COUNT_PLATES_OUT 3
|
|||
|
#else
|
|||
|
#if (USE_OUT_1==1)
|
|||
|
#define MAX_COUNT_PLATES_OUT 2
|
|||
|
#else
|
|||
|
#if (USE_OUT_0==1)
|
|||
|
#define MAX_COUNT_PLATES_OUT 1
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_OUT 1
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
////////////////////////////////////////////////
|
|||
|
#if (USE_IN_2==1)
|
|||
|
#define MAX_COUNT_PLATES_IN 3
|
|||
|
#else
|
|||
|
#if (USE_IN_1==1)
|
|||
|
#define MAX_COUNT_PLATES_IN 2
|
|||
|
#else
|
|||
|
#if (USE_IN_0==1)
|
|||
|
#define MAX_COUNT_PLATES_IN 1
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_IN 1
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
|
|||
|
#if (USE_ROT_1==1)
|
|||
|
#define MAX_COUNT_PLATES_CDS_RS 1
|
|||
|
#else
|
|||
|
#define MAX_COUNT_PLATES_CDS_RS 0
|
|||
|
#endif
|
|||
|
|
|||
|
////////////////////////////////////////////////
|
|||
|
|
|||
|
|
|||
|
#include <params_bsu.h>
|
|||
|
|
|||
|
#endif // end PROJECT_SETUP_H
|
|||
|
|