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

Delete non-deterministic outputs from VerilatorCompile actions #383

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

UebelAndre
Copy link
Contributor

This change introduces a means to avoid non-deterministic outputs from VerilatorCompile actions by adding a process wrapper that deletes unwanted files after verilator runs.

Currently the only file deleted is {prefix}__verFiles.dat which contains timings for each file generated. This information is not used any downstream actions for the rule so is assumed to be generally unused.

This change provides backward compatibility through the --@rules_hdl//verilator/settings:avoid_nondeterministic_outputs flag which users can set to false to disable this new behavior.

@QuantamHD
Copy link
Collaborator

/gcbrun

@QuantamHD
Copy link
Collaborator

So this is caused by the use of declare_directory. Is it possible to explicitly declare all the outputs from a verilator compile action?

@UebelAndre
Copy link
Contributor Author

So this is caused by the use of declare_directory. Is it possible to explicitly declare all the outputs from a verilator compile action?

It is but I don’t have confidence in the names of the outputs. I had looked a while back and understood the file names to be something you couldn’t predict with Bazel and I feel this is also supported by the existence of the copy action for secs and headers. I would love to declare files and delete the extra action if possible but I don’t think it is.

@QuantamHD QuantamHD merged commit 74ab54c into hdl:main Feb 26, 2025
4 checks passed
@QuantamHD
Copy link
Collaborator

Sounds good.

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