perf(matmul): pre-fire DMA Ch0 load + inline wait/DMA start + XOR bank toggle
user-sample.c v2 optimizations: - Pre-fire DMA Ch0 load at loop tail to overlap fully with IP compute - Inline wait_matmul_done/wait_dma_done to eliminate function call overhead - Inline DMA register writes, skip redundant STATUS_BUSY_BIT check - Replace g%2 with XOR bank toggle (bank ^= 1) - Cache volatile pointers in locals (ch0, ch1, mat_status, mat_ctrl) Makefile: bump -O2 to -O3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
TARGET = user-sample
|
||||
|
||||
MATMUL_GROUP_NUM ?= 5000
|
||||
CFLAGS += -O2 -g -DMATMUL_GROUP_NUM=$(MATMUL_GROUP_NUM)
|
||||
CFLAGS += -O3 -g -DMATMUL_GROUP_NUM=$(MATMUL_GROUP_NUM)
|
||||
|
||||
C_SRCS := $(wildcard ./*.c )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user