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

📄 rheabridge.h

📁 OMAP1030 处理器的ARM 侧硬件测试代码 OMAP1030 是TI的双核处理器
💻 H
📖 第 1 页 / 共 2 页
字号:
 LIMITATIONS :  Supervisor mode only                                      -
---------------------------------------------------------------------------
*/ 
typedef enum { RHEA_PRIORITY_TO_ARM          = 0,
               RHEA_PRIORITY_TO_DMA_ACCESS_1 = 1,
               RHEA_PRIORITY_TO_DMA_ACCESS_2 = 2,
               RHEA_PRIORITY_TO_DMA_ACCESS_3 = 3,
               RHEA_PRIORITY_TO_DMA_ACCESS_4 = 4,
               RHEA_PRIORITY_TO_DMA_ACCESS_5 = 5,
               RHEA_PRIORITY_TO_DMA_ACCESS_6 = 6,
               RHEA_PRIORITY_TO_DMA_ACCESS_7 = 7
} RheaPriority_t;

typedef enum { 
               RHEA_USE_PRIORITY_BITS                = 0,   
               RHEA_DMA_SAME_PRIORITY_ARM_ON_IRQ_FIQ = 1            
} RheaPriorityToggle_t;

void RHEA_InitBusAllocReg(const RheaPriority_t       RheaPriority, 
                          const RheaPriorityToggle_t RheaPriorityToggle);

/*
-------------------------------------------------------------------------------
 NAME       : RHEA_ReadBusAllocReg                                            -
 DESCRIPTION: Read the Rhea Bus Alloc register to get                         -
              1) the Rhea bus priority between ARM and DMA                    -
              2) the rhea priority toggle                                     -
                                                                              -
 PARAMETERS  :                                                                -
   RheaPriority: define the priority value                                    -
     0        = ARM has priority                                              -
     n [1..7] = DMA controller has priority for max of n consecutive accesses -
                                                                              -
    RheaPriorityToggle: Enable the rhea priority                              -
      0 => RheaPriority bits used by the rhea bus allocation                  -
      1 => In exception mode (IRQ and FIQ) ARM and DMA have the same priority -
                                                                              -
 RETURN VALUE: None.                                                          -
 LIMITATIONS : None.                                                          -
-------------------------------------------------------------------------------
*/ 
void RHEA_ReadBusAllocReg(RheaPriority_t       *const RheaPriority, 
                          RheaPriorityToggle_t *const RheaPriorityToggle);





/*
-------------------------------------------------------------------------------
 NAME        : RHEA_InitEnhancedRheaCtrolReg                                  -
 DESCRIPTION : Initialize enhanced rhea control register                      -
               1) to Enable/Disable the rhea bus access timeout               -
               2) to Mask the interrupt on abort or size mismatch access      -
               3) to clock or not the incoming signals from ARM and DMA       -
                                                                              -
 PARAMETERS  :                                                                -
   TimeOutEnable: Enable or Disable the rhea bus access timeout               -
     RHEA_TIMEOUT_ENABLE = rhea_control_register's TimeOut field specifies    -
                        the max time a peripheral can stall the processor     -
     RHEA_TIMEOUT_DISABLE = peripheral can stall forever the processor        -
                                                                              -
   InterruptMasked: Mask or not interrupt on abort or size mismatch access    -
     RHEA_INTERRUPT_MASK   = Interrupt is masked                              -
     RHEA_INTERRUPT_ENABLE = Interrupt sent to the ARM                        -
                             for each rhea write abort access                 -
             and any rhea size mismatch access                                -
                                                                              -
   HighFrequencyEnable: Enable/Disable clock for ARM and DMA incoming signals -
     True  = Incoming signals from ARM and DMA are clocked                    -
             Should be used when running at a high frequency                  -
     False = Incoming signals are not clocked                                 -
                                                                              -
 RETURN VALUE: None.                                                          -
 LIMITATIONS : Supervisor mode only                                           -
-------------------------------------------------------------------------------
*/ 
typedef enum { RHEA_TIMEOUT_DISABLE = 0,   
               RHEA_TIMEOUT_ENABLE  = 1} RheaTimeOutToggle_t;

typedef enum { RHEA_INTERRUPT_ENABLE = 0,   
               RHEA_INTERRUPT_DISABLE   = 1 } RheaInterruptToggle_t;

typedef enum { RHEA_HIGH_FREQUENCY_DISABLE = 0 ,
               RHEA_HIGH_FREQUENCY_ENABLE  = 1 } RheaHighFrequencyToggle_t;

typedef enum { RHEA_ENABLE_ABORT = 0,
					RHEA_DISABLE_ABORT= 1 } RheaAbortToggle_t;

void RHEA_InitEnhancedRheaCtrolReg(const RheaTimeOutToggle_t       TimeOutEnable, 
                                   const RheaInterruptToggle_t     InterruptDisable,
                                   const RheaHighFrequencyToggle_t HighFrequencyEnable,
					  						  const RheaAbortToggle_t AbortDisable);

/*
-------------------------------------------------------------
 NAME        : RHEA_EnableTimeOut                           -
               RHEA_EnableTimeOut                           -
 DESCRIPTION : Enable the timeout to limit the maximum time -
               a peripheral can stall the processor and     -
               disable the Mask of Interrupt to let the ARM -
               sending an abort on RHEA write access error  -
               or any RHEA access size mismatch             -
 PARAMETERS  : None                                         -
 RETURN VALUE: None.                                        -
 LIMITATIONS : Supervisor mode only                         -
-------------------------------------------------------------
*/ 
void RHEA_EnableTimeOutDisableMskIt(void);   
void RHEA_EnableTimeOut(void);

void RHEA_SetHighFrequency(void);
void RHEA_SetLowFrequency(void);


/*
-------------------------------------------------------------
 NAME        : RHEA_DisableTimeOut                          -
 DESCRIPTION : Disable the timeout                          -
 PARAMETERS  : None                                         -
 RETURN VALUE: None.                                        -
 LIMITATIONS : Supervisor mode only                         -
-------------------------------------------------------------
*/ 
void RHEA_DisableTimeOut(void);


/*
---------------------------------------------------------------------------------
 NAME        : RHEA_ReadEnhancedRheaCtrolReg                                    -
 DESCRIPTION : Read enhanced rhea control register to get output parameters     -
 PARAMETERS  :                                                                  -
   TimeOutToggle: Enable or Disable the rhea bus access timeout                 -
     ENABLE_TIMEOUT  => rhea_control_register's TimeOut field specifies         -
                        the max time a peripheral can stall the processor       -
     DISABLE_TIMEOUT => peripheral can stall forever the processor              -
                                                                                -
   MaskIt: Mask or not the interrupt on abort or size mismatch access           -
     DISABLE_IT => Interrupt is masked                                          -
     ENABLE_IT  => Interrupt sent to the ARM for each rhea write abort access   -
                    and any rhea size mismatch access                           -
                                                                                -
   HighFrequency: Enable or disable clock for incoming signals from ARM and DMA -
     HIGH_FREQ => Incoming signals from ARM and DMA are clocked                 -
                   Should be used when running at a high frequency              -
     LOW_FREQ  => Incoming signals are not clocked                              -
 RETURN VALUE: None.                                                            -
 LIMITATIONS : None.                                                            -
---------------------------------------------------------------------------------
*/ 
void RHEA_ReadEnhancedRheaCtrolReg
       (RheaTimeOutToggle_t       *const TimeOutEnable, 
        RheaInterruptToggle_t     *const InterruptDisable,
        RheaHighFrequencyToggle_t *const HighFrequencyEnable,
		  RheaAbortToggle_t         *const AbortDisable);


/*
--------------------------------------------------------------------------
 NAME        : RHEA_ReadFaultAddress                                     -
 DESCRIPTION : Read Debug Address register to get the fault address      -
 PARAMETERS  : None                                                      -
 RETURN VALUE: ARM memory interface Address of the access that generated -
               an abort or access size mismatch                          -
 LIMITATIONS : None                                                      -
--------------------------------------------------------------------------
*/ 
UWORD16 RHEA_ReadFaultAddress(void);


/*
-----------------------------------------------------------------------
 NAME        : RHEA_ReadFaultDataLow                                  -
 DESCRIPTION : Read Debug Data LSB register to get the fault data low -
 PARAMETERS  : None                                                   -
 RETURN VALUE: UWORD8s 0 to 15 data bus from ARM that generated         -
               a write access abort or read access size mismatch      -
 LIMITATIONS : Irrelevant on read access abort                        -
-----------------------------------------------------------------------
*/ 
UWORD16 RHEA_ReadFaultDataLow(void);

/*
-----------------------------------------------------------------------
 NAME        : RHEA_ReadFaultDataHigh                                 -
 DESCRIPTION : Read Debug Data MSB register to get the fault data low -
 PARAMETERS  : None                                                   -
 RETURN VALUE: UWORD8s 16 to 31 data bus from ARM that generated        -
               a write access abort or read access size mismatch      -
 LIMITATIONS : Irrelevant on read access abort                        -
-----------------------------------------------------------------------
*/ 
UWORD16 RHEA_ReadFaultDataHigh(void);


/*
-----------------------------------------------------------------------
               RHEA_ReadDebugCtrolSignal                              -
 DESCRIPTION : Read Debug Control register to get the signals saved   -
               when abort or access size mismatch                     -
 PARAMETERS  :                                                        -
   TimeOut           : True on Timeout otherwise False                -
   AccessSizeMismatch: mismatch between the memory and the peripheral -
                       access sizes                                   -
   RequestType       : Request sense either read or write             -
   NotSupervisorMode : True on Supervisor mode otherwise False        -
   MemoryAccessSize,                                                  -
   PeripheralMemoryAccessSize: either one or two or 4 UWORD8s           -
 RETURN VALUE: None                                                   -
 LIMITATIONS : Irrelevant on read access abort                        -
-----------------------------------------------------------------------
*/ 

typedef enum { RHEA_BITS8_SIZE = 0, 
               RHEA_BITS16_SIZE = 1, RHEA_BITS32_SIZE = 2 } RHEA_Access_Size_t;
typedef enum { RHEA_WRITE_REQUEST = 0,
               RHEA_READ_REQUEST  = 1 } RHEA_Request_t;
void RHEA_ReadDebugCtrolSignal
                (boolean_t          *const TimeOut,
                 boolean_t          *const AccessSizeMismatch,
                 RHEA_Request_t     *const RequestType,
                 boolean_t          *const NotSupervisorMode,
                 RHEA_Access_Size_t *const MemoryAccessSize,
                 RHEA_Access_Size_t *const PeripheralMemoryAccessSize);


/*
------------------------------------------------------------------
 NAME        : RHEA_SetHighFrequency
 DESCRIPTION : Set bit high frequency in enhanced control register
               (incoming from ARM and DMA are clocked)
 PARAMETERS  : None                                              -
 RETURN VALUE: None
 LIMITATIONS : None                                              -
------------------------------------------------------------------
*/ 
void RHEA_SetHighFrequency(void);
/*
------------------------------------------------------------------
 NAME        : RHEA_SetLowFrequency
 DESCRIPTION : Reset bit high frequency in enhanced control register
               (incoming from ARM and DMA are not clocked)
 PARAMETERS  : None                                              
 RETURN VALUE: None
 LIMITATIONS : None                                              
------------------------------------------------------------------
*/ 
void RHEA_SetLowFrequency(void);


/*
------------------------------------------------------------------
 NAME        : One function per register                         -
 DESCRIPTION : Check register has the right expected reset value -
 PARAMETERS  : None                                              -
 RETURN VALUE: True on sucess otherwise false                    -
 LIMITATIONS : None                                              -
------------------------------------------------------------------
*/ 
boolean_t RHEA_CheckResetCtrolReg(void);
boolean_t RHEA_CheckResetBusAllocReg(void);
boolean_t RHEA_CheckResetArmRheaCtrolReg(void);
boolean_t RHEA_CheckResetEnhancedRheaCtrolReg(void);
boolean_t RHEA_CheckResetDebugFaultAddressReg(void);
boolean_t RHEA_CheckResetFaultDataLowReg(void);
boolean_t RHEA_CheckResetFaultDataHighReg(void);
boolean_t RHEA_CheckResetDebugCtrolSignalReg(void);


#endif

⌨️ 快捷键说明

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