-
Notifications
You must be signed in to change notification settings - Fork 146
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 tests for iverilog v11 (SFT deprecated warning) #560
Conversation
82ff160
to
8ea798b
Compare
9bc7717
to
27ce19a
Compare
On lines 158 and 170, there's a non-breaking space (NBSP) character (ASCII 0xA0) instead of an ordinary space (0x20) between the
In my emacs, it shows up as a red underscore. Displaying it with When the character is there, it causes the following shell errors:
|
Interesting. Thanks for the comment, that would have been hard to find. Especially since my shell seems unaffected by it. The latest commit should fix that. After that I'll reintroduce the version check and add the -L option for newer IVerilog. Hopefully without rogue whitespaces 😄 |
In IVerilog v11+, system function types (sft) are taken directly from the VPI files. Previously, a separate .sft file had to be generated. The -L flag allows linking the VPI files as a library for type checking.
This commit series should now fix the issue and give IVerilog the VPI files instead of SFT while preserving support for 10.x @quark17 Since the tests are passing on main, are there test changes/additions that should be made in order to show that the issue is solved? I'm thinking of suppressed warnings that can be re-enabled or something. |
8ecf1b6
to
61e1686
Compare
Ok, it seems that the version check doesn't work, i.e. the returned version string on ubuntu 20.04 looks entirely different from the current one. At this point, I don't have access to an IVerilog 10.3 package, so I cannot determine the necessary matching pattern to detect version 10.x. I'll try setting up a VM |
The Ubuntu release does not contain the VERSION_TAG, ergo we have to rely on the 10.x VERSION info
Getting an Ubuntu 20.04 VM running was easier than I thought. Apparently, the Ubuntu release does not contain the v10_x tag, so we can't rely on it. Replaced it with the Version 10.x |
In the testsuite (in
and then extracting the first group of non-space characters following
This could be of form
Although I do see one place in
(Also, I'm a bit concerned that the Tcl is using I wonder if your grep should be checking for the whole pattern,
If we want to add a test, it could probably be done in
There are test procedures like |
Errors are now piped to /dev/null and the whole version prefix is tested for since the prefix shouldn't change.
The great restriction for version checking is that As for tests, I found that the warning is suppressed in While at it, I also changed the 10.1 check to your suggested syntax using numerical comparison instead of string comparison. There are also workarounds for VPI issues in |
@quark17 I'm happy with these commits. Is there anything you'd like to see before merging? |
Potentially, 10.10+ would also be considered exempt, eventhough only 10.1 is affected, due to how numerical comparisons work
@quark17 I've implemented your suggestion. I can only check that nothing else breaks, as can the CI since Ubuntu 18.04 was dropped. |
Thank you for your patience! Looks good, I'll merge. Also, sorry that I forgot about your other issue asking about v12 failures and the testsuite. I'll look at that and respond now. Thank you again! |
Your guidance throughout this PR is also much appreciated. I'm glad I could be helpful! |
In IVerilog v11+, the use of sft files is deprecated and creates a warning. This warning leads to failing test cases, though behaviour is unchanged.
This PR is based on https://steveicarus.github.io/iverilog/usage/vpi.html and replaces the sft file creation with the -L option to pass the vpi files. The design works for IVerilog v11 and v12.
In addition, a version check is introduced that applies the old behaviour if the version is 10.x. I wasn't able to test with IVerilog v10.x as my distro doesn't provide this version for some time. So that's left for the CI to check.
Fixes #344