Fix parameter real conversion from integer.
This commit is contained in:
parent
e42c9dfd84
commit
236b9e9761
2
Changes
2
Changes
|
|
@ -13,6 +13,8 @@ indicates the contributor was also the author of the fix; Thanks!
|
||||||
|
|
||||||
**** Fix interface ports with comma lists, msg1058. [Ed Lander]
|
**** Fix interface ports with comma lists, msg1058. [Ed Lander]
|
||||||
|
|
||||||
|
**** Fix parameter real conversion from integer.
|
||||||
|
|
||||||
**** Fix clang warnings, bug668. [Yutetsu Takatsukasa]
|
**** Fix clang warnings, bug668. [Yutetsu Takatsukasa]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -915,6 +915,9 @@ private:
|
||||||
if (!nodep->valuep()->castInitArray()) { // No dtype at present, perhaps TODO
|
if (!nodep->valuep()->castInitArray()) { // No dtype at present, perhaps TODO
|
||||||
widthCheck(nodep,"Initial value",nodep->valuep(),nodep->width(),nodep->widthMin());
|
widthCheck(nodep,"Initial value",nodep->valuep(),nodep->width(),nodep->widthMin());
|
||||||
}
|
}
|
||||||
|
if (nodep->isDouble() && !nodep->valuep()->isDouble()) {
|
||||||
|
spliceCvtD(nodep->valuep());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
UINFO(4,"varWidthed "<<nodep<<endl);
|
UINFO(4,"varWidthed "<<nodep<<endl);
|
||||||
//if (debug()) nodep->dumpTree(cout," InitOut: ");
|
//if (debug()) nodep->dumpTree(cout," InitOut: ");
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||||
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||||
|
#
|
||||||
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
||||||
|
# redistribute it and/or modify it under the terms of either the GNU
|
||||||
|
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
# Version 2.0.
|
||||||
|
|
||||||
|
compile (
|
||||||
|
);
|
||||||
|
|
||||||
|
execute (
|
||||||
|
check_finished=>1,
|
||||||
|
);
|
||||||
|
|
||||||
|
ok(1);
|
||||||
|
1;
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
// DESCRIPTION: Verilator: Verilog Test module
|
||||||
|
//
|
||||||
|
// This file ONLY is placed into the Public Domain, for any use,
|
||||||
|
// without warranty, 2011 by Wilson Snyder.
|
||||||
|
|
||||||
|
`begin_keywords "VAMS-2.3"
|
||||||
|
|
||||||
|
module t (/*autoarg*/
|
||||||
|
// Outputs
|
||||||
|
aout,
|
||||||
|
// Inputs
|
||||||
|
in
|
||||||
|
);
|
||||||
|
|
||||||
|
input [15:0] in;
|
||||||
|
output aout;
|
||||||
|
wreal aout;
|
||||||
|
|
||||||
|
parameter real lsb = 1;
|
||||||
|
// verilator lint_off WIDTH
|
||||||
|
assign aout = $itor(in) * lsb;
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
$write("*-* All Finished *-*\n");
|
||||||
|
$finish;
|
||||||
|
end
|
||||||
|
|
||||||
|
endmodule
|
||||||
Loading…
Reference in New Issue