forked from github/verilator
Fix compile error on public real parameters by suppressing, bug1261.
This commit is contained in:
parent
7ee6efab74
commit
bd1f1e8699
2
Changes
2
Changes
@ -4,6 +4,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
* Verilator 3.919 devel
|
||||
|
||||
**** Fix compile error on public real parameters by suppressing, bug1261. [Alex Solomatnikov]
|
||||
|
||||
|
||||
* Verilator 3.918 2018-01-02
|
||||
|
||||
|
@ -2040,6 +2040,8 @@ void EmitCImp::emitInt(AstNodeModule* modp) {
|
||||
putsDecoration("// enum WData "+varp->name()+" //wide");
|
||||
} else if (!varp->valuep()->castConst()) { // Unsupported for output
|
||||
//putsDecoration("// enum ..... "+varp->name()+" //not simple value, see variable above instead");
|
||||
} else if (varp->dtypep()->castBasicDType()
|
||||
&& varp->dtypep()->castBasicDType()->isOpaque()) { // Can't put out e.g. doubles
|
||||
} else {
|
||||
puts("enum ");
|
||||
puts(varp->isQuad()?"_QData":"_IData");
|
||||
|
19
test_regress/t/t_math_real_public.pl
Executable file
19
test_regress/t/t_math_real_public.pl
Executable file
@ -0,0 +1,19 @@
|
||||
#!/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 (
|
||||
verilator_flags2 => ['--cc --public'],
|
||||
);
|
||||
|
||||
execute (
|
||||
check_finished=>1,
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
21
test_regress/t/t_math_real_public.v
Normal file
21
test_regress/t/t_math_real_public.v
Normal file
@ -0,0 +1,21 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2018 by Alex Solomatnikov
|
||||
|
||||
module t;
|
||||
sub #(.REAL(2.0)) sub;
|
||||
endmodule
|
||||
|
||||
module sub ();
|
||||
timeunit 1ns;
|
||||
timeprecision 1ps;
|
||||
|
||||
parameter REAL = 0.0;
|
||||
|
||||
initial begin
|
||||
$display("REAL %g", REAL);
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user