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_testsWhen 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
------------------------------------------ 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 D: ethosu_invoke_async(): COMMAND_STREAM I: handle_command_stream: cmd_stream=0x33e80790, cms_length 1 D: ethosu_dev_run_command_stream(): QBASE=0x0000000033e80790, QSIZE=4, cmd_stream_ptr=0x33e80790 D: ethosu_dev_run_command_stream(): BASEP0=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP1=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP2=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP3=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP4=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP5=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP6=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP7=0x0000000000000000 D: ethosu_irq_handler(): Got interrupt from Ethos-U D: ethosu_dev_run_command_stream(): CMD=0x00000001 D: ethosu_wait(): Inference finished successfully... D: ETHOSU_PMU_Get_CCNTR(): val=17455486 D: ETHOSU_PMU_Get_CCNTR(): val=18184607 D: ETHOSU_PMU_Get_EVCNTR(): num=0, val=17993647 D: ETHOSU_PMU_Get_EVCNTR(): num=1, val=18861612 D: ETHOSU_PMU_Get_EVCNTR(): num=2, val=18 D: ETHOSU_PMU_Get_EVCNTR(): num=3, val=0 PMU={cycleCount=18184607, events=[17993647, 18861612, 18, 0]} D: ethosu_release_driver(): NPU driver handle 0x300024d8 released /home/tk/platform/services/ethosu_tests/src/ethosu_unity_test.cc:40:run_ethosu_irq_test:PASS ------------------------------------------ Conv Test ------------------------------------------ I: Acquiring NPU driver handle D: ethosu_reserve_driver(): NPU driver handle 0x300024d8 reserved D: ETHOSU_PMU_Enable(): Enable PMU 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 Running 100 iterations using sync API... 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 D: ethosu_invoke_async(): COMMAND_STREAM I: handle_command_stream: cmd_stream=0x33e80630, cms_length 84 D: ethosu_dev_run_command_stream(): QBASE=0x0000000033e80630, QSIZE=336, cmd_stream_ptr=0x33e80630 D: ethosu_dev_run_command_stream(): BASEP0=0x0000000033e805a0 D: ethosu_dev_run_command_stream(): BASEP1=0x0000000033e800d0 D: ethosu_dev_run_command_stream(): BASEP2=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP3=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP4=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP5=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP6=0x0000000000000000 D: ethosu_dev_run_command_stream(): BASEP7=0x0000000000000000 D: ethosu_dev_run_command_stream(): CMD=0x00000001
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
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 -Thanks for the insights!
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 -