csl_emiff.h

来自「dsp在音频处理中的运用」· C头文件 代码 · 共 1,042 行 · 第 1/3 页

H
1,042
字号
	(Uint8)CSL_EMIFF_DAPTR2_DSP_RESETVAL,\	(Uint8)CSL_EMIFF_DAPTR1_DMA_RESETVAL,\       }/** @brief Default value for SDRAM device type member of HwSetup structure */#define CSL_EMIFF_DEFAULTS_SDRAMDEVTYPE CSL_EMIFF_SDRAM_DEVICE_STANDARD_SDR/** @brief Structure containing SDRAM configuration parameters. */typedef struct CSL_EmiffSdramConfig {    /** Self refresh enable/disable */    CSL_EmiffSdramSelfRefreshEn 	sdramSelfRefreshEn;    /** Auto Refresh Mode */    CSL_EmiffSdramAutoRefresh		sdramAutoRefresh;    /** SDRAM memoty size */    CSL_EmiffSdramMemSize		sdramMemSize;    /** SDRAM data bus size */    CSL_EmiffSdramDataBusSize		sdramDataBusSize;    /** Number of SDRAM banks */    CSL_EmiffSdramBankCnt			sdramBankCnt;    /** Auto refresh counter register  */    Uint16					arcv;    /** SDRAM frequency ranges(SDF0, SDF1, SDF2, SDF3) */    CSL_EmiffSdramFreq			sdramFreq;    /** Power down enable/disable */    CSL_EmiffSdramPwrDownEn		sdramPwrDownEn;    /** SDRAM clock enable/disable */    CSL_EmiffSdramClockEn		sdramClockEn;    /** Auto clock enable/disable */    CSL_EmiffSdramAutoClockEn		sdramAutoClockEn;    /** Self refresh enable/disable during reset */    CSL_EmiffSdramSelfRefreshReset	sdramSelfRefreshReset;    /** SDRAM self refresh when in standby mode */    CSL_EmiffSdramSelfRefreshStandBy sdramSelfRefreshStandBy;    /** SDRAM CAS Latency */    CSL_EmiffSdramCasLatency		sdramCasLatency;    /** Page Burst Length.Currently only  */    Uint8					sdramPgBrstLen;    /** QFC enable/disable */    CSL_EmiffSdramQfcEn 		sdramQfcEn;    /** DS driver strength bit value(normal/reduced) */    CSL_EmiffSdramDsDriverStrength  sdramDsDriverStrength;    /** DLL enable/disable */    CSL_EmiffSdramDllEn 		sdramDllEn;    /** Temperature Compensated Self refresh */    CSL_EmiffSdramTcsr			sdramTcsr;    /** Partial Array Self Refresh */    CSL_EmiffSdramPasr			sdramPasr;} CSL_EmiffSdramConfig;/** @brief Structure containing SDRAM operation parameters. * * This structure is part of the CSL_EmiffHwSetup structure, and is * passed as a member of the CSL_EmiffHwSetup to the CSL_emiffHwSetup * OR CSL_emiffOpen function. Also the structure is used to collect * the current SDRAM configuration setup information from the * CSL_emiffGetHwStatus function. * */typedef struct CSL_EmiffSdramOperation {    /** Timeout value for Bank1 */    Uint8		    timeoutB1;    /** Timeout value for Bank2 */    Uint8		    timeoutB2;    /** Timeout value for Bank3 */    Uint8		    timeoutB3;    /** Timeout value for Bank4 */    Uint8		    timeoutB4;    /** SDRAM operation mode */    CSL_EmiffSdramOpMode    sdramOpMode;} CSL_EmiffSdramOperation;/** @brief Structure containing number of consecutive accesses allowed for each requestor. * * This structure captures number of consecutive accesses allowed for * each requestor. This structure is part of the CSL_EmiffHwSetup structure, * and is passed as a member of the CSL_EmiffHwSetup parameter to the * CSL_EmiffHwSetup function. Also the structure is used to collect * the setup information (relating to consecutive access settings) from * the CSL_emiffGetHwStatus function. */typedef struct CSL_EmiffConsecAccess {    /** OCPI Consecutive Accesses ( < 16 ) */    Uint8		    ocpiNumConsecAccess;    /** DMA Consecutive Accesses ( < 16 ) */    Uint8		    dmaNumConsecAccess;    /** DSP Consecutive Accesses ( < 8 ) */    Uint8		    dspNumConsecAccess;    /** ARM Consecutive Accesses ( < 8 ) */    Uint8		    armNumConsecAccess;} CSL_EmiffConsecAccess;/** @brief Structure containing dynamic priority timeout values for each requestor. * * This structure captures dynamic priority timeout values for each * requestor. This structure is part of the CSL_EmiffHwSetup structure * , and is passed as a member of the CSL_EmiffHwSetup to the * CSL_emiffHwSetup function. */typedef struct CSL_EmiffDynPriTimeout {    /** OCPI Dynamic arbitration priority timeout */    Uint8		    ocpiPriorityTimeout;    /** DMA(LCD Channel) Dynamic arbitration priority timeout */    Uint8		    lcdPriorityTimeout;    /** DSP Dynamic arbitration priority timeout */    Uint8		    dspPriorityTimeout;    /** DMA(non LCD channel) Dynamic arbitration priority timeout; */    Uint8		    dmaPriorityTimeout;} CSL_EmiffDynPriTimeout;/** @brief Structure containing dynamic priority timeout values for each requestor. * * The CSL_EmiffDllControl structure captures setup parameters relating * to DLL control.. This structure is part of the CSL_EmiffHwSetup structure, * and is passed as a member of the CSL_EmiffHwSetup to the * CSL_emiffHwSetup function */typedef struct CSL_EmiffDllControl {    /** 6-bit delay fine adjustment for Upper Read byte */    Uint8	offsetUrd;    /** 8-bit delay to adjust digitally controled delay to be used when DLL is disabled for Upper Read Byte */    Uint8	delayUrd;    /** Enable/disable DLL for Upper Read Byte */    CSL_EmiffDllEn  dllEnUrd;    /** Nominal Digitally Controlled Delay for Upper Read Byte */    CSL_EmiffDllPhase   phaseUrd;    /** 6-bit delay fine adjustment for Lower Read byte */    Uint8   offsetLrd;    /** 8-bit delay to adjust digitally controled delay to be used when DLL is disabled for Lower Read Byte */    Uint8   delayLrd;    /** Enable/disable DLL for Lower Read Byte */    CSL_EmiffDllEn  dllEnLrd;    /** Nominal Digitally Controlled Delay for Lower Read Byte */    CSL_EmiffDllPhase   phaseLrd;    /** 6-bit delay fine adjustment for Write */    Uint8	offsetWrt;    /** 8-bit delay to adjust digitally controled delay to be used when DLL is disabled for Write */    Uint8	delayWrt;    /** Enable/disable DLL for Write */    CSL_EmiffDllEn	dllEnWrt;    /** Nominal Digitally Controlled Delay for Write */    CSL_EmiffDllPhase   phaseWrt;} CSL_EmiffDllControl;/** @brief Top level h/w setup structure containing pointers to individual structures used for setup and the type of SDRAM used. */typedef struct CSL_EmiffHwSetup {    /** Sdram Device Type */    CSL_EmiffSdramDevType   sdramDevType;    /** Pointer to the SDRAM configuration setup structure  */    CSL_EmiffSdramConfig    *sdramConfig;    /** Pointer to the Priority Consecutive Accesses setup structure */    CSL_EmiffConsecAccess   *consecAccess;    /** Pointer to the Dynamic Arbitration Priority Timeout setup structure */    CSL_EmiffDynPriTimeout  *dynPriTimeout;    /** Pointer to the SDRAM operation setup structure */    CSL_EmiffSdramOperation *sdramOperation;    /** Pointer to the DLL control parameters setup structure  */    CSL_EmiffDllControl     *dllControl;} CSL_EmiffHwSetup;/** * @brief   The config-structure * * Used to configure the EMIFF using CSL_emiffHwSetupRaw(..) */typedef struct  {    Uint32 PR;    Uint32 CR;    Uint32 MRSLEG;    Uint32 CR2;    Uint32 DWRTCR;    Uint32 MRS;    Uint32 EMRS0;    Uint32 EMRS1;    Uint32 OPR;    Uint32 MCR;    Uint32 DAPTR1;    Uint32 DAPTR2;    Uint32 DAPTR3;    Uint32 DURDCR;    Uint32 EMRS2;    Uint32 DLRDCR;} CSL_EmiffConfig;/** * @brief   Default values for the config-structure */#define CSL_EMIFF_CONFIG_DEFAULTS {         \                CSL_EMIFF_PR_RESETVAL,\                CSL_EMIFF_CR_RESETVAL,\                CSL_EMIFF_MRSLEG_RESETVAL,\                CSL_EMIFF_CR2_RESETVAL,\                CSL_EMIFF_DWRTCR_RESETVAL,\                CSL_EMIFF_MRS_RESETVAL,\                CSL_EMIFF_EMRS0_RESETVAL,\                CSL_EMIFF_EMRS1_RESETVAL,\                CSL_EMIFF_OPR_RESETVAL,\                CSL_EMIFF_MCR_RESETVAL,\                CSL_EMIFF_DAPTR1_RESETVAL,\                CSL_EMIFF_DAPTR2_RESETVAL,\                CSL_EMIFF_DAPTR3_RESETVAL,\                CSL_EMIFF_DURDCR_RESETVAL,\                CSL_EMIFF_EMRS2_RESETVAL,\                CSL_EMIFF_DLRDCR_RESETVAL\            }    /** @brief Structure in which the abort status of a transaction is returned. * * The CSL_EmiffAbortStatus structure is used to get abort status of a * transaction. This structure is passed as an argument to CSL_emiffGetHwStatus * function when the query used is CSL_EMIFF_QUERY_ABORTSTATUS */typedef struct CSL_EmiffAbortStatus {    /** 1 if abort has occured */    Bool		    abortFlag;    /** Address of transaction aborted */    Uint32		    abortAddress;    /** Id of the Host whose transaction was aborted */    Uint16		    abortHostId;} CSL_EmiffAbortStatus;/** @brief Structure in which the status of DLL is returned. * * The CSL_EmiffDllStatus structure is used to get DLL status. This * structure is passed as an argument to CSL_emiffGetHwStatus function * when the query used is CSL_EMIFF_QUERY_DLLSTATUS */typedef struct CSL_EmiffDllStatus {    /** Current DLL counter value for Upper Read Byte. Valid if DLL is enabled. */    Uint16		    dllUrdCount;    /** Upper Read Byte: 0=DLL not locked;1=DLL locked. Availiability not confirmed. */    Bool		    dllUrdLock;    /** Upper Read Byte: 0=DLL OK ; 1=DLL counter underflow */    Bool		    dllUrdUnderFlow;    /** Upper Read Byte: 0=DLL OK ; 1=DLL counter overflow */    Bool		    dllUrdOverFlow;    /** Current DLL counter value for Lower Read Byte. Valid if DLL is enabled. */    Uint16		    dllLrdCount;    /** Lower Read Byte: 0=DLL not locked;1=DLL locked. Availiability not confirmed. */    Bool		    dllLrdLock;    /** Lower Read Byte: 0=DLL OK ; 1=DLL counter underflow */    Bool		    dllLrdUnderFlow;    /** Lower Read Byte: 0=DLL OK ; 1=DLL counter overflow */    Bool		    dllLrdOverFlow;    /** Current DLL counter value for Write. Valid if DLL is enabled. */    Uint16		    dllWrtCount;    /** Write: 0=DLL not locked;1=DLL locked. Availiability not confirmed. */    Bool		    dllWrtLock;    /** Write: 0=DLL OK ; 1=DLL counter underflow */    Bool		    dllWrtUnderFlow;    /** Write: 0=DLL OK ; 1=DLL counter overflow */    Bool		    dllWrtOverFlow;} CSL_EmiffDllStatus;/** @brief This object contains the reference to the instance of EMIFF opened *  using the @a CSL_emiffOpen(). * *  The pointer to this, is passed to all EMIFF CSL APIs. */typedef struct CSL_EmiffObj {	/** This is a pointer to the registers of the instance of EMIFF     *  referred to by this object     */	CSL_EmiffRegsOvly regs;	/** This is the instance of EMIFF being referred to by this object  */	CSL_InstNum  	perNum;} CSL_EmiffObj;typedef struct CSL_EmiffObj *CSL_EmiffHandle;/** @brief This will have the base-address information for the peripheral *  instance */typedef struct {	/** Base-address of the Configuration registers of the peripheral	 */	CSL_EmiffRegsOvly	regs;} CSL_EmiffBaseAddress;/** @brief Module specific parameters. Present implementation doesn't have *  any module specific parameters. */typedef struct{	/** Bit mask to be used for module specific parameters.         *  The below declaration is just a place-holder for future 	 *  implementation.	 */	CSL_BitMask16   flags;} CSL_EmiffParam;/** @brief Module specific context information. Present implementation doesn't have *  any Context information. */typedef struct {	/** Context information of EMIFF.         *  The below declaration is just a place-holder for future 	 *  implementation. 	 */    Uint16	contextInfo;} CSL_EmiffContext;/**************************************************************************\* EMIFF global function declarations\**************************************************************************//** @brief Peripheral specific initialization function. * * This is the peripheral specific intialization function. This function is * idempotent in that calling it many times is same as calling it once. * This function initializes the CSL data structures, and doesn't touches * the hardware. * * <b> Usage Constraints: </b> * This function should be called before using any of the CSL APIs in the EMIFF * module. * *  Note: As EMIFF doesn't have any context based information, currently, the function *  just returns CSL_SOK. User is expected to pass NULL in the function call. * * @b Example: * @verbatim   ...   if (CSL_SOK != CSL_emiffInit(NULL)) {       return;   }   @endverbatim * * @return returns the status of the operation * */CSL_Status CSL_emiffInit(	/** EMIFF specific context information	 */	CSL_EmiffContext * pContext	);/** @brief Opens the instance of EMIFF requested. * *  The open call sets up the data structures for the particular instance of *  EMIFF device. The device can be re-opened anytime after it has been normally *  closed if so required. The handle returned by this call is input as an *  essential argument for rest of the APIs described for this module. * *  <b> Usage Constraints: </b> *  EMIFF must be successfully initialized via @a CSL_emiffInit() before calling *  this function. Memory for the @a CSL_emiffObj must be allocated outside

⌨️ 快捷键说明

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