Implement AXI-Stream UVM agent - #1
Open
allRisc wants to merge 1 commit into
Open
Conversation
Build out the previously-empty axi_stream_agent submodule into a full UVM agent, mirroring the structure and design decisions of the sibling APB and AHB agents. Agent - Two operating modes selected via axi_st_agent_config.agent_mode: AXI_ST_TRANSMITTER_AGENT drives TVALID and the transfer payload from a sequence; AXI_ST_RECEIVER_AGENT drives TREADY, applying reactive backpressure. Mirrors the APB requester/completer split. - One transaction models a single stream transfer (beat), carrying data/strb/keep/last/id/dest/user plus per-transfer tvalid_delay (idle insertion) and tready_delay (backpressure) knobs. - Optional sidebands TID/TDEST/TUSER default to width 0 and are guarded by (W==0)?1:W localparams so zero-width vectors never occur (same technique the AHB agent uses for HMASTER_WIDTH). Components - axi_st_vip_if interface with drv_tx_cb / drv_rx_cb / mon_cb clocking blocks and matching modports, driven off aclk / areset_n. - Driver implements complementary transmitter and receiver run phases over the handshake, honouring the idle/backpressure delays. - Monitor emits one transaction per completed TVALID && TREADY handshake and forwards offered transfers to reactive receiver sequences via req_ap. - Sequencer, coverage collector, and agent wire-up follow the APB layout. - Reactive receiver sequences: base reactive, no-backpressure, and randomized backpressure (parallels APB's reactive/no-wait/wait sequences). Parameter checking - axi_st_agent.check_params enforces TDATA width as a positive multiple of 8 and warns on TID > 8 / TDEST > 4 per the AXI-Stream recommendations. Example / tooling - Self-contained example testbench (env, transmitter sequence, reactive receiver, top module) plus filelists, proj.toml, Natural Docs config, and the GitHub Pages workflow, matching the other agents. Naming / license - Repo-level identifiers keep the full axi_stream form (package axi_stream_agent_pkg, axi_stream_agent.f); all internal types, classes, macros, and the interface use the axi_st_ / AXI_ST_ abbreviation. - All source files carry the MIT header matching this repo's LICENSE. Correctness notes (deliberate improvements over the APB reference) - The strb_keep_c constraint (TSTRB may only assert where TKEEP asserts) is guarded to transmitter-generated stimulus so a reactive randomize() cannot fail on monitor-sampled values. - The coverage covergroup is constructed in the collector's constructor. - The monitor's request latch clears whenever TVALID is idle, so a withdrawn offer cannot deadlock reactive receiver sequences. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Build out the previously-empty axi_stream_agent submodule into a full UVM agent, mirroring the structure and design decisions of the sibling APB and AHB agents.
Agent
Components
Parameter checking
Example / tooling
Naming / license
Correctness notes (deliberate improvements over the APB reference)