📄 mif.h
字号:
MIF_SYNC_READ_WRITE_ZBT = 6} ReadMode_t;
typedef enum { FLOW_THROUGH = 0,
PIPELINE_MODE = 1} PnF_t;
typedef enum { MIF_MEMORY_16BIT_WIDE = 0,
MIF_MEMORY_32BIT_WIDE = 1 } BusMemoryWidth_t;
/*
-----------------------------------------------------------------------------
NAME : MIF_CheckResetxxxReg -
DESCRIPTION : Check the xxx register has the expected default values -
corresponding to the reset -
PARAMETERS : None -
RETURN VALUE: 1 on suscess otherwise 2 -
LIMITATIONS : None -
-----------------------------------------------------------------------------
*/
/* Check reset Priority value of External bus 1 or 2 */
typedef enum { MIF_EXTERNAL_SLOW_BUS = 0,
MIF_EXTERNAL_FAST_BUS = 1 } MIF_ExternalBusId_t;
//---------------------------------------------------------------------
// NAME : MIF_CheckResetEmifPriority
// DESCRIPTION : Verify the reset value
// SYNOPSYS : BOOL MIF_CheckResetEmifPriority(const MIF_ExternalBusId_t BusId)
//
// PARAMETERS : BusId MIF_EXTERNAL_SLOW_BUS or MIF_EXTERNAL_FAST_BUS
// RETURN VALUE: IS_OK or NOT_OK
// LIMITATIONS : None
//---------------------------------------------------------------------
BOOL MIF_CheckResetEmifPriority(const MIF_ExternalBusId_t BusId);
int MIF_CheckResetImifPriority(void);
int MIF_CheckResetMifConfigReg(void);
//---------------------------------------------------------------------
// NAME : MIF_CheckResetSlowCSConfigReg
// DESCRIPTION : Test the value at reset of
// SYNOPSYS : BOOL MIF_CheckResetSlowCSConfigReg(MIF_Slow_CS_Enum_t SlowChipSelect)
// PARAMETERS : SlowChipSelect MIF_Slow_nCS0
// MIF_Slow_nCS1
// MIF_Slow_nCS2
// MIF_Slow_nCS3
// RETURN VALUE: IS_OK or NOT_OK
// LIMITATIONS : None
//---------------------------------------------------------------------
BOOL MIF_CheckResetSlowCSConfigReg(MIF_Slow_CS_Enum_t SlowChipSelect);
//---------------------------------------------------------------------
// NAME : MIF_CheckResetSlowCSConfigReg
// DESCRIPTION : Return the value of Fast Interface Sdram MRS Register
// SYNOPSYS : BOOL MIF_CheckResetSlowCSConfigReg(MIF_Slow_CS_Enum_t SlowChipSelect)
// PARAMETERS : None
// RETURN VALUE: UWORD32
// LIMITATIONS : None
//---------------------------------------------------------------------
int MIF_CheckResetFastInterfaceSdramConfigReg(void);
int MIF_CheckResetFastInterfaceSdramMrsReg(void);
UWORD32 MIF_GetFastInterfaceSdramMrsReg(void);
UWORD32 MIF_GetFastInterfaceSdramConfigReg(void);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetEmifPriority -
DESCRIPTION : Set EMIF priority register to give consecutive access either -
to Slow or fast EMIF Interface according to BusId value -
PARAMETERS : -
BusId = either MIF_EXTERNAL_SLOW_BUS or MIF_EXTERNAL_FAST_BUS -
HostConsecutiveAccess, DmaConsecutiveAccess: 0 to 16 consecutive access -
DspConsecutiveAccess, ArmConsecutiveAccess : 0 to 7 consecutive access -
RETURN VALUE: None -
LIMITATIONS : None -
-----------------------------------------------------------------------------
*/
void MIF_SetEmifPriority(const MIF_ExternalBusId_t BusId,
const UWORD8 HostConsecutiveAccess,
const UWORD8 DmaConsecutiveAccess,
const UWORD8 DspConsecutiveAccess,
const UWORD8 ArmConsecutiveAccess);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetEmifPriority -
DESCRIPTION : Set IMIF priority register to give consecutive access -
PARAMETERS : -
HostConsecutiveAccess, DmaConsecutiveAccess: 0 to 16 consecutive access -
DspConsecutiveAccess, ArmConsecutiveAccess : 0 to 7 consecutive access -
RETURN VALUE: None -
LIMITATIONS : None -
-----------------------------------------------------------------------------
*/
void MIF_SetImifPriority(const UWORD8 HostConsecutiveAccess,
const UWORD8 DmaConsecutiveAccess,
const UWORD8 DspConsecutiveAccess,
const UWORD8 ArmConsecutiveAccess);
//---------------------------------------------------------------------
// NAME : MIFTST_EmifInitSlowCSConfigReg
//
// DESCRIPTION : Initialize the SlowCS Config register
//
// SYNOPSYS : void MIFTST_EmifInitSlowCSConfigReg(MIF_Slow_CS_Enum_t SlowChipSelect,
// BusMemoryWidth_t bus_memory_width,
// ReadMode_t read_mode,
// UWORD8 pgwst_welen,
// UWORD8 write_wait_state,
// UWORD8 read_wait_state,
// PnF_t pipeline_flowthrough,
// boolean_t retimed_disable,
// FCLKDIV_t flash_clock_divider,
// )
//
//
//
// PARAMETERS :
//
// SlowChipSelect MIF_Slow_nCS0
// MIF_Slow_nCS1
// MIF_Slow_nCS2
// MIF_Slow_nCS3
//
// bus_memory_width MIF_MEMORY_16BIT_WIDE or MIF_MEMORY_32BIT_WIDE
//
// read_mode
// MIF_PAGE_ROM_READ_WORDS4
// MIF_PAGE_ROM_READ_WORDS8
// MIF_PAGE_ROM_READ_WORDS16
// MIF_SYNC_BURST_READ_TI
// MIF_SYNC_BURST_READ_SMART3
// MIF_SYNC_READ_WRITE_ZBT
//
// pgwst_welen WE length (0-15)
//
// write_wait_state Number of write wait state (0-15)
//
// read_wait_state Number of read wait state (0-5)
//
// pipeline_flowthrough FLOW_THROUGH or PIPELINE_MODE
//
// retimed_disable ENABLE or DISABLE
//
// flash_clock_divider MIF_DIVIDE_BY_1
// MIF_DIVIDE_BY_2
// MIF_DIVIDE_BY_4
// MIF_DIVIDE_BY_6
//
// Package_t FLASH_INTEL or NO_FLASH_INTEL
//
// RETURN VALUE: None
//
// LIMITATIONS : None
//
//
//
//---------------------------------------------------------------------
void MIFTST_EmifInitSlowCSConfigReg(MIF_Slow_CS_Enum_t SlowChipSelect,
BusMemoryWidth_t bus_memory_width,
ReadMode_t read_mode,
UWORD8 pgwst_welen,
UWORD8 write_wait_state,
UWORD8 read_wait_state,
PnF_t pipeline_flowthrough,
RetimingControl_t retimed_disable,
FCLKDIV_t flash_clock_divider,
Package_t IsItFlashIntel
);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetFlashClockDivider -
DESCRIPTION : Initialize the register with the input arguments -
PARAMETERS : .......... -
RETURN VALUE: None -
LIMITATIONS : None -
-----------------------------------------------------------------------------
*/
void MIF_SetFlashClockDivider(MIF_Slow_CS_Enum_t SlowChipSelect,
FCLKDIV_t input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetRetimedSwitch
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetRetimedSwitch(MIF_Slow_CS_Enum_t SlowChipSelect,
RetimingControl_t input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetReadWaitState
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetReadWaitState(MIF_Slow_CS_Enum_t SlowChipSelect,
UWORD8 input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetWriteWaitState
DESCRIPTION : Initialize the register with the input arguments
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetWriteWaitState(MIF_Slow_CS_Enum_t SlowChipSelect,
UWORD8 input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetPgwstWelen
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetPgwstWelen(MIF_Slow_CS_Enum_t SlowChipSelect,
UWORD8 input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetReadMode
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetReadMode(MIF_Slow_CS_Enum_t SlowChipSelect,
ReadMode_t input);
/*
-----------------------------------------------------------------------------
NAME : MIF_SetBusMemoryWidth
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: None.
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
void MIF_SetBusMemoryWidth(MIF_Slow_CS_Enum_t SlowChipSelect,
BusMemoryWidth_t input);
/*
-----------------------------------------------------------------------------
NAME : MIF_GetBusMemoryWidth
DESCRIPTION :
PARAMETERS : ..........
RETURN VALUE: bus memory size
LIMITATIONS : None.
-----------------------------------------------------------------------------
*/
BusMemoryWidth_t MIF_GetBusMemoryWidth(MIF_Slow_CS_Enum_t SlowChipSelect);
//---------------------------------------------------------------------
// NAME : MIF_MifSetPowerDown
// DESCRIPTION : Switch on or off the internal EMIF clock
// SYNOPSYS : void MIF_MifSetPowerDown(BOOL State)
// PARAMETERS : State SWITCH_ON or SWITCH_OFF
// RETURN VALUE: None
// LIMITATIONS : None
//---------------------------------------------------------------------
void MIF_SetPowerDown(BOOL State);
//---------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -