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 support for vvp extended arguments #653

Open
Barabas5532 opened this issue Oct 24, 2023 · 2 comments
Open

Add support for vvp extended arguments #653

Barabas5532 opened this issue Oct 24, 2023 · 2 comments

Comments

@Barabas5532
Copy link

https://man.archlinux.org/man/vvp.1.en#EXTENDED_ARGUMENTS

VVP supports "extended arguments", which can be used to pass runtime information such as plusargs to the simulation. Looks like it is not currently possible to pass these in using fusesoc (https://fusesoc.readthedocs.io/en/stable/ref/capi2.html#icarus).

The extended arguments come after the inputfile in the command line, but the vvp_options from the fusesoc core file seem to come before the input file.

Is this something that fusesoc should support? I'm open to contribute this feature if it is desired.

@olofk
Copy link
Owner

olofk commented Nov 17, 2023

All simulation backends support plusargs, but they are specified in the parameters section instead so that they can be used for any simulator. Here is an example of how to define a plusarg and how to enable it in a target

As for other extended arguments, such as -vcd or -lxt, those are support through the vvp_options key. But! I just realized now that there is something wrong with the Edalize documentation and it is not getting updated automatically and the online version is very old by now. Will need to fix that.

@Barabas5532
Copy link
Author

vvp_options doesn't seem to do what you describe. Adding -vcd to it results in the following invocation of vvp: vvp -n -M. -l icarus.log -vcd spdif_rx_0.0.1 -fst. The -vcd and other extended arguments must come after the input file name, so it should be something like vvp -n -M. -l icarus.log -vcd spdif_rx_0.0.1 -vcd -fst instead.

In the source code, -vcd must be added to the EXTRA_OPTIONS part of the template, which currently only contains plusargs. I guess a new yaml field like vvp_extended_arguments must be created for this to work. It can be prepended to the plusargs.

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