aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKristofer Jonsson <kristofer.jonsson@arm.com>2020-09-02 16:42:43 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2020-09-04 15:45:31 +0200
commit2b201c340788ac582cec160b7217c2b5405b04f9 (patch)
treed490bbcbaf1a66ea83621c08b468b097c7aa892e /include
parentea1f593c78983298cfcd5d13324d2f6fc063e591 (diff)
downloadethos-u-core-driver-2b201c340788ac582cec160b7217c2b5405b04f9.tar.gz
Move fast memory area to core driver
Change-Id: Ie4186f5ab881d5c13021299404322ff582180d26
Diffstat (limited to 'include')
-rw-r--r--include/ethosu_driver.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/include/ethosu_driver.h b/include/ethosu_driver.h
index 64ccb89..d6e9c6d 100644
--- a/include/ethosu_driver.h
+++ b/include/ethosu_driver.h
@@ -26,6 +26,7 @@
#include "ethosu_device.h"
#include <stdbool.h>
+#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
@@ -40,6 +41,8 @@ struct ethosu_driver
{
struct ethosu_device dev;
bool abort_inference;
+ uint64_t fast_memory;
+ size_t fast_memory_size;
};
struct ethosu_version_id
@@ -79,7 +82,9 @@ struct ethosu_version
/**
* Initialize the Ethos-U driver.
*/
-int ethosu_init(const void *base_address);
+int ethosu_init_v2(const void *base_address, const void *fast_memory, const size_t fast_memory_size);
+
+#define ethosu_init(base_address) ethosu_init_v2(base_address, NULL, 0)
/**
* Get Ethos-U version.
@@ -89,10 +94,15 @@ int ethosu_get_version(struct ethosu_version *version);
/**
* Invoke Vela command stream.
*/
-int ethosu_invoke(const void *custom_data_ptr,
- const int custom_data_size,
- const uint64_t *base_addr,
- const int num_base_addr);
+int ethosu_invoke_v2(const void *custom_data_ptr,
+ const int custom_data_size,
+ const uint64_t *base_addr,
+ const size_t *base_addr_size,
+ const int num_base_addr);
+
+#define ethosu_invoke(custom_data_ptr, custom_data_size, base_addr, num_base_addr) \
+ ethosu_invoke_v2(custom_data_ptr, custom_data_size, base_addr, NULL, num_base_addr)
+
/**
* Abort Ethos-U inference.
*/