Ethos U55 Driver Unit Test Integration

Hi, 

I have integrated the Ethos U55 driver unit tests for 128MAC configuration as provided under ethos-u-core-platform-24.11\ethos-u-core-platform-24.11\applications\driver_unit_tests

When I run the tests, I see that the IRQ tests are passing, whereas the conv test gets stuck. I have checked the NPU status and it seems to be busy/stuck. Below are the debug logs

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
------------------------------------------
IRQ Test
------------------------------------------
I: Acquiring NPU driver handle
D: ethosu_reserve_driver(): NPU driver handle 0x300024d8 reserved
D: ETHOSU_PMU_Enable(): Enable PMU
I: Soft reset NPU
D: ethosu_dev_set_clock_and_power(): CMD=0x00000000
D: ETHOSU_PMU_CNTR_Enable(): mask=0x80000000
D: ETHOSU_PMU_Set_EVTYPER(): num=0, type=1, val=17
D: ETHOSU_PMU_CNTR_Enable(): mask=0x00000001
D: ETHOSU_PMU_Set_EVTYPER(): num=1, type=2, val=32
D: ETHOSU_PMU_CNTR_Enable(): mask=0x00000002
D: ETHOSU_PMU_Set_EVTYPER(): num=2, type=5, val=35
D: ETHOSU_PMU_CNTR_Enable(): mask=0x00000004
D: ETHOSU_PMU_Set_EVTYPER(): num=3, type=0, val=0
D: ETHOSU_PMU_CNTR_Enable(): mask=0x00000008
D: ETHOSU_PMU_CYCCNT_Reset(): Reset PMU cycle counter
D: ETHOSU_PMU_EVCNTR_ALL_Reset(): Reset all events
D: ethosu_invoke_async(): NOP
D: ethosu_invoke_async(): NOP
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I figured out that the problem lies with the NPU_OP_DMA_START command. It could mean that the DMA configuration commands executed prior to this are incorrect, specifically 

NPU_SET_DMA0_SRC could be pointing to an incorrect region. 

Should I need to modify this default address of 0x00000030 and point it to the exact memory location of tensorflow
(tflmArena) or should it point to the tflmModel? 

Below is the reference command stream given by ARM.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
DRIVER_ACTION_MAGIC()
DRIVER_ACTION_NOP()
DRIVER_ACTION_NOP()
DRIVER_ACTION_COMMAND_STREAM(84)
0x30, 0x01, 0x00, 0x00, // cmd0.NPU_SET_DMA0_SRC_REGION 0 -
0x30, 0x40, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // cmd1.NPU_SET_DMA0_SRC 0 0x00000030 (48) 0x33ebb1f0
0x31, 0x01, 0x01, 0x00, // cmd0.NPU_SET_DMA0_DST_REGION 1 -
0x31, 0x40, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, // cmd1.NPU_SET_DMA0_DST 0 0x00000480 (1152)
0x32, 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // cmd1.NPU_SET_DMA0_LEN 0 0x00000050 (80)
0x10, 0x00, 0x00, 0x00, // cmd0.NPU_OP_DMA_START 0 -
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Thanks for the insights!

0