🔍 top.matmul_full_width_test

Individual debug report — smoke regression.

← Back to regression report

top.matmul_full_width_test

Verified
Fail signature (UVMError)
UVMError: MATMUL_FULL_WIDTH: MATMUL with dim_n==COLS(16) status=STAT_BAD_DIM, w…

Attempts (2)

Attempt 1 of 2 Sent back for more evidence
Investigation plan
  1. Searched the design spec for expected behavior (MATMUL command dim_n COLS validation)
  2. Searched the design spec for expected behavior (STAT_BAD_DIM error condition)
  3. Searched the design graph (STAT_BAD_DIM)
  4. Searched the design graph (CMD_MATMUL)
  5. Searched the design graph (scheduler)
  6. Searched the design graph (cmd_proc)
  7. Inspected the module instance hierarchy (tpe_scheduler__R10_C10)
  8. Searched the design graph (dim_n)
  9. Searched the design graph (BAD_DIM)
  10. Searched the design graph (status)
  11. Searched the design graph (decode)
  12. Traced the signal's driver (status_q)
Hypothesis / root causertl/scheduler/tpe_scheduler.sv:1
Confidence
37%

Insufficient evidence gathered yet to pinpoint exact lines; need to read rtl/scheduler/tpe_scheduler.sv around line 97 (the always block driving status_q) to find the dim_n comparison against COLS that incorrectly rejects dim_n==16 (should be <= COLS, not < COLS). This is a placeholder pending actual source read.

Retrieved evidence (12 steps)
  1. Step 1: Searched the design spec for expected behavior (MATMUL command dim_n COLS validation)
    (no spec sections matched 'MATMUL command dim_n COLS validation')
  2. Step 2: Searched the design spec for expected behavior (STAT_BAD_DIM error condition)
    (no spec sections matched 'STAT_BAD_DIM error condition')
  3. Step 3: Searched the design graph (STAT_BAD_DIM)
    (no matches)
  4. Step 4: Searched the design graph (CMD_MATMUL)
    (no matches)
  5. Step 5: Searched the design graph (scheduler)
    - Instance:u_scheduler (id=instance:tpe_top.u_scheduler, module=None)
    - Module:tpe_scheduler__R10_C10 (id=module:tpe_scheduler__R10_C10, module=None)
  6. Step 6: Searched the design graph (cmd_proc)
    - Instance:u_cmd_proc (id=instance:tpe_top.u_cmd_proc, module=None)
    - Module:tpe_cmd_proc (id=module:tpe_cmd_proc, module=None)
  7. Step 7: Inspected the module instance hierarchy (tpe_scheduler__R10_C10)
    {"module": {"name": "tpe_scheduler__R10_C10", "orig_name": "tpe_scheduler", "level": 2, "is_top": false, "node_type": "Module", "id": "module:tpe_scheduler__R10_C10"}, "instances": []}
  8. Step 8: Searched the design graph (dim_n)
    - Port:dim_n (id=port:matrix_engine__R10_C10_M100.dim_n, module=matrix_engine__R10_C10_M100)
    - Port:dim_n (id=port:matrix_engine_ctrl__pi1.dim_n, module=matrix_engine_ctrl__pi1)
    - Signal:me_dim_n (id=signal:tpe_top.me_dim_n, module=tpe_top)
    - Port:me_dim_n (id=port:tpe_scheduler__R10_C10.me_dim_n, module=tpe_scheduler__R10_C10)
    - Register:stg_dim_n_q (id=register:tpe_cmd_proc.stg_dim_n_q, module=tpe_cmd_proc)
  9. Step 9: Searched the design graph (BAD_DIM)
    (no matches)
  10. Step 10: Searched the design graph (status)
    - Signal:sched_done_status (id=signal:tpe_top.sched_done_status, module=tpe_top)
    - Port:sched_done_status (id=port:tpe_cmd_proc.sched_done_status, module=tpe_cmd_proc)
    - Port:sched_done_status (id=port:tpe_debug.sched_done_status, module=tpe_debug)
    - Port:sched_done_status (id=port:tpe_scheduler__R10_C10.sched_done_status, module=tpe_scheduler__R10_C10)
    - Register:status_q (id=register:tpe_scheduler__R10_C10.status_q, module=tpe_scheduler__R10_C10)
    - Signal:status_word (id=signal:tpe_cmd_proc.st
  11. Step 11: Searched the design graph (decode)
    (no matches)
  12. Step 12: Traced the signal's driver (status_q)
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_680 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_682 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_684 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_sche
Attempt 2 of 2 Approved
Investigation plan
  1. Searched the design spec for expected behavior (MATMUL command dim_n COLS validation)
  2. Searched the design spec for expected behavior (STAT_BAD_DIM error condition)
  3. Searched the design graph (STAT_BAD_DIM)
  4. Searched the design graph (CMD_MATMUL)
  5. Searched the design graph (scheduler)
  6. Searched the design graph (cmd_proc)
  7. Inspected the module instance hierarchy (tpe_scheduler__R10_C10)
  8. Searched the design graph (dim_n)
  9. Searched the design graph (BAD_DIM)
  10. Searched the design graph (status)
  11. Searched the design graph (decode)
  12. Traced the signal's driver (status_q)
  13. Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
  14. Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
  15. Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
  16. Searched the design spec for expected behavior (MATMUL dimension constraints)
  17. Searched the design spec for expected behavior (dim_n dim_k ROWS COLS)
  18. Searched the design spec for expected behavior (matrix engine dimensions)
  19. Searched the design graph (matrix_engine)
Hypothesis / root causertl/scheduler/tpe_scheduler.sv:95
Confidence
91%

The MATMUL dimension check in tpe_scheduler.sv used an inconsistent comparison for dim_n vs dim_k: dim_k is validated with '<=' (allowing dim_k == ROWS) while dim_n was validated with strict '<' (disallowing dim_n == COLS). The failing test issues a MATMUL with dim_n == COLS (16), which is a legal full-width matmul, but dim_n < COLS evaluates false, causing dim_ok_for_matmul to be false and status_q to be set to STAT_BAD_DIM instead of STAT_OK. Changing the dim_n comparison to '<=' makes the boundary condition consistent with dim_k and allows dim_n == COLS, matching the expected STAT_OK behavior for a full-width matmul.

Retrieved evidence (19 steps)
  1. Step 1: Searched the design spec for expected behavior (MATMUL command dim_n COLS validation)
    (no spec sections matched 'MATMUL command dim_n COLS validation')
  2. Step 2: Searched the design spec for expected behavior (STAT_BAD_DIM error condition)
    (no spec sections matched 'STAT_BAD_DIM error condition')
  3. Step 3: Searched the design graph (STAT_BAD_DIM)
    (no matches)
  4. Step 4: Searched the design graph (CMD_MATMUL)
    (no matches)
  5. Step 5: Searched the design graph (scheduler)
    - Instance:u_scheduler (id=instance:tpe_top.u_scheduler, module=None)
    - Module:tpe_scheduler__R10_C10 (id=module:tpe_scheduler__R10_C10, module=None)
  6. Step 6: Searched the design graph (cmd_proc)
    - Instance:u_cmd_proc (id=instance:tpe_top.u_cmd_proc, module=None)
    - Module:tpe_cmd_proc (id=module:tpe_cmd_proc, module=None)
  7. Step 7: Inspected the module instance hierarchy (tpe_scheduler__R10_C10)
    {"module": {"name": "tpe_scheduler__R10_C10", "orig_name": "tpe_scheduler", "level": 2, "is_top": false, "node_type": "Module", "id": "module:tpe_scheduler__R10_C10"}, "instances": []}
  8. Step 8: Searched the design graph (dim_n)
    - Port:dim_n (id=port:matrix_engine__R10_C10_M100.dim_n, module=matrix_engine__R10_C10_M100)
    - Port:dim_n (id=port:matrix_engine_ctrl__pi1.dim_n, module=matrix_engine_ctrl__pi1)
    - Signal:me_dim_n (id=signal:tpe_top.me_dim_n, module=tpe_top)
    - Port:me_dim_n (id=port:tpe_scheduler__R10_C10.me_dim_n, module=tpe_scheduler__R10_C10)
    - Register:stg_dim_n_q (id=register:tpe_cmd_proc.stg_dim_n_q, module=tpe_cmd_proc)
  9. Step 9: Searched the design graph (BAD_DIM)
    (no matches)
  10. Step 10: Searched the design graph (status)
    - Signal:sched_done_status (id=signal:tpe_top.sched_done_status, module=tpe_top)
    - Port:sched_done_status (id=port:tpe_cmd_proc.sched_done_status, module=tpe_cmd_proc)
    - Port:sched_done_status (id=port:tpe_debug.sched_done_status, module=tpe_debug)
    - Port:sched_done_status (id=port:tpe_scheduler__R10_C10.sched_done_status, module=tpe_scheduler__R10_C10)
    - Register:status_q (id=register:tpe_scheduler__R10_C10.status_q, module=tpe_scheduler__R10_C10)
    - Signal:status_word (id=signal:tpe_cmd_proc.st
  11. Step 11: Searched the design graph (decode)
    (no matches)
  12. Step 12: Traced the signal's driver (status_q)
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_680 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_682 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_scheduler__R10_C10.assign_684 inside AlwaysBlock:always:tpe_scheduler__R10_C10.always_666 [rtl/scheduler/tpe_scheduler.sv:97:3]
    - Assignment:assignment:tpe_sche
  13. Step 13: Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
    --- rtl/scheduler/tpe_scheduler.sv (lines 77-117 of 246) ---
       77:     ST_DISPATCH_ME,
       78:     ST_WAIT_ME,
       79:     ST_COMPLETE
       80:   } state_e;
       81: 
       82:   state_e state_q, state_d;
       83: 
       84:   tpe_command_t cmd_q;
       85:   cmd_status_e status_q;
       86: 
       87:   localparam logic [1:0] RouterWeight = 2'd0;
       88:   localparam logic [1:0] RouterAct = 2'd1;
       89:   localparam logic [1:0] RouterSeed = 2'd2;
       90:   localparam logic [1:0] RouterOut = 2'd3;
       91: 
       92:   logi
  14. Step 14: Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
    --- rtl/scheduler/tpe_scheduler.sv (lines 117-180 of 246) ---
      117: 
      118:         unique case (cmd_q.opcode)
      119:           CMD_NOP, CMD_BARRIER, CMD_IRQ_TEST: status_q <= STAT_OK;
      120:           CMD_MATMUL: status_q <= dim_ok_for_matmul ? STAT_OK : STAT_BAD_DIM;
      121:           CMD_LOAD_WEIGHT, CMD_LOAD_ACT, CMD_STORE: status_q <= STAT_OK;
      122:           default: status_q <= STAT_BAD_OPCODE;
      123:         endcase
      124:       end else if (state_q == ST_WAIT_DMA && dma_done) begin
      1
  15. Step 15: Read the RTL source (rtl/scheduler/tpe_scheduler.sv)
    --- rtl/scheduler/tpe_scheduler.sv (lines 1-50 of 246) ---
        1: // Instruction Scheduler: pops commands from the Command Processor's FIFO
        2: // and dispatches them to the DMA Engine or Matrix Compute Engine, per
        3: // docs/architecture/tpe_architecture_spec.md section 3.2.
        4: //
        5: // V1 simplification (matches the roadmap's own "V2: improved scheduler"
        6: // item): this is a *sequential* dispatcher, not an out-of-order/overlapped
        7: // arbiter -- one command executes f
  16. Step 16: Searched the design spec for expected behavior (MATMUL dimension constraints)
    (no spec sections matched 'MATMUL dimension constraints')
  17. Step 17: Searched the design spec for expected behavior (dim_n dim_k ROWS COLS)
    (no spec sections matched 'dim_n dim_k ROWS COLS')
  18. Step 18: Searched the design spec for expected behavior (matrix engine dimensions)
    (no spec sections matched 'matrix engine dimensions')
  19. Step 19: Searched the design graph (matrix_engine)
    - Instance:u_matrix_engine (id=instance:tpe_top.u_matrix_engine, module=None)
    - Module:matrix_engine_ctrl__pi1 (id=module:matrix_engine_ctrl__pi1, module=None)
    - Module:matrix_engine__R10_C10_M100 (id=module:matrix_engine__R10_C10_M100, module=None)
Proposed patch
--- a/rtl/scheduler/tpe_scheduler.sv
+++ b/rtl/scheduler/tpe_scheduler.sv
@@ -92,7 +92,7 @@
   logic [1:0] router_sel_q;
   assign router_sel = router_sel_q;
 
-  wire dim_ok_for_matmul = (cmd_q.dim_k <= TILE_DIM_WIDTH'(ROWS)) && (cmd_q.dim_n < TILE_DIM_WIDTH'(COLS));
+  wire dim_ok_for_matmul = (cmd_q.dim_k <= TILE_DIM_WIDTH'(ROWS)) && (cmd_q.dim_n <= TILE_DIM_WIDTH'(COLS));
 
   always_ff @(posedge clk or negedge rst_n) begin
     if (!rst_n) begin
Answer-key check (final attempt)Correct expected bug #5 — rtl/scheduler/tpe_scheduler.sv:[84]
Rerun PASS agent-fix/top-matmul_full_width_test-eeb6e7ce
Tokens (all attempts)12,945 (~$0.0443)