⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 springboardio.h

📁 可编程器件厂商Xilinx的手持式逻辑分析仪的逻辑设计
💻 H
字号:
/*============================================================================*/
/* Filename:            SpringBoardIO.h                                       */
/*                                                                            */
/* Description:         This header file contains the definitions for the     */
/*                      functions that provide in the source file             */
/*                      SpringBoardIO.                                        */
/*                      the interface to the PocketAnalyzer Springboard       */
/*                      Module.                                               */
/*                                                                            */
/*============================================================================*/
/* COPYRIGHT (C) 2001                                                         */
/* NowTech, LLC                                                               */
/* Knoxville, TN                                                              */
/*                                                                            */
/* ALL RIGHTS RESERVED                                                        */
/*                                                                            */
/* This software and all information and ideas contained within are the sole  */
/* property of NowTech, LLC and are confidential.  Neither this software nor  */
/* any part nor any information contained in it may be disclosed or furnished */
/* to others without the prior written consent of NowTech, LLC.               */
/*                                                                            */
/*============================================================================*/
/* Change History:                                                            */
/*                                                                            */
/* ECO#:  ?                                                                   */
/* Change Date:  dd-mmm-yyyy                                                  */
/* Changed By:   ?                                                            */
/* Description of Change:  ?                                                  */
/*                                                                            */
/*============================================================================*/

/*============================================================================*/
/* Simulate the SpringBoard I/O.                                              */
/*============================================================================*/
// #define EmulateSBIO
// #define SimRandomIO


/*============================================================================*/
/* Definition of any global constants needed for use of the macros and/or     */
/* functions define in this file or the C source file SpringBoardIO.c.        */
/*============================================================================*/
#define TrigStateCh0Mask      0x0003
#define TrigStateCh0Lo        0x0000
#define TrigStateCh0DontCare1 0x0001
#define TrigStateCh0DontCare2 0x0002
#define TrigStateCh0Hi        0x0003

#define TrigStateCh1Mask      0x000C
#define TrigStateCh1Lo        0x0000
#define TrigStateCh1DontCare1 0x0004
#define TrigStateCh1DontCare2 0x0008
#define TrigStateCh1Hi        0x000C

#define TrigStateCh2Mask      0x0030
#define TrigStateCh2Lo        0x0000
#define TrigStateCh2DontCare1 0x0010
#define TrigStateCh2DontCare2 0x0020
#define TrigStateCh2Hi        0x0030

#define TrigStateCh3Mask      0x00C0
#define TrigStateCh3Lo        0x0000
#define TrigStateCh3DontCare1 0x0040
#define TrigStateCh3DontCare2 0x0080
#define TrigStateCh3Hi        0x00C0

#define TrigStateCh4Mask      0x0C00
#define TrigStateCh4Lo        0x0000
#define TrigStateCh4DontCare1 0x0100
#define TrigStateCh4DontCare2 0x0200
#define TrigStateCh4Hi        0x0300

#define TrigStateCh5Mask      0x0C00
#define TrigStateCh5Lo        0x0000
#define TrigStateCh5DontCare1 0x0400
#define TrigStateCh5DontCare2 0x0800
#define TrigStateCh5Hi        0x0C00

#define TrigStateCh6Mask      0x3000
#define TrigStateCh6Lo        0x0000
#define TrigStateCh6DontCare1 0x1000
#define TrigStateCh6DontCare2 0x2000
#define TrigStateCh6Hi        0x3000

#define TrigStateCh7Mask      0xC000
#define TrigStateCh7Lo        0x0000
#define TrigStateCh7DontCare1 0x4000
#define TrigStateCh7DontCare2 0x8000
#define TrigStateCh7Hi        0xC000

#define SampleRateReg         0x29000000
#define PostTriggerReg        0x29000002
#define TriggerWordReg        0x29000004
#define StartStopReg          0x29000006
#define RunStateReg           0x29000000
#define ChannelStateReg       0x29000002
#define DataBankBaseAddr      0x29080000


/*============================================================================*/
/* Definition of any global enumerations needed for use of the macros and/or  */
/* functions define in this file or the C source file SpringBoardIO.c.        */
/*============================================================================*/
typedef enum
    {
    smplRate20Mhz,                      /* 20MHz/50ns sample rate.            */
    smplRate10Mhz,                      /* 10MHz/100ns sample rate.           */
    smplRate5Mhz,                       /* 5MHz/200ns sample rate.            */
    smplRate2Mhz,                       /* 2MHz/500ns sample rate.            */
    smplRate1Mhz,                       /* 1MHz/1us sample rate.              */
    smplRate500Khz,                     /* 500KHz/2us sample rate.            */
    smplRate200Khz,                     /* 200KHz/5us sample rate.            */
    smplRate100Khz,                     /* 100KHz/10us sample rate.           */
    smplRate50Khz,                      /* 50KHz/20s sample rate.             */
    smplRate20Khz,                      /* 20KHz/50us sample rate.            */
    smplRate10Khz,                      /* 10KHz/100us sample rate.           */
    smplRate5Khz,                       /* 5KHz/200us sample rate.            */
    smplRate2Khz,                       /* 2KHz/500us sample rate.            */
    smplRate1Khz                        /* 1KHz/1ms sample rate.              */
    } SmplRateType;

/*============================================================================*/
/* Definition of any global data structures for the data associated with the  */
/* functions in the SpringBoardIO.c source file.                              */
/*============================================================================*/
typedef struct
    {
    Boolean bRunStop;
    Boolean bTrigFound;
    Boolean bTrigWordHiByte;
    UInt16  uiTrigOffset;
    }  sbioRunStateType;

/*============================================================================*/
/* External declaration of global variables defined in this file and/or the C */
/* source file ?.c.                                                           */
/*============================================================================*/
//extern ?

/*============================================================================*/
/* Macro Definitions:                                                         */
/*============================================================================*/
/**** None ****/

/*============================================================================*/
/* Function Prototypes for functions defined in SpringBoardIO.c.              */
/*============================================================================*/
Boolean sbioWriteSmplRateReg (TimebaseType);
Boolean sbioWritePreTrigger  (Int16);
Boolean sbioWriteTriggerWord (TrigStateType TrigState[]);
Boolean sbioWriteRunReg      (Boolean, UInt8);
Boolean sbioReadRunState     (sbioRunStateType*);
UInt16  sbioReadProbeState   (void);
Boolean sbioReadBuffData     (UInt8, UInt16, Boolean, UInt8*);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -