Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AXI4 Interface and Functional Modeling #159

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

kimmeljo
Copy link
Contributor

Description & Motivation

AXI4 is a common protocol and thus adding a ROHD implementation for its interface and some of its behavior. The structure is very similar to what was done for APB4.

Related Issue(s)

N/A

Testing

Unit tests were created very similar to the unit tests for APB4.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

Fully backwards compatible.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

Documentation is forthcoming.

@mkorbel1 mkorbel1 self-requested a review January 29, 2025 00:19
Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

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

Looks great so far! Added some initial comments

Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

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

changes since last review look good

this.hasWrite = true,
this.rIntf,
this.wIntf,
}) : assert(
Copy link
Contributor

Choose a reason for hiding this comment

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

asserts only execute in tests and debug mode -- should these be exceptions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I guess? Can we throw exceptions in the initialization list like the assertions now? What's the syntax?

Copy link
Contributor

Choose a reason for hiding this comment

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

you can't throw exceptions there, but you can do checks within the body of the constructor and throw an exception if they fail (a little more verbose/clunky, but probably appropriate for this case)

final Axi4SystemInterface sIntf;

/// Channels that the agent can send requests on.
final List<Axi4Channel> channels;
Copy link
Contributor

Choose a reason for hiding this comment

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

The spec calls a "channel" something else?
https://developer.arm.com/documentation/102202/0300/Channel-signals

Conceptually, is there a reason why we should have a list of channels rather than just a list of read interfaces and a list of write interfaces provided to the main agent? With read and write agents created per read/write interface? That would result in collection of the corresponding sequencer, driver, and monitor on a per-interface basis without the need to keep track of a channel index across multiple independent Lists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the notion of a "channel" as I've defined it has a few implications. Essentially, for certain actions like locking we need to keep track of which "main" performed the action. This is what I use the notion of a channel for. It is also a nice logical distinction/categorization of the interfaces to understand "who" they are associated with.

That being said, sounds like we might need a new for "channel"? I just find this metadata to be useful to help reason about the system/network.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, I didn't realize that there was a relationship between a "pair" of read and write agents. Does it not make sense to still group, for example, a write sequencer, write driver, and write monitor into one "write agent", and similar for read?

final LogicValue end;

/// Secure region.
final bool isSecure;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need to do any extra testing for secure and privileged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah we absolutely do. I think there is some coverage through sheer randomness but we will want directed tests at some point.

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