3.5.1.21.7 Memory Map

Apart from the auto-generation of driver functions, SmartHLS also generates the memory map header file to provide the following macros to be used by the driver functions:
Table 3-13. Macros for Driver Functions
Macro NameDescription
DMA_ADDR_<HLS_PROJ_NAME>The physical address of the Soft-DMA IP core. This definition is only generated if the SmartHLS project includes the Soft-DMA IP core, for example, when the project type is MiV_SoC. When using the RISC-V processors in the HSS, SmartHLS will use the built-in hardened DMA engine in the HSS.
<TopFunc>_BASE_ADDRThe physical base address of the SmartHLS module <TopFunc>. This address is automatically computed by SmartHLS for each top-level function in the HLS project if using the SmartHLS SoC Flow.
<TopFunc>_SPAN_ADDRThe address span or address space size required for the SmartHLS module <TopFunc>. The address space required for a given SmartHLS module depends on the number and type of arguments in the C++ top-level function.

The following is an example of the memory map file auto-generated when generating the driver functions for three HLS top modules:

#ifndef _MULTIPLE_ACCEL_TEST_MEMORY_MAP_H
#define _MULTIPLE_ACCEL_TEST_MEMORY_MAP_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
#define DMA_ADDR_MULTIPLE_ACCEL_TEST 0x80100000
#define HW_CONST_ADD_BASE_ADDR 0x80101000
#define HW_CONST_ADD_SPAN_ADDR 0x3c0
 
#define HW_CONST_MULT_BASE_ADDR 0x80101400
#define HW_CONST_MULT_SPAN_ADDR 0x3c0
 
#define HW_SUM_BASE_ADDR 0x80101800
#define HW_SUM_SPAN_ADDR 0x200
 
#ifdef __cplusplus
}
#endif
 
#endif