Transpose/Test: Add support for compact transposition output matrices and a working verilator flow - #161
Open
da-gazzi wants to merge 3 commits into
Open
Transpose/Test: Add support for compact transposition output matrices and a working verilator flow#161da-gazzi wants to merge 3 commits into
da-gazzi wants to merge 3 commits into
Conversation
da-gazzi
requested review from
DanielKellerM,
micprog and
thommythomaso
as code owners
July 27, 2026 08:30
da-gazzi
force-pushed
the
pr/compact-transpose
branch
2 times, most recently
from
July 31, 2026 08:34
fea5d2c to
7463915
Compare
added 3 commits
July 31, 2026 17:03
- `compute_cfg` register is added after existing registers - Controls `enable`, `op`, `mode`, `tensor_m` and `tensor_n` - Connected to the relevant fields of the ND request struct in the register top-level template - Add required additional frontend IDs to CI deploy job
- Transpose-enabled iDMA would previously always read tile-sized chunks, leading to "overreads" (reading past the source matrix's backing memory) - Also, the transposed output had its row alignment padded to the tile width (which is the bus data width) - The `idma_transpose_req_replay` module prevents over-reading (and over-writing, although those writes are zero-strobed) by redirecting redundant reads and writes to known safe addresses, specifically src/dst addresses of the first read/write bursts - Compact output matrix storage is achieved by changing the destination stride in the transpose midend to the actual row width of the transposed matrix - Compact output mode is controlled by a new field `compact` in `transpose_options_t`, which is also configurable by the register frontend
- Replace the legacy Verilator elaboration target with reusable build, run, clean, per-testbench, and full-suite targets - Generate stable Bender file lists and track RTL, headers, DPI sources, and elaboration parameters so binaries rebuild only when their inputs change. - Add configurable tracing and C/C++ compiler and linker flags - Register the directed transpose, ND midend, register frontend, and runtime midend test matrices across relevant widths and operating modes - Extend transpose tests to cover compact and padded layouts, partial tiles, back-to-back requests, backpressure, and multiple bus widths - Use clocking blocks for race-free ready/valid stimulus and sampling in the clocked directed testbenches - Make the transpose DPI model link cleanly when Verilator compiles it as C++
da-gazzi
force-pushed
the
pr/compact-transpose
branch
from
July 31, 2026 15:16
7463915 to
0d318c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compact Transposition and Verilator Testing
Summary
the existing tile-padded layout.
ordering of generated tile requests.
transpose and midend regression coverage.
Compact Transposition
compacttranspose option to the request andregister interfaces.
transposed row width. Legacy mode continues to use the tile-padded width.
partial edge tiles are redirected to the first valid source or destination
address, preventing out-of-bounds reads and unsafe zero-strobe write
addresses while preserving the descriptor sequence expected by the
transpose engine.
documentation.
Testbench Changes
matrices, 1-, 2-, and 4-byte elements, multiple bus widths, backpressure,
and back-to-back transfers.
generated write-address bounds.
ND, runtime, and register frontend midends.
handshake observation.
Verilator Flow
directories for each testbench parametrization.
and elaboration options so binaries rebuild when their inputs change.
targets, clean targets, optional FST tracing, and configurable compiler and
linker flags.
Verilator.
Validation
on-the-fly transpose variants, and affected midend tests pass with the new
Verilator flow.
TODO