Skip to content

AXI4 VIP development and integration#688

Open
tchilikov-semify wants to merge 22 commits into
lowRISC:mainfrom
tchilikov-semify:axi_driver_pr_new
Open

AXI4 VIP development and integration#688
tchilikov-semify wants to merge 22 commits into
lowRISC:mainfrom
tchilikov-semify:axi_driver_pr_new

Conversation

@tchilikov-semify

@tchilikov-semify tchilikov-semify commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

This PR does a few things:

  1. Pulls @rswarbrick's AXI driver from his Caliptra repository as a local copy and expands on its functionality with multi-beat support
  2. Merges it with Csaba's AXI monitor from Axi4 passive vip #391, creating one unified agent for Active (manager) and Passive (monitor) modes
  3. Applies various bug and compilation fixes to the agent
  4. Integrates the agent in the top TB as a monitor on each port of the crossbar
  5. creates an environment level scoreboard

This was tested with the top level CVA6-based test cases.

Will close issue #168

@rswarbrick rswarbrick left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for doing this (and getting my completely untested code working...)

Do you think you could cherry-pick the various fixes in "axi agent compilation fixes" to the commits that made the mistakes? Since we don't use squash merge in Mocha, this is a way to avoid putting Rupert's silly mistakes into the history :-)

@tchilikov-semify

Copy link
Copy Markdown
Collaborator Author

Thank you very much for doing this (and getting my completely untested code working...)

Do you think you could cherry-pick the various fixes in "axi agent compilation fixes" to the commits that made the mistakes? Since we don't use squash merge in Mocha, this is a way to avoid putting Rupert's silly mistakes into the history :-)

Hey Rupert,

Sure, I can merge the patches into your commits. This would also encompass the handshaking bugfix commit, for a total of two commits :)

rswarbrick and others added 8 commits July 22, 2026 14:40
This is the first step towards a simple AXI agent. It will only have
to handle the subset of AXI that is in use in the blocks in
question (which work by translating to TLUL, so they aren't doing
anything particularly exciting).

In this commit, we're just defining interfaces for the five
channels (which are AW, W, B, AR and R).

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
The axi_read_request_item and axi_read_data_item classes are intended
to be randomised (when a sequence wishes to send either read requests
or data responses). The axi_read_item class can be used by a monitor
that sees a read request and then one or more responses.

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
When the agent is representing an AXI Manager, this will be useful for
the B and R channels.

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
These drive write requests (AW) and write data (W) and also drive the
write response channel (B).

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
For an example use-case, suppose you are reading with AR / R
transfers. You send an AR transfer with some ARID that will have a
burst with k beats. Now you want consume read data with that many (k)
R transfers using the some ID.

To do so:

  - Run k axi_mgr_read_data_seq sequences, calling on_response() after
    each finishes.

  - (In parallel) call wait_for_response() k times.

The trick is that these sequences might respond with different IDs,
but that doesn't matter: the sequences are just actings as tokens to
allow *something* to come back.
Comment thread hw/ip/dv/axi_agent/axi_mgr_read_data_driver.svh Outdated
Comment thread hw/ip/dv/axi_agent/axi_mgr_read_data_driver.svh Outdated
Comment thread hw/ip/dv/axi_agent/axi_mgr_read_data_driver.svh Outdated
Comment thread hw/ip/dv/axi_agent/axi_mgr_write_response_driver.svh Outdated
Comment thread hw/ip/dv/axi_agent/seq_lib/axi_mgr_read_burst_vseq.svh Outdated
extern function new(string name = "axi_agent_cfg");

// Set the identity/policy/width fields in one call. The interfaces are set separately by the BFM.
extern function void set_config(string inst_id = "axi_mgr",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not a fan of big lines of arguments with default values. As I wrote above, I think you only need to set is_active and enable_coverage. I'd suggest forcing the caller to pass both.

Comment thread hw/ip/dv/axi_agent/axi_mgr_agent.svh Outdated
Comment thread hw/ip/dv/axi_agent/axi_mgr_agent.svh Outdated
super.build_phase(phase);

if (m_cfg == null && !uvm_config_db#(axi_agent_cfg)::get(this, "", "cfg", m_cfg)) begin
if (m_cfg == null && !uvm_config_db#(axi_agent_cfg)::get(this, "", "axi_agent_cfg", m_cfg)) begin

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh: I'm not a fan of this. You'll end up with a path that looks like "my_env.m_axi_agent.axi_agent_cfg". What's wrong with "my_env.m_axi_agent.cfg"?

Comment on lines +5 to +7
// Merged-transaction item from axi_monitor: holds a whole write (AW + W beats +
// B) or a whole read (AR + R beats); obs_kind says which. Per-beat W/R payloads
// are queues. Field widths mirror the per-channel axi_*_if max footprint.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a huge fan of this: it feels extremely "untyped": the way one has to encode sum types in C++...

I'd much rather have several different types, maybe

  • axi_mon_write (AW + a queue of W x B pairs)
  • axi_mon_read (AR + a queue of R items)

Would something like that work? I think it might be more pleasant for whatever lies "downstream".

@tchilikov-semify

Copy link
Copy Markdown
Collaborator Author

Hey @rswarbrick,
Thanks a lot for the in-depth review! I'll go through all of the comments and address them.

In the meanwhile, I've folded the old compilation bugfixes commit into the respective commits that you made, so the commit history should be clear of bugs now.

@tchilikov-semify
tchilikov-semify force-pushed the axi_driver_pr_new branch 4 times, most recently from 8f7d14d to 42c6a8d Compare July 22, 2026 15:09
rswarbrick and others added 5 commits July 22, 2026 16:23
This is a bare-bones agent for the five AXI interfaces. Note that
there are no monitors, so the agent won't actually do anything in
passive mode (yet).

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
To make it easier to "write address 123", there is an easy way to
constrain the (single) sequence item in the sequence.

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
The general sequence is axi_mgr_write_data_seq, but there is also a
specialisation that sends exactly one transfer. This makes it easier
to randomise a degenerate, length-one burst.

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
rswarbrick and others added 9 commits July 22, 2026 16:23
Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
To do so, we add a (pretty trivial) reg_adapter and a sequencer in a
layered vseq that runs the resulting translated items.

Co-authored-by: tchilikov-semify <christian.tchilikov@semify-eda.com>
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.

2 participants