Debug: check ExtRAM write-back at start/mid/end of range

This commit is contained in:
2026-06-24 22:36:29 +08:00
parent d39b5ecdae
commit 3269e83d68

View File

@@ -184,17 +184,14 @@ int main(void)
REG_WR(MATMUL_CTRL, CTRL_START);
wait_done();
read_ip(MATMUL_C_BASE, c_buf, 48);
if (g == 1) {
printf("DBG A[0]=%08lx B[0]=%08lx C[0..2]=%08lx %08lx %08lx\n",
(unsigned long)a_buf[0], (unsigned long)b_buf[0],
(unsigned long)c_buf[0], (unsigned long)c_buf[1],
(unsigned long)c_buf[2]);
}
for (i = 0; i < 48; i++)
extram[DST_BASE + g * 48 + i] = c_buf[i];
if (g == 0) {
printf("DBG wrote C[0]=%08lx @ ExtRAM[%d]\n",
(unsigned long)extram[DST_BASE], DST_BASE);
if (g == 0 || g == 1 || g == (MATMUL_GROUP_NUM-2) || g == (MATMUL_GROUP_NUM-1)) {
printf("DBG g=%d C[0..2]=%08lx %08lx %08lx ExtRAM rdback=%08lx\n",
g, (unsigned long)c_buf[0], (unsigned long)c_buf[1],
(unsigned long)c_buf[2],
(unsigned long)extram[DST_BASE + g * 48]);
}
}
}