Skip to content

docs: add DataPortInterface usage example #192 - #301

Closed
AzazelSensei wants to merge 2 commits into
intel:mainfrom
AzazelSensei:docs-dataport-interface-example-192
Closed

AzazelSensei wants to merge 2 commits into
intel:mainfrom
AzazelSensei:docs-dataport-interface-example-192

Conversation

@AzazelSensei

Copy link
Copy Markdown

Description & Motivation

The generated class page for DataPortInterface did not show how to wire it. I added a short dartdoc example that constructs read/write ports, passes them to RegisterFile, and drives en/addr/data.

Related Issue(s)

Fixes #192

Testing

Snippet matches the simple write path in test/memory/memory_test.dart. Docs-only, no behavior change.

Backwards-compatibility

No.

Documentation

Yes — class dartdoc on DataPortInterface, which is what https://intel.github.io/rohd-hcl/rohd_hcl/DataPortInterface-class.html is built from.

Show constructing read/write ports and driving en/addr/data on a RegisterFile.

@mkorbel1 mkorbel1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for contributing!

/// [DataPortGroup]. Drive [en], [addr], and [data] on a write port. Drive [en]
/// and [addr] on a read port; [data] is returned by the memory.
///
/// ```dart

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This example is good for a testbench, but not for real hardware. I think it's worth including (additionally at least) an example of using the interface in a hardware context (not just .puts from a testbench). Some people may be encountering ROHD Interfaces one of the first times with these memory components.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Added a hardware example that drives the ports with <=, and left the .put snippet as a testbench example.

Show driving ports with <= in hardware, keep .put as a testbench example.
@desmonddak desmonddak mentioned this pull request Nov 8, 2026
@desmonddak

Copy link
Copy Markdown
Contributor

Superceded by #316

@desmonddak desmonddak closed this Nov 8, 2026
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.

[Documentation] Add Usage examples to online github docs

3 participants