forked from github/verilator
Fix $display of signed/unsigned without format (#3207).
This commit is contained in:
parent
0abc856be9
commit
2ccf49031b
1
Changes
1
Changes
@ -21,6 +21,7 @@ Verilator 4.215 devel
|
|||||||
* Improve --thread verilation-time performance.
|
* Improve --thread verilation-time performance.
|
||||||
* Fix array method names with parenthesis (#3181) (#3183). [Teng Huang]
|
* Fix array method names with parenthesis (#3181) (#3183). [Teng Huang]
|
||||||
* Fix split_var assign merging (#3177) (#3179). [Yutetsu TAKATSUKASA]
|
* Fix split_var assign merging (#3177) (#3179). [Yutetsu TAKATSUKASA]
|
||||||
|
* Fix $display of signed/unsigned without format (#3207). [Julie Schwartz]
|
||||||
* Fix nested generate if genblk naming (#3189). [yanx21]
|
* Fix nested generate if genblk naming (#3189). [yanx21]
|
||||||
* Fix display of empty string constant (#3207). [Julie Schwartz]
|
* Fix display of empty string constant (#3207). [Julie Schwartz]
|
||||||
* Fix %0 format on $value$plusargs.
|
* Fix %0 format on $value$plusargs.
|
||||||
|
@ -3916,6 +3916,8 @@ private:
|
|||||||
ch = 'g';
|
ch = 'g';
|
||||||
} else if (argp && argp->isString()) {
|
} else if (argp && argp->isString()) {
|
||||||
ch = '@';
|
ch = '@';
|
||||||
|
} else if (nodep->missingArgChar() == 'd' && argp->isSigned()) {
|
||||||
|
ch = '~';
|
||||||
} else {
|
} else {
|
||||||
ch = nodep->missingArgChar();
|
ch = nodep->missingArgChar();
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ module Vt_debug_emitv___024root;
|
|||||||
$fflush(t.fd);
|
$fflush(t.fd);
|
||||||
$fscanf(t.fd, "%d", t.sum);
|
$fscanf(t.fd, "%d", t.sum);
|
||||||
;
|
;
|
||||||
$fdisplay(32'h69203d20, "%d", t.sum);
|
$fdisplay(32'h69203d20, "%~", t.sum);
|
||||||
$fwrite(t.fd, "hello");
|
$fwrite(t.fd, "hello");
|
||||||
$readmemh(t.fd, t.array);
|
$readmemh(t.fd, t.array);
|
||||||
$readmemh(t.fd, t.array, 32'sh0);
|
$readmemh(t.fd, t.array, 32'sh0);
|
||||||
@ -161,7 +161,7 @@ module Vt_debug_emitv___024root;
|
|||||||
else begin
|
else begin
|
||||||
$display("0");
|
$display("0");
|
||||||
end
|
end
|
||||||
$display("%d%d", t._Vpast_0_0t._Vpast_1_0,
|
$display("%~%~", t._Vpast_0_0t._Vpast_1_0,
|
||||||
t._Vpast_1_0);
|
t._Vpast_1_0);
|
||||||
t.str = $sformatf("cyc=%~", t.cyc);
|
t.str = $sformatf("cyc=%~", t.cyc);
|
||||||
;
|
;
|
||||||
|
@ -51,6 +51,12 @@ o: 014 014
|
|||||||
|
|
||||||
b: 000001100 000001100
|
b: 000001100 000001100
|
||||||
|
|
||||||
|
-1431655766
|
||||||
|
-1431655766
|
||||||
|
4294967294
|
||||||
|
4294967294
|
||||||
|
2863311530
|
||||||
|
2863311530
|
||||||
[0] hello, from a very long string. Percent %s are literally substituted in.
|
[0] hello, from a very long string. Percent %s are literally substituted in.
|
||||||
hello, from a concatenated string.
|
hello, from a concatenated string.
|
||||||
hello, from a concatenated format string [0].
|
hello, from a concatenated format string [0].
|
||||||
|
@ -142,6 +142,12 @@ module t;
|
|||||||
$writeb; $displayb;
|
$writeb; $displayb;
|
||||||
$writeb("b: "); $writeb(nine); $writeb(" "); $displayb(nine);
|
$writeb("b: "); $writeb(nine); $writeb(" "); $displayb(nine);
|
||||||
$writeo; $displayo;
|
$writeo; $displayo;
|
||||||
|
$display("%d", $signed(32'haaaaaaaa)); // -1431655766
|
||||||
|
$display($signed(32'haaaaaaaa)); // -1431655766
|
||||||
|
$display("%d", $unsigned(-2)); // 4294967294
|
||||||
|
$display($unsigned(-2)); // 4294967294
|
||||||
|
$display("%d", 32'haaaaaaaa); // 2863311530
|
||||||
|
$display(32'haaaaaaaa); // 2863311530
|
||||||
|
|
||||||
$display("[%0t] %s%s%s", $time,
|
$display("[%0t] %s%s%s", $time,
|
||||||
"hel", "lo, fr", "om a very long string. Percent %s are literally substituted in.");
|
"hel", "lo, fr", "om a very long string. Percent %s are literally substituted in.");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[0] hello v=12345667
|
[0] hello v=12345667
|
||||||
[0] Hello2
|
[0] Hello2
|
||||||
d: 12 12
|
d: 12 12
|
||||||
|
|
||||||
h: 0000000c 0000000c
|
h: 0000000c 0000000c
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user