commit | 716546ac63b42a3d6faa70d4a18418c0d020df3d | [log] [tgz] |
---|---|---|
author | Per Åstrand <per.astrand@arm.com> | Sat Oct 24 20:17:32 2020 +0200 |
committer | Per Åstrand <per.astrand@arm.com> | Mon Nov 16 13:57:40 2020 +0100 |
tree | 66b7853d0cd60977584b1a60a41581c552ce0d17 | |
parent | 2354d3e8a681b282e1fc1b098ecacca3c58e38c0 [diff] |
Configure PMUs from inference_runner Change-Id: I3291de22a5461e285b8750094aa1c65716374bd7
The Linux driver stack for Arm Ethos-U provides an example of how a rich operating system like Linux can dispatch inferences to an Arm Cortex-M subsystem, consisting of an Arm Cortex-M of choice and an Arm Ethos-U NPU.
The kernel drivers are provided under a GPL v2 license. All other software componantes are provided under an Apache 2.0 license.
The driver stack comes with a CMake based build system. Cross compile for an Arm CPU can for example be done with the provided toolchain file.
$ mkdir build $ cd build $ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/aarch64-linux-gnu.cmake -DKDIR=<Kernel directory> $ make
The kernel driver uses the mailbox APIs as a doorbell mechanism.
/ { reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; ethosu_msg: ethosu_msg@80000000 { compatible = "shared-dma-pool"; reg = <0 0x80000000 0 0x00040000>; no-map; }; ethosu_reserved: ethosu_reserved@80040000 { compatible = "shared-dma-pool"; reg = <0 0x80040000 0 0x00040000>; no-map; }; }; ethosu_mailbox: mhu@6ca00000 { compatible = "arm,mhu", "arm,primecell"; reg = <0x0 0x6ca00000 0x0 0x1000>; interrupts = <0 168 4>; interrupt-names = "npu_rx"; #mbox-cells = <1>; clocks = <&soc_refclk100mhz>; clock-names = "apb_pclk"; }; ethosu { #address-cells = <2>; #size-cells = <2>; compatible = "arm,ethosu"; reg = <0 0x80000000 0 0x00010000>, <0 0x80010000 0 0x00010000>; reg-names = "in_queue", "out_queue"; memory-region = <ðosu_reserved>; dma-ranges = <0 0x60000000 0 0x80000000 0 0x20000000>; mboxes= <ðosu_mailbox 0>, <ðosu_mailbox 0>; mbox-names = "tx", "rx"; }; };