HPM SDK
HPMicro Software Development Kit
hpm_misc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef HPM_MISC_H
9 #define HPM_MISC_H
10 
11 #define CORE0_ILM_LOCAL_BASE (0x0U)
12 #define CORE0_ILM_SIZE_IN_BYTE (0x20000U)
13 #define CORE0_DLM_LOCAL_BASE (0x200000U)
14 #define CORE0_DLM_SIZE_IN_BYTE (0x20000U)
15 #define CORE1_ILM_LOCAL_BASE (0x40000U)
16 #define CORE1_ILM_SIZE_IN_BYTE (0x20000U)
17 #define CORE1_DLM_LOCAL_BASE (0x240000U)
18 #define CORE1_DLM_SIZE_IN_BYTE (0x20000U)
19 #define CORE0_ILM_SYSTEM_BASE (0x0U)
20 #define CORE0_DLM_SYSTEM_BASE (0x200000U)
21 #define CORE1_ILM_SYSTEM_BASE (0x40000U)
22 #define CORE1_DLM_SYSTEM_BASE (0x240000U)
23 
24 #define HPM_CORE0 (0U)
25 #define HPM_CORE1 (1U)
26 
27 /* map core local memory(DLM/ILM) to system address */
28 static inline uint32_t core_local_mem_to_sys_address(uint8_t core_id, uint32_t addr)
29 {
30  (void) core_id;
31  return addr;
32 }
33 
34 /* map system address to core local memory(DLM/ILM) */
35 static inline uint32_t sys_address_to_core_local_mem(uint8_t core_id, uint32_t addr)
36 {
37  (void) core_id;
38  return addr;
39 }
40 #endif /* HPM_MISC_H */
static uint32_t sys_address_to_core_local_mem(uint8_t core_id, uint32_t addr)
Definition: hpm_misc.h:35
static uint32_t core_local_mem_to_sys_address(uint8_t core_id, uint32_t addr)
Definition: hpm_misc.h:28