diff --git a/sdk/software/examples/asm/user-sample.c b/sdk/software/examples/asm/user-sample.c index c277284..129e6a3 100644 --- a/sdk/software/examples/asm/user-sample.c +++ b/sdk/software/examples/asm/user-sample.c @@ -145,8 +145,6 @@ int main(void) /* ── Start marker (must be first output) ──────────────────── */ printf("MATMUL_START\n"); - - unsigned int tick_start = get_ns(); // 清理寄存器状态 REG_WR(MATMUL_STATUS, STATUS_DONE | STATUS_ERROR); @@ -187,16 +185,6 @@ int main(void) // 6. 立即启动当前组在 IP 中的计算 REG_WR(MATMUL_CTRL, ctrl_start[cur_bank]); - - // 调试输出逻辑 (通过无缓存指针直接从内存读取刚刚 DMA 写回的数据) - // 注意:因为 Channel 1 刚启动,需要等它搬运完才能打印 C[0..2] - if (g - 1 == 1) { // 也就是当刚刚计算完 Group 1 并发起 DMA 后 - dma_wait_polling(1); // 强制等一下,供打印使用 - printf("DBG C[0..2]=%08lx %08lx %08lx\n", - (unsigned long)extram[DST_BASE_WORDS + 1 * 48 + 0], - (unsigned long)extram[DST_BASE_WORDS + 1 * 48 + 1], - (unsigned long)extram[DST_BASE_WORDS + 1 * 48 + 2]); - } } /* ── Epilogue: 收尾最后一组 ───────────────────────────── */ @@ -206,17 +194,6 @@ int main(void) // DMA CH1 将最后一组结果写回 dma_start_transfer(1, phys_bank_C[(MATMUL_GROUP_NUM - 1) % 2], EXTRAM_PHYS_C(MATMUL_GROUP_NUM - 1), 192, 20); dma_wait_polling(1); // 必须等待最后一组写回完成 - - unsigned int tick_end = get_ns(); - - // 检查测试输出要求 - printf("DBG wrote C[0]=%08lx @ ExtRAM[%d]\n", - (unsigned long)extram[DST_BASE_WORDS], DST_BASE_WORDS); - - printf("\n--- Performance Data ---\n"); - unsigned int total_time = tick_end - tick_start; - printf("Matmul %d groups total time: %u ns (%.3f ms)\n", - MATMUL_GROUP_NUM, total_time, (float)total_time / 1000000.0); /* ── CRC32 over result region ─────────────────────────────── */ crc = compute_crc32(extram);