Age | Commit message (Collapse) | Author |
|
Change-Id: Ic370f071eb4f3ed83cd9e5a6b587d7d527c37825
|
|
Allow the QREAD and STATUS registers to be read using the PMU
interface.
Change-Id: I7e349a0938404011588c1d5eb82b4a5dbc7c27e4
|
|
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
|
|
Small bugfix to a print in driver
Change-Id: I277a441a9f65c647c338b92af5a908176929102c
|
|
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
|
|
Remove new line from log messages to allow the log makros to format
the output.
Change-Id: Idc07d0ef1fb77530fa07279ae92b2c964ebb6287
|
|
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
|
|
Made a separate header file for logging specific content.
Cleaned up logging messages.
Change-Id: Id329b40977156ca5b954b3a222effaedbc6b2a2c
|
|
These changes mostly focus on creating a better structure
for the driver. Creating a better separation between driver
and device(s).
A short summary of what this commit contains:
- Move driver specific defines from device to driver
- Prefix device functions with ethosu_dev
- Remove device specific register access' from driver
- Remove device specific debug/dump functions
- Add function prototypes for weak functions
- Remove legacy ARM_NPU_STUB support
- Rename ethosu_device.c to ethosu_device_u55.c
- Remove redundant irq handler prototype
- Remove (deprecated) hardcoded instance ethosu_drv
- Simplify versioning API
Split driver version and hardware version/information so
that driver version can be queried without a driver instance.
- Improve and simplify logging
Make warning the new default severity level to print and
reduce severity levels to:
err
warning
info
debug
- Add severity prefix to log lines. Error messages print file
and line number, debug messages print function by default.
- Clarify some log messages
- Small optimizations and bugfixes
Change-Id: I2dfbfc3a40d7eca133c82f187f422325e1e6d314
|
|
Removing the ASSERT() makro using assert() instead. assert() is better
controlled with the NDEBUG define.
Using uintptr_t instead of uint32_t * for the NPU base address. This
saves a division by 4 in the register read and write functions.
Change-Id: I65a91fe35dc63666e50bdf7a756ad15b56dc66e9
|
|
NPU PMU interface currently have functions that have been stepped
each time a compatibilty breaking changed has been introduced. Old
entrypoints have been redefined with macro to use the latest version
for backwards compatibility. This series of patches will remove any
such functions and macro to unify the interface.
Update: Remove all "_v2"-functions and make the latest version the base
entrypoint
Update: Remove all redefine macros to only allow base entrypoint
Change-Id: Ie125e2428a0336fe797c7455014d269a981f6f92
|
|
Currently clock request is enabled, which means NPU will
only request clock when working. When NPU is going into idle it will no
longer request clock and thus PMU won't be clocked either, and thus
affect the cycle counter.
Added: enum for request clients (PMU or INFERENCE).
Added: clock_request added to driver struct (bit 0: PMU, bit 1:
INFERENCE) which keeps track of which client requests clock.
Added: power_request added to driver struct (bit 0: PMU, bit 1:
INFERENCE) which keeps track of which client requests power.
Added set_clock_and_power_request(...) updates clock_request and
power_request depending on which client calls it. Sets clock and power
if both PMU and INFERENCE requests it.
Added: Call set_clock_and_power_request(...) from PMU.
Changed: replace ethosu_set_clock_and_power(...) with
set_clock_and_power_request(...) in ethosu_init and ethosu_invoke
Change-Id: Ie7d8aee639d4abbf879b05e9a82035d7c0d40d40
|
|
The pmu configuration API expects the internal configuration values,
and not the exported enum. Update the API to instead use the enums to be
able to configure them correctly.
Change-Id: I038b1841f2459baec4a62a6a4389ea4b5f4822f2
|
|
---ethosu_driver---
Modified: Declarations for the driver interfaces to support multiNPU (takes *drv)
Added: ethosu_register_driver(...) to allow for a specific NPU driver to be instantiated
Added: ethosu_deregister_Driver(...) to allow for a specific NPU driver to be de-registered
Added: ethosu_reserve_driver(...) to reserve & return the first NPU driver instance available
Added: ethosu_release_driver(...) to release a specific NPU driver instance and make it available again
Added: *registered_drivers - A static linked list of drivers ready be used
---ethosu_pmu---
Modified: Declarations for pmu interfaces to support multiNPU (takes *drv)
---ethosu_device---
Modified: Resolved a circular include dependency (Remove include and add ETHOSU_PMU_NCOUNTERS macro)
Change-Id: Iede41cd41bb0d5d483bd9d929d1b6c9ca5d3c48e
|
|
The low and high PMU cycle counter registers were not combined
correctly.
Change-Id: I6b311b33527557f459fd87ebd5d4d3228625106a
|
|
Storing PMU counters in shadow variables, in case the PMU was powered
off or soft reset.
Change-Id: I64ccf3fb6195f9be2d8315891ec612bb75404885
|
|
GCC > 7 warns that the selected type of the enum makes the comparisson
unneccesary. Since the selected enum fits in an integer, the input
parameter is casted to an integer to make the comparison valid and
asserts that the enum is within valid enum values (which we know are
monotonically growing).
Change-Id: Id81799e2ac43a83b998541ce7531d2039202cd62
|
|
Change-Id: I591284c1b06b660fc303bb5b4fa282d403ee42c0
|
|
Change-Id: Ia2a0ac76fca0fd12efee305a2ea2ebd5b2055b2d
|
|
Change-Id: I54a1927fef998bc97f5507f2de9faf7d4a7960f5
|
|
Change-Id: I1145834000ff81d6e497a8fa77bf997478a80372
|
|
This change is done as a prerequisite to be able to set
base address for NPU through ethosu_init(). So instead of using
a mamory mapped struct we use the same functions to read/write
PMU registers as the rest of the ethos-u driver.
Change-Id: Ie1f6e6af4627cbe9375e2b2d079ba8017b6294d3
|
|
Moving PMU files from ethosu_pmu to include and src.
Adding extern "C" to PMU header.
Removing CMake generated file.
Updating default path to CMSIS.
Removing timing adapter.
Change-Id: I4834c5361c14efe629c5cb36a17013d02cc765c8
|