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

Use more f-strings for formatting strings #747

Merged
merged 8 commits into from
Oct 8, 2021
Merged

Conversation

umarcor
Copy link
Member

@umarcor umarcor commented Sep 28, 2021

This PR complements #743. The remaining f-string related pylint issues are fixed. However, I could not test these, because I don't have access to all those simulators. Therefore, I would be grateful if other users could test this branch and report any issue.

@eine eine added this to the v4.6.0 milestone Sep 28, 2021
@umarcor
Copy link
Member Author

umarcor commented Sep 29, 2021

FTR, @NanooooK confirmed that acceptance tests are passing with ModelSim. Two of the examples are failing for legit reasons, unrelated to this PR.

@NanooooK
Copy link

NanooooK commented Sep 29, 2021

I apologize but I didn't run the tests correctly (wrong branch). I need to re-run them.

Now I got the following

=========================================================================================== 48 failed, 1 passed, 1 skipped in 4387.88s (1:13:07) ===========================================================================================

@LarsAsplund
Copy link
Collaborator

@umarcor Riviera-PRO works with exception of the array_axis_vcs example. The reason is the PSL included. This is a known exception but maybe we should exclude this test unless the simulator is GHDL. Alternatively, we can remove the PSL since it's not essential for show casing VUnit.

@LarsAsplund
Copy link
Collaborator

@umarcor Active-HDL has the same result as Riviera-PRO.

@NanooooK
Copy link

@umarcor For me with ModelSim using tox -e py39-acceptance-modelsim , most of tests fail because of the following:

# ** Warning: (vsim-3351) Invalid value "{s_value!s}" for generic "runner_cfg".  Not using this value.
# ** Fatal: (vsim-3350) Generic "runner_cfg" has not been given a value.

or

#             0 ps - runner               -    INFO - Test case: Test that pass
#             0 ps - runner               -    INFO - Test case: Test that stops the simulation on first error
# ERROR - Error message

@umarcor
Copy link
Member Author

umarcor commented Oct 1, 2021

@NanooooK, can you please run the acceptance tests again?

@umarcor
Copy link
Member Author

umarcor commented Oct 1, 2021

@umarcor Riviera-PRO works with exception of the array_axis_vcs example. The reason is the PSL included. This is a known exception but maybe we should exclude this test unless the simulator is GHDL. Alternatively, we can remove the PSL since it's not essential for show casing VUnit.

@LarsAsplund this was a conscious decision. The used syntax is valid VHDL 2008, so it should be supported by simulators which are compliant. However, there are some simulators which don't support the syntax, but we don't know certainly which. Also, we don't know if the feature is missing because of the license tier. Therefore, having this test work in CI but fail when running acceptance tests with other simulators is made to raise awareness of the capabilities that VHDL 2008 (PSL) provides and which we are not using in the community.

Nonetheless, I agree that it can be painful, and from VUnit's perspective it might not be desirable that new users find this error and they are forced to understand the motivation. I am OK with disabling it for simulators other than GHDL, but I would like have some accurate handling of the case. For instance, we can mark it as xfail for simulators other than GHDL. That will attempt to run it, but will not consider it a failure in the summary (so acceptance-tests will be green). Moreover, we can convert the block to a conditional generate controlled by a generic, which we set from run.py. Some simulators might be able to parse the source, even though they cannot handle the block. Other simulators will probably choke on parsing.

Therefore, if you are ok, I will mark it as XFAIL when simulators other than GHDL are used, and I will open an issue for tracking an improvement of the reasons for each sim.

@NanooooK
Copy link

NanooooK commented Oct 1, 2021

@NanooooK, can you please run the acceptance tests again?

Two tests failed but as you said they are out of scope for this PR (verilog_ams, and the assert in the axis_vcs_example)

@LarsAsplund
Copy link
Collaborator

@NanooooK I think that verilog_ams requires a good enough license. What ModelSim are you using?

Copy link
Collaborator

@LarsAsplund LarsAsplund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed all the files now.

@NanooooK
Copy link

NanooooK commented Oct 2, 2021

@LarsAsplund I am using ModelSim DE.

The error for AMS test is the following: ** Error (suppressible): (vlog-1902) Option "-ams" is either unknown, requires an argument, or was given with a bad argument.

@LarsAsplund
Copy link
Collaborator

@NanooooK Yeah, it might not be sufficient for AMS. Siemens has Questa-ADMS which might be the only product supporting this.

@eine eine merged commit 37bc89c into VUnit:master Oct 8, 2021
@umarcor umarcor deleted the fstrings branch October 8, 2021 13:07
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.

None yet

4 participants