Skip to content

Fix/aved image build and reuse - #490

Open
tinebp wants to merge 3 commits into
masterfrom
fix/aved-image-build-and-reuse
Open

tinebp wants to merge 3 commits into
masterfrom
fix/aved-image-build-and-reuse

Conversation

@tinebp

@tinebp tinebp commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Impact and evidence

See docs/review/code-review-policy.md.

Impact class: R?

Contracts touched: none

evidence status detail
functional tests (simx / rtlsim / xrt) run / not run
model_parity run / not run / n/a case names; cycle gap
perf_gate run / not run / n/a baseline regenerated with --update-baselines?
Beacon logic_gate run / not run / n/a DUTs; deeper units and why
synthesis (fpga_gate / asic_gate) run / not run / n/a
XLEN 64 build run / not run

A not run is not a pass. Say why it was not run.

  • No test silenced (known_issue:, wider tolerance, smaller args, removed case) without a root-cause plan.
  • Golden data changed only through its update command, named in the commit message.
  • Cycle-moving RTL changes carry the matching SimX change, or the parity case that shows none moved.
  • A toolchain pin moves only after the prebuilt tag exists.

tinebp and others added 3 commits November 19, 2026 03:32
Every V80 (aved) image build from master stops before synthesis:

  check_axil_blocks: parsed no offsets -- the decoder shape changed

check_axil_blocks.py read the CP regfile's is_decoded() as text and
collected the offsets it listed literally. #425 rewrote the decoder for
Fmax as whole windows (in_global() covers 0x000-0x03F, decode_queue()
each 64-byte queue slot), so there are no literals left to find, and the
check has failed every image build since. The property it guards still
matters: the V80 shell resolves AXI-Lite in 16-byte blocks and DECERRs
every word of a partly decoded one.

The property is now checked on the elaborated RTL instead of its text.
The regfile's Verilator unit test gains a 12th scenario that reads and
writes every word of the 4 KB CP window and fails on any aligned block
(of --axil-block-bytes, default 16) that answers OKAY on some words and
DECERR on others. check-axil-blocks runs that test with the card's
axil_block_bytes, so it keeps working whatever shape the decoder takes.
The text parser is removed.

Checked: the test passes at 16 and 32 bytes and rejects a size that is
not a power of two; with one word (0x03C) removed from is_decoded() it
fails with "read block 0x030: 3 of 4 words decoded"; check-axil-blocks
passes through the aved flow and is still skipped by xrt, whose cards
declare no block size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #443 asks to program the V80 once and run many applications
without reconfiguring the FPGA each time. Every vrt::Device open with
program=true wrote the design again.

XRT solves this below the application driver: the Vortex xrt driver
calls load_xclbin() on every open and has no logic of its own, while
the xocl kernel driver remembers the UUID of the xclbin it downloaded
and skips a download of the same one. The V80's equivalent of xocl is
SLASH's vrtd, through which every design write goes, so the fix lives
there (SLASH branch feature/vrtd-design-uuid): slashkit stamps a UUID
into the vbin, vrtd remembers the UUID it wrote and skips a write of
the same one, VRT_FORCE_PROGRAM=1 overrides (xrt.ini's
force_program_xclbin), `v80-smi forget-design` reports a design loaded
over JTAG, and a design another client uses cannot be replaced (xocl's
bitstream lock).

The aved driver therefore keeps opening with program=true and nothing
else. In this repository:
- jtag_load_vortex.sh runs `v80-smi forget-design` after a load, since
  vrtd cannot see a design loaded over JTAG, and stops with a message if
  vrtd cannot be told.
- The design document, the SLASH setup guide and the changelog describe
  the behaviour and what it means for this driver: a skipped write
  keeps the design's state, which the CP park and device reset on every
  open already handle; a reused kernel that does not answer is not
  written over.
- park_clock() no longer dereferences an empty device handle when the
  open itself failed.

Fixes #443

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client libraries' ABI changed with the design UUID while their
SONAMEs did not, so a runtime linked against an earlier SLASH loads and
runs with mismatched structures. Say so where the reuse is described.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant