AM273x MCU+ SDK  09.02.00
sdl_ip_hwa.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022-23 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 
52 #ifndef SDL_IP_HWA_H_
53 #define SDL_IP_HWA_H_
54 
55 /* ========================================================================== */
56 /* Include Files */
57 /* ========================================================================== */
58 #include <stddef.h>
59 #include <stdbool.h>
60 
61 #ifdef __cplusplus
62 extern "C" {
63 #endif
64 
85 /* ========================================================================== */
86 /* Structure Declarations */
87 /* ========================================================================== */
88 
94 typedef struct Sdl_HWA_Status_t
95 {
96  /* Clock status for hwa memory block */
98  /* HWA accelerator status for memory block */
101 
108 typedef enum {
109  SDL_HWA_DMEM0 = 0,
111  SDL_HWA_DMEM1 = 1,
113  SDL_HWA_DMEM2 = 2,
115  SDL_HWA_DMEM3 = 3,
117  SDL_HWA_DMEM4 = 4,
119  SDL_HWA_DMEM5 = 5,
121  SDL_HWA_DMEM6 = 6,
123  SDL_HWA_DMEM7 = 7,
125  SDL_HWA_WINDOW_RAM = 8,
129  SDL_HWA_INVALID = 10,
132 
133 typedef enum {
140  SDL_HWA_INVALID_ID = 3,
142 } SDL_HWA_MemID;
143 
146 /* ========================================================================== */
147 /* Macros & Typedefs */
148 /* ========================================================================== */
149 
155 /* Enable HWA */
156 #define SDL_HWA_ENABLE_STS (1U)
157 /* Disable HWA */
158 #define SDL_HWA_DISABLE_STS (0U)
159 /* Parity for HWA Data memories */
160 #define SDL_HWA_DMEM_PARITY (1U)
161 /* Parity for Window RAM memories */
162 #define SDL_HWA_DMEM_WINDOW_RAM_PARITY (2U)
163 /* HWA FSM Lockstep Enable Inverted */
164 #define SDL_HWA_DMEM_FSM_LOCKSTEP_INV_EN (3U)
165 /* HWA FSM Lockstep Enable */
166 #define SDL_HWA_DMEM_FSM_LOCKSTEP_EN (4U)
167 
170 /* ========================================================================== */
171 /* Function Declarations */
172 /* ========================================================================== */
189 void SDL_HWA_setParityEnableDisable(uint8_t memBlockParity,uint8_t enableSts);
200 uint8_t SDL_HWA_getParityStatus(uint8_t memBlockParity);
201 
214 void SDL_HWA_setHwaEnableDisable(uint8_t enableSts);
215 
228 
237 
248 
259 
270 void SDL_HWA_setParityErrMaskUnmask(SDL_HWA_MemBlock memBlock, uint8_t enableSts);
271 
282 
298 
314  uint32_t *baseAddr);
315 
318 #ifdef __cplusplus
319 }
320 #endif
321 #endif /* SDL_IP_HWA_H_ */
322 
SDL_HWA_WINDOW_RAM_MEM_ID
@ SDL_HWA_WINDOW_RAM_MEM_ID
Definition: sdl_ip_hwa.h:138
SDL_HWA_getMemblockBaseaddr
int32_t SDL_HWA_getMemblockBaseaddr(SDL_HWA_MemID memID, SDL_HWA_MemBlock memBlock, uint32_t *baseAddr)
This API is used to get the memory block base address.
SDL_HWA_memoryInitStatus
uint8_t SDL_HWA_memoryInitStatus(SDL_HWA_MemBlock memBlock)
This API is used to check the initialize status.
SDL_HWA_setParityEnableDisable
void SDL_HWA_setParityEnableDisable(uint8_t memBlockParity, uint8_t enableSts)
This API is used to enable or disable the parity for memory block and lockstep logic.
SDL_HWA_clearErrStatus
void SDL_HWA_clearErrStatus(SDL_HWA_MemBlock memBlock)
This API is used to clear error status.
SDL_HWA_INVALID
@ SDL_HWA_INVALID
Definition: sdl_ip_hwa.h:129
SDL_HWA_INVALID_ID
@ SDL_HWA_INVALID_ID
Definition: sdl_ip_hwa.h:140
SDL_HWA_DMA0_MEM_ID
@ SDL_HWA_DMA0_MEM_ID
Definition: sdl_ip_hwa.h:134
SDL_HWA_DMEM6
@ SDL_HWA_DMEM6
Definition: sdl_ip_hwa.h:121
SDL_HWA_WINDOW_RAM
@ SDL_HWA_WINDOW_RAM
Definition: sdl_ip_hwa.h:125
SDL_HWA_DMEM0
@ SDL_HWA_DMEM0
Definition: sdl_ip_hwa.h:109
SDL_HWA_getHwaEnableDisable
int32_t SDL_HWA_getHwaEnableDisable(SDL_HWA_Status_s *pHWAStats)
This API is used to get enable/disable Radar Hardware Accelerator and respective clock.
SDL_HWA_getErrStatus
uint8_t SDL_HWA_getErrStatus(SDL_HWA_MemBlock memBlock)
This API is used to get error status.
SDL_HWA_MemBlock
SDL_HWA_MemBlock
Definition: sdl_ip_hwa.h:108
SDL_HWA_DMEM7
@ SDL_HWA_DMEM7
Definition: sdl_ip_hwa.h:123
SDL_HWA_MemID
SDL_HWA_MemID
Definition: sdl_ip_hwa.h:133
SDL_HWA_memoryInitDone
uint8_t SDL_HWA_memoryInitDone(SDL_HWA_MemBlock memBlock)
This API is used to check the initialize done status.
SDL_HWA_DMEM1
@ SDL_HWA_DMEM1
Definition: sdl_ip_hwa.h:111
SDL_HWA_Status_s::SDL_HWA_enableHwaClkSTS
uint8_t SDL_HWA_enableHwaClkSTS
Definition: sdl_ip_hwa.h:97
SDL_HWA_Status_s::SDL_HWA_enableHwaSTS
uint8_t SDL_HWA_enableHwaSTS
Definition: sdl_ip_hwa.h:99
SDL_HWA_DMEM5
@ SDL_HWA_DMEM5
Definition: sdl_ip_hwa.h:119
SDL_HWA_getParityErrMaskUnmask
uint8_t SDL_HWA_getParityErrMaskUnmask(SDL_HWA_MemBlock memBlock)
This API is used get mask/unmask parity error status.
SDL_HWA_FSM_LOCKSTEP
@ SDL_HWA_FSM_LOCKSTEP
Definition: sdl_ip_hwa.h:127
SDL_HWA_DMEM3
@ SDL_HWA_DMEM3
Definition: sdl_ip_hwa.h:115
SDL_HWA_DMEM4
@ SDL_HWA_DMEM4
Definition: sdl_ip_hwa.h:117
SDL_HWA_Status_s
Definition: sdl_ip_hwa.h:95
SDL_HWA_setHwaEnableDisable
void SDL_HWA_setHwaEnableDisable(uint8_t enableSts)
This API is used to enable/disable Radar Hardware Accelerator and respective clock.
SDL_HWA_DMA1_MEM_ID
@ SDL_HWA_DMA1_MEM_ID
Definition: sdl_ip_hwa.h:136
SDL_HWA_getParityStatus
uint8_t SDL_HWA_getParityStatus(uint8_t memBlockParity)
This API is used to get status for parity for memory block.
SDL_HWA_setParityErrMaskUnmask
void SDL_HWA_setParityErrMaskUnmask(SDL_HWA_MemBlock memBlock, uint8_t enableSts)
This API is used to mask/unmask parity error status.
SDL_HWA_DMEM2
@ SDL_HWA_DMEM2
Definition: sdl_ip_hwa.h:113
SDL_HWA_memoryInitStart
void SDL_HWA_memoryInitStart(SDL_HWA_MemBlock memBlock)
This API is used to initialize the memory.