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
Question: Pass/Fail criteria checked in Python Script #958
Comments
Yes, this is possible. If you read the latest blog https://vunit.github.io/blog/2023_08_26_vhdl_configurations.html you will find information about VUnit configurations which is the tool to run the same test with different generics/parameters. If you look at the documentation for add_config you will also find an option to have a post_check Python function executed after the test exits simulation. That function can compare the text files. If the function returns False, the test will fail. |
Thank you, this was very helpful. I was able to accomplish both of these tasks with ease using VUnit. Follow up question... |
What I usually do is to insert the parameter(s) in the name of the configuration. Something like: for parameter in range(30):
testbench.add_config(name=f"parameter={parameter}", generics=dict(parameter=parameter)) You can also use the The attributes for all tests can be exported with the |
What if I want to a Python Script controlling the Simulation.
For example, what if I want to compare results of two .txt files produced by TB in python and use that knowledge to determine if the testbench passed. Can I do this?
Or what if I want to use Python to control the run of the testbench. I.E. Loop through the same testbench two times with different parameters. Can I do this?
The text was updated successfully, but these errors were encountered: