Add debug output: print A[0..3], B[0..3], C[0..5] for group 0
This commit is contained in:
@@ -112,11 +112,18 @@ int main(void)
|
||||
printf("\n--- Group %d ---\n", g);
|
||||
|
||||
/* 1. Read A[16] and B[16] from ExtRAM source region */
|
||||
printf(" Reading A/B from ExtRAM...\n");
|
||||
for (i = 0; i < 16; i++) {
|
||||
a_buf[i] = extram[SRC_BASE + g * 32 + i];
|
||||
b_buf[i] = extram[SRC_BASE + g * 32 + 16 + i];
|
||||
}
|
||||
if (g == 0) {
|
||||
printf(" A[0..3]: %08lx %08lx %08lx %08lx\n",
|
||||
(unsigned long)a_buf[0], (unsigned long)a_buf[1],
|
||||
(unsigned long)a_buf[2], (unsigned long)a_buf[3]);
|
||||
printf(" B[0..3]: %08lx %08lx %08lx %08lx\n",
|
||||
(unsigned long)b_buf[0], (unsigned long)b_buf[1],
|
||||
(unsigned long)b_buf[2], (unsigned long)b_buf[3]);
|
||||
}
|
||||
|
||||
/* 2. Write A and B to IP registers */
|
||||
printf(" Loading A/B into IP...\n");
|
||||
@@ -138,8 +145,15 @@ int main(void)
|
||||
for (i = 0; i < 48; i++) c_buf[i] = 0;
|
||||
} else {
|
||||
/* 6. Read result C[48] from IP */
|
||||
printf(" Reading C from IP...\n");
|
||||
read_ip(MATMUL_C_BASE, c_buf, 48);
|
||||
if (g == 0) {
|
||||
printf(" C[0..2]: %08lx %08lx %08lx\n",
|
||||
(unsigned long)c_buf[0], (unsigned long)c_buf[1],
|
||||
(unsigned long)c_buf[2]);
|
||||
printf(" C[3..5]: %08lx %08lx %08lx\n",
|
||||
(unsigned long)c_buf[3], (unsigned long)c_buf[4],
|
||||
(unsigned long)c_buf[5]);
|
||||
}
|
||||
printf(" Group %d: OK\n", g);
|
||||
pass++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user