Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vvp: Only ignore leading null-bytes when reading as string through VPI
Currently when reading a number literal through the VPI API as a vpiStringVal all null-bytes in the literal get ignored. This behavior is different from when reading a signal through the VPI API as a vpiStringVal. The latter will only ignore leading null-bytes and replace other null-bytes with a space. E.g. the following two will print different values. ``` $display("%s", "a\000b"); // -> " ab" reg [23:0] x = "a\000b"; $display("%s", x); // -> "a b" ``` For consistency modify the number literal formatting code so that it has the same behavior as the signal value formatting code and only replaces leading null-bytes. Signed-off-by: Lars-Peter Clausen <[email protected]>
- Loading branch information