07b670b4c9
perf(matmul): strip ALL timing — zero get_ns() calls, zero TIME_* output
...
Removed:
- confreg_time.h and common_func.h includes
- All get_ns() calls (6 in prologue/loop/epilogue boundaries)
- All timing variables (t_prologue, t_mainloop, t_epilogue)
- All TIME_* printf markers
- Unused extram pointer and stdbool.h
Only essential output remains: MATMUL_START, MATMUL_CRC32, MATMUL_DONE
2026-06-26 17:46:07 +08:00
6aab84bf4b
perf(matmul): remove diagnostic get_ns() calls from hot loop (v2 clean)
...
Stripped all per-iteration timing instrumentation:
- Removed 16 get_ns() calls per iteration from main loop
- Removed pipeline diagnostic print section
- Removed timing accumulator variables
- Retained outer timing markers only (prologue/loop/epilogue)
Expected ~45% speedup from removing measurement overhead
(previous run: 179.6ms with diag → estimated ~100ms clean)
2026-06-26 17:44:13 +08:00
45731e05b7
perf(matmul): add pipeline timing diagnostics (v2.1)
...
Measure per-phase wait times and stall counts to identify bottleneck:
- PIPE_WAIT_IP / DMA0 / DMA1: aggregate wait time per resource
- PIPE_FIRE_DMA / IP: register write overhead
- PIPE_STALL_*: iterations where each resource actually blocked
Output after standard markers, before MATMUL_DONE.
Allows data-driven decision on next optimization target:
wait_ip dominant → optimize IP (HW multiplier pipeline)
wait_dma0 dominant → pre-fire insufficient (wider bus/faster RAM)
wait_dma1 dominant → bank reuse delay (deeper buffering)
2026-06-26 03:54:20 +08:00
81c636fb56
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
2026-06-26 03:39:32 +08:00
a2b496ca8d
Restore timing + switch to polling + disable CPU interrupts (IE=0)
2026-06-26 01:01:48 +08:00
115466353d
Remove timing instrumentation from user-sample.c
2026-06-26 00:34:44 +08:00
f8459f2478
Hardware CRC32 engine in matmul IP: 4-byte/cycle combinational, register at 0x010
2026-06-25 20:40:08 +08:00
76b5f30c6b
Move MATMUL_DONE to last line
2026-06-25 20:11:45 +08:00
d9483a9d39
Add timing instrumentation for profiling (prologue/loop/epilogue/crc32)
2026-06-25 20:10:31 +08:00
956cd67773
Interrupt-driven wait: matmul HWI2 + DMA HWI1 direct CPU lines
2026-06-25 20:03:53 +08:00
57ba5d271d
Remove all debug and printf
2026-06-25 15:44:18 +08:00
a9958ee4fa
BURST_LEN 47->63 (64 beats)
2026-06-25 04:08:18 +08:00
3cad98a811
Increase BURST_LEN to 47 (48 beats) to cover 192-byte C reads in one burst
2026-06-25 03:54:10 +08:00
54aa37adee
Add debug output for C[0][0]/C[1][1]/C[2][3] of groups 0,1
2026-06-25 03:03:10 +08:00
9ecda4aa7a
Fix CRC32 table, remove debug output
2026-06-25 02:51:36 +08:00
5e467175ea
Merge main (user mods) into no-fft
2026-06-25 00:44:01 +08:00
641d055f18
User mods: matmul RTL + shift_add_mult + C program
2026-06-25 00:43:16 +08:00
1660b283c4
Move DMA files to asm/, remove from common.mk
2026-06-24 23:52:30 +08:00
5dcee80b95
DMA-driven: A+B+C per group via DMA ch0/ch1, -O2 CRC32 from ExtRAM
2026-06-24 23:46:58 +08:00
a42568f635
Clean production code: -O2, read CRC32 from ExtRAM, remove all debug
2026-06-24 23:42:35 +08:00
c1fcb3c796
CRC32 on-the-fly from c_buf — bypass ExtRAM reads entirely
2026-06-24 23:38:06 +08:00
07f8422d75
Fix CRC32 table entry 187: 0x5CB30A04 -> 0x5CB36A04
2026-06-24 23:32:24 +08:00
93361733f6
Definitive write test: write 0xDEADBEEF then read back
2026-06-24 23:29:00 +08:00
16c0d7b639
Use __sync_synchronize() hardware barrier instead of asm compiler barrier
2026-06-24 23:22:38 +08:00
f0ebf1f5fa
Output A0/B0/C0 for groups 0-3 and N-2,N-1
2026-06-24 23:16:26 +08:00
2c8f5d37f3
Add asm memory barrier before CRC32 to flush write buffer
2026-06-24 23:09:06 +08:00
afef1f1433
Add group 1 A/B/C debug output
2026-06-24 23:03:46 +08:00
23bb112586
Print CRC32 loop counter to verify iteration count
2026-06-24 23:01:29 +08:00
8ea98874a5
Inline CRC32 computation into main (bypass function call)
2026-06-24 22:52:08 +08:00
d27e147652
Fix escaped quotes
2026-06-24 22:50:14 +08:00
f6146bd467
Minimal debug: CRC32 self-test + group 0 rdback in one line
2026-06-24 22:49:06 +08:00
e39a655861
Add CRC32 self-test debug output
2026-06-24 22:42:46 +08:00
bbd3e3358b
Fix extra brace in debug code
2026-06-24 22:38:18 +08:00
3269e83d68
Debug: check ExtRAM write-back at start/mid/end of range
2026-06-24 22:36:29 +08:00
4a67ca5c83
Add debug output for group 0 write-back and group 1 compute
2026-06-24 22:09:06 +08:00
aaefb04737
Sync asm/ (user-sample.c + Makefile) from test branch
...
MATMUL_GROUP_NUM defaults to 5000, overridable for fast local testing.
2026-06-24 17:01:45 +08:00
fbc993b846
Initial commit: Loongson FPGA SoC project for 2026 CIC-IEC
2026-06-23 01:22:45 +08:00