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

add reflection adjacent capability to model output #5002

Open
ct-clmsn opened this issue Mar 19, 2024 · 6 comments
Open

add reflection adjacent capability to model output #5002

ct-clmsn opened this issue Mar 19, 2024 · 6 comments

Comments

@ct-clmsn
Copy link
Contributor

In order to provide integration with simulation platforms, provide a generic mechanism to get access to I/O port data.

@ct-clmsn
Copy link
Contributor Author

ct-clmsn commented Mar 19, 2024

proposed feature implementation submitted in PR #5003

@wsnyder
Copy link
Member

wsnyder commented Mar 19, 2024

I don't understand - why is this needed versus using the VPI?

@ct-clmsn
Copy link
Contributor Author

I have a use case where code generated by Verilator is used in a simulator with a plugin system. The verilator code is baked into a plugin. The plugin interface needs to access the verilator generated code's I/O member variables in an opaque manner. Read/write access to verilator's I/O ports is important and this feature allows that access along with providing additional type information that the plugin wrapper needs to make runtime decisions.

@wsnyder
Copy link
Member

wsnyder commented Mar 20, 2024

And how is what you describe not provided by the VPI?

@ct-clmsn
Copy link
Contributor Author

ct-clmsn commented Mar 20, 2024

This approach provides direct access to the I/O port pointers in VTop without walking through the VPI layer. It uses the compilation process for VTop to precompute information about the I/O ports and places that information into the VTop class so there's less VPI runtime overhead. Consider this as convenience functionality to VTop, and along with that, a different mechanism for accessing I/O port information.

@wsnyder
Copy link
Member

wsnyder commented Mar 20, 2024

It's a different mechanism that adds significant maintenance costs which I'm reluctant to add as most users won't need this. Can you overload more onto the vpi - perhaps something that uses the VPI discovery but has a verilator-specific function to return the raw Verilator data pointer? Then the cost to support is much more acceptable.

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

No branches or pull requests

2 participants