-
Notifications
You must be signed in to change notification settings - Fork 75
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
Yosys SV Support Misrepresented Due to $display #5082
Comments
Hi, thank you for the report. Let me start by saying that originally all the tests that use That being said, I'm not opposed to adjusting those tests to make then usable for tools that only run elaboration. I'm not sure if having an error output port makes sense for yosys? would we be able to read the calculated value there? One additional idea - maybe we could wrap those display/assert calls with some ifdefs (e.g. Feel free to propose a PR with a fix or a workaround for the problem. |
Yes! Yosys' eval command calculates the values of all output ports of a specified module. If we add an I just made an example repo that demonstrates this: sifferman/eval-example. I adjusted the tests mentioned above, then run synthesis and
I guess I am also concerned about false positives when the synthesis is incorrect but Yosys doesn't throw an error when parsing. Using |
I would be happy to make these changes if you think it sounds good |
Thank you for the work. You suggestions sound good, just make sure the tests are not getting much more complicated than they are now (at least in terms of readability and number of different SV constructs).
The licenses of the proprietary tool disallow using them to run in any benchmarks or comparisons so we cannot have this here. If you do wish to compare (other) tools that allow it, take a look at how the runners in the |
I just added a simulation pass to the Yosys runner in #5498, in anticipation of merge of YosysHQ/yosys#3963 in Yosys. |
The recent boost in passed tests for Yosys is due to YosysHQ/yosys#4129. By default, output from |
Hello, and thank you for assembling this very useful record of SV support in tools! It has been super interesting to follow.
Problem
There are several tests that Yosys is incorrectly failing due to using $display. Yosys does not support the
$display
statement for non-constant values:Many more tests would pass if their values were verified by other means than
$display
. To list a few:Many more tests correctly fail because the feature is unsupported, but will eventually incorrectly fail because they use
$display
. To list a few:Possible Solutions
To fix this, a custom assert macro/function should be added that would operate differently depending on the tool choice. Here are a couple possibilities for what the custom assert macro/function should do:
output ERROR
PortPossibly all the tests mentioned could have an
output ERROR
port added to the module definition, and the assert function/macro could just runERROR |= !(<assertion>);
for Yosys runs. Then,eval
could be run to check the value ofERROR
.External Script
Another possibility is that the custom assert macro/function does nothing when run by Yosys. Instead, an external script will parse all the asserts and run
eval
on each one.(Note that this will not work for the tests onebit.sv and read-write.sv because there are modifications to values after they have an assertion)
The text was updated successfully, but these errors were encountered: