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

Fix NVC version detection #927

Merged
merged 1 commit into from
Apr 19, 2023
Merged

Fix NVC version detection #927

merged 1 commit into from
Apr 19, 2023

Conversation

nickg
Copy link
Contributor

@nickg nickg commented Apr 14, 2023

I bumped the version on the master branch to 1.10-devel but the comparison here is using floating point so 1.10 >= 1.9 is false. Changed determine_version to return a (major, minor) tuple instead.

@nickg nickg force-pushed the fix-nvc-version branch 2 times, most recently from cc35e3f to e88111c Compare April 14, 2023 16:59
vunit/sim_if/nvc.py Outdated Show resolved Hide resolved
@@ -261,8 +264,7 @@ def simulate(self, output_path, test_suite_name, config, elaborate_only):

if not elaborate_only:
cmd += ["--no-save"]
if self._supports_jit:
cmd += ["--jit"]
cmd += ["--jit"]
Copy link
Member

Choose a reason for hiding this comment

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

This implies that VUnit can only work with NVC >= 1.9, and that's why you added the runtimeerror above?

Just willing to clarify, because this feels a second change on top of improving the version detection. Might be worth having two commits, even if we merge them at the same time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the examples worked with earlier releases but there were also many acceptance test failures so it seems better to specify a minimum version that we know is fully working. But I agree it's a logically separate change so I'll do it in a separate PR after this one is merged.

I bumped the version on the master branch to 1.10-devel but the
comparison here is using floating point so 1.10 >= 1.9 is false.
Changed determine_version to return a (major, minor) tuple instead.
@nickg
Copy link
Contributor Author

nickg commented Apr 19, 2023

The CI failures don't appear to be caused by this patch.

@nickg nickg requested a review from umarcor April 19, 2023 21:28
Copy link
Member

@umarcor umarcor left a comment

Choose a reason for hiding this comment

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

FTR, this PR modifies determine_version. The same function/method exists in the GHDL class, and the returned type is not consistent. Actually, GHDL uses a float while this PR is changing NVC to a tuple.
However, that is not a problem because each simulator class uses a different mechanism to detect the version, and we don't currently have a consistent API to "get the version of the tool" independently of the specific tool.

@eine eine merged commit 71090c8 into VUnit:master Apr 19, 2023
@nickg nickg deleted the fix-nvc-version branch April 20, 2023 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants