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
SystemVerilog: Get current test name #307
Comments
This is not intended to work. Why would you need it? |
I want to use the same parameter inside my test class and as the name of the test case. |
Do you instantiate the test class within the TEST_CASE block? In that case we might be able to add a current_test_case which returns a string. I do not want any dynamic code in the test case definition itself since we by design want to statically know all test case names without elaborating or running Verilog code. |
Yes, I instantiate test class inside TEST_CASE block. |
Why is it good? What are advantages? |
Elaborating or running Verilog code which would be unnecessarily complexity which is always something to avoid. Maybe in your simple case a static check could suffice but in the general case it would not. It is a desirable property of a test system that all test names are known prior to executing the actual code such that listing all test cases using for example |
Modelsim allows setting parameters from do file. For example, I can define a list of tests in run.py file and pass it to testbench and to VUnit. It will be defined outside SystemVerilog code. Does it solve this problem? |
It would be good if your documentation mentions about the restriction in the naming TEST_CASE. |
I try to use string localparam in the test case name:
I got an error:
# ** Error: Found no "" test case
The text was updated successfully, but these errors were encountered: