reconstruct_transactions
Reconstruct id-correlated AXI transactions from FSDB/VCD waveforms by matching request beats to completion beats per id, returning per-transaction latency, outstanding curves, and hang/unmatched signatures.
Instructions
Reconstruct id-correlated request/response transactions from two handshake channels: walk every clock edge, match accepted request beats to completion beats by id, and return per-transaction latency plus aggregate facts (outstanding curve incl. per-id peak, ordering, unmatched=hang signature). One generic core, not a tool per protocol. AXI READ: req=AR (req_valid=arvalid, req_ready=arready, req_id=arid), cmp=R (cmp_valid=rvalid, cmp_ready=rready, cmp_id=rid, cmp_last=rlast); AXI WRITE: req=AW (awvalid/awready/awid), cmp=B (bvalid/bready/bid, no cmp_last). Pass req_fields/cmp_fields (e.g. araddr,arlen / rresp) to capture payload per txn; pass req_len (arlen/awlen) to also check each txn's beat_count against AxLEN+1 (beat_count_mismatch). Out-of-order completion across ids is supported (per-id FIFO); reorder_count is an informational FACT (legal in AXI), latency is a distribution not an 'outlier' verdict. Reads waveforms only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge | No | Clock edge to sample on. Default posedge. | posedge |
| clock | Yes | Shared 1-bit clock full path (e.g. AXI aclk). | |
| reset | No | Optional reset signal; while asserted, in-flight transactions are cleared so a txn straddling reset is not reported as a phantom hang. | |
| cmp_id | No | Completion id bus (e.g. rid/bid). Optional; see req_id (omit both for in-order FIFO pairing). | |
| req_id | No | Request id bus (e.g. arid/awid). Optional: omit both req_id and cmp_id for an unindexed in-order stream (AXI-Lite, APB) — txns pair in FIFO order and report id=null. | |
| req_len | No | Optional AxLEN bus (arlen/awlen). Each txn's observed beat_count is compared to req_len+1; a mismatch (early/late LAST, dropped/extra beat) is a real burst-length violation, surfaced per-txn (beat_count vs expected_beats) and as beat_count_mismatch_count. x/z len → no check. | |
| cmp_last | No | Optional last-beat signal (e.g. rlast). With it, a multi-beat burst completes one txn on last; without it every completion beat is a txn (e.g. AXI B channel). | |
| cmp_ready | Yes | Completion channel ready (e.g. rready/bready). | |
| cmp_valid | Yes | Completion channel valid (e.g. rvalid/bvalid). | |
| data_last | No | AXI WRITE only: W-channel last (wlast); marks the end of a write burst's data. | |
| req_ready | Yes | Request channel ready (e.g. arready/awready). | |
| req_valid | Yes | Request channel valid (e.g. arvalid/awvalid). | |
| wave_path | Yes | Waveform (FSDB or VCD). | |
| cmp_fields | No | Optional completion payload signals to capture per txn (e.g. rresp, bresp). | |
| data_ready | No | AXI WRITE only: W-channel ready (wready). | |
| data_valid | No | AXI WRITE only: W-channel valid (wvalid). The W channel carries no id; beats attach in order to the oldest data-incomplete request. Needs data_ready too. | |
| req_fields | No | Optional request payload signals to capture per txn (e.g. araddr, arlen, arsize, arburst). | |
| active_high | No | valid/ready/last polarity. Default true. | |
| cursor_name | No | Optional explicit cursor name. | |
| cursor_note | No | Optional cursor note. | |
| data_fields | No | AXI WRITE only: W-channel payload to capture per beat (e.g. wdata, wstrb). | |
| end_time_ps | No | Window end. -1 = end of trace. | |
| capture_beats | No | Include per-beat data (data_beats[]) on each txn. Default false (only beat_count). Enable for data-integrity debugging; can be large. | |
| start_time_ps | No | Window start (ps int, '@cursor', or unit literal). Default 0. | |
| timeout_cycles | No | Optional: count completed txns with latency above this many cycles (slow_count fact). | |
| max_transactions | No | Max txn records returned (default 256); counts/stats are over ALL. Sets transactions_truncated when exceeded. | |
| reset_active_low | No | reset is active-low (rst_n). Default true. |