This website requires JavaScript.
Explore
Help
Register
Sign In
luke
/
iverilog
mirror of
https://github.com/steveicarus/iverilog.git
Watch
1
Star
0
Fork
You've already forked iverilog
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
06077ed026
iverilog
/
ivtest
/
gold
/
macro_with_args.gold
5 lines
102 B
Plaintext
Raw
Normal View
History
Unescape
Escape
Add ivtest to the iverilog source tree By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
2022-01-15 19:18:50 +01:00
first..last first,last last..first
vvp: Handle null-bytes in the string literal VPI support The VPI API for string literals does not correctly handle the case where a null-byte ('\0') appears in the string literal. It uses strlen() to calculate the length of the literal, which will give the wrong result if there is a null-byte in the string literal. Instead of using strlen() use the stored length to fix this. In addition when formatting a string literal as a string ignore any null-bytes. The LRM is not entirely clear what should happen to null-bytes when formatting a value as a string. But the behavior of ignoring the null-bytes is consistent with the rules of SystemVerilog for converting a string literal to a SV string. This problem can occur when a string literal gets null-byte left-padded due to width of its context of its expression, but then optimization removes part of the expression and only leaves the padded string literal. E.g. ``` $display(0 ? "Yes" : "No"); ``` will be transformed into ``` $display("\000No"); ``` There is also one subtle change in behavior associated with this. The empty string ("") is supposed to be equivalent to 8'h00. So e.g. `$display(":%s:", "")` should print ": :" since the width of the empty string is 1 byte and the %s modifier prints a string with the width of the value, left-padding with spaces if necessary. The current implementation will print "::" though. This change requires to update the marco_with_args gold file. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2022-12-24 05:57:31 +01:00
(a )..(c ) (a,b,c) (c )..(a )
Add ivtest to the iverilog source tree By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
2022-01-15 19:18:50 +01:00
sumsqr(3,4) = 25
sumsqr(5,12) = 169