aboutsummaryrefslogtreecommitdiff
path: root/src/ethosu_device_u55_u65.c
AgeCommit message (Collapse)Author
11 daysRemove malloc call from device init codeHEADmainJonny Svärd
As there is max one device per driver handle, store the device struct in the driver struct and get rid of the malloc call from the device init code. Change-Id: I0f98a78907cb322d98278e9adc314e3c05f54308 Signed-off-by: Jonny Svärd <jonny.svaerd@arm.com>
2023-02-16Fix (part of) SEI CERT coding standard warning23.02-rc223.02Ledion Daja
Change-Id: Ic370f071eb4f3ed83cd9e5a6b587d7d527c37825
2022-11-14Remapping command stream and base pointersKristofer Jonsson
Add new weak function ethosu_address_remap() that allows the addresses for QBASE and BASEP to be remapped. Change-Id: I36b0d71c57bfd293672b10c7b85f3b2415e9c839
2022-05-13Set default configuration22.05-rc322.05-rc2Kristofer Jonsson
Base address 1 points at the TFLM arena and is by default routed over AXI 0. For the spilling use case with both model and arena in DRAM it would make more sense to route base addresses 0 and 1 over AXI 1. For Ethos-U65 the default settings should correspond to the spilling use case. The AXI limits should have different max values depending on the NPU architecture. Change-Id: Icd317097e2cfdbfb39886e13c2cb2202651e5357
2022-05-05Refactor power handling22.05-rc1Jonny Svärd
Add reference counted ethosu_request_power(), ethosu_release_power() functions. While there are active requests, disable the Q-channel power gating of the Ethos-U device, leaving the device powered on. Note that clock gating is implemented to follow the state of the power gating. Add ethosu_soft_reset() function. Restore power- and clock gating state after reset. Refactor and simplify driver code to use the new functions. Change-Id: I9756572c5c3e51b2be244bcea856d88e890e2d40
2022-03-31Add driver async APIJonny Svärd
Add an asynchronous API to the driver. The current synchronous API is now using the new async API internally. The main new functions are ethosu_invoke_async() and ethosu_wait(). Every successfull call to ethosu_invoke_async() must be followed by a call to ethosu_wait() to get the status of the inference. The wait function can be called in a blocking or non-blocking mode by specifying the `block` argument to true/false. The regular synchronous invoke function is implemented as a invoke_async followed by a wait(block=true) call. Short sommary of changes: - Add an internal ethosu_job struct to keep track of inference data and job state. - Use async API in blocking mode for normal flow - Change default semaphore implementation to binary type - Move error prints out of interrupt context - Move ethosu_inference_begin() callback to right before HW invoke - Always call ethosu_inference_end() callback, even in case of errors - On NPU error, do not keep NPU powered after being reset Change-Id: If4c3c46e3c6732a669e17251bd848dea5765a490
2022-01-28Inference begin and end user argumentKristofer Jonsson
Adding user argument parameter to invoke() which is passed on to the inference_begin() and inference_end() callbacks. Change-Id: I1372767c3a0dbd963aa395911bda7625bc6d6ee4
2022-01-18Add product type verificationJonny Svärd
Remove redundant shram_size check as its a function of product type and number of macs Change-Id: Ia3bac0cf38da51d0894c3f1f94b02c59823e6034
2021-12-08Minor bugfixes and clean upJonny Svärd
Change error message to LOG_ERR from LOG_DEBUG and simplify error checks Remove redundant code in driver Disable the PMU before enabling power/clock gating Change-Id: I3092113250c1b165d985194ca2da213622629488
2021-12-06Fixing compiler warningsKristofer Jonsson
Change-Id: I287eef0cff78109a66d132fad283cb910be67f63
2021-11-18Remove new line from log messages21.11-rc321.11-rc221.11Kristofer Jonsson
Remove new line from log messages to allow the log makros to format the output. Change-Id: Idc07d0ef1fb77530fa07279ae92b2c964ebb6287
2021-11-01Autumn clean/refactor of NPU driverJonny Svärd
A continuation of the spring clean/refactor work. Create a better separation between driver and device(s). A short summary of what this commit contains: - Split device and driver - Simplify and hide the internal device interface - Remove (broken) abort inference functionality - Refactoring of structure - Optimizations and bugfixes Change-Id: I8988bc5f163f9ea62add2a933e4f100a82cc8d35