forked from github/verilator
Fix error on unpacked connecting to packed, #2288.
This commit is contained in:
parent
dd967f7769
commit
910803e6db
2
Changes
2
Changes
@ -36,6 +36,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix arrayed instances connecting to slices, #2263. [Don/engr248]
|
||||
|
||||
**** Fix error on unpacked connecting to packed, #2288. [Joseph Shaker]
|
||||
|
||||
|
||||
* Verilator 4.032 2020-04-04
|
||||
|
||||
|
@ -3519,13 +3519,13 @@ private:
|
||||
<< exprSize << ".");
|
||||
UINFO(1, " Related lo: " << modDTypep->skipRefp() << endl);
|
||||
UINFO(1, " Related hi: " << exprDTypep->skipRefp() << endl);
|
||||
} else if ((exprArrayp && !modArrayp && pinwidth != conwidth)
|
||||
|| (!exprArrayp && modArrayp && pinwidth != conwidth)) {
|
||||
} else if ((exprArrayp && !modArrayp) || (!exprArrayp && modArrayp)) {
|
||||
nodep->v3error("Illegal " << nodep->prettyOperatorName() << ","
|
||||
<< " mismatch between port which is"
|
||||
<< (modArrayp ? "" : " not") << " an array,"
|
||||
<< " and expression which is"
|
||||
<< (exprArrayp ? "" : " not") << " an array.");
|
||||
<< (exprArrayp ? "" : " not")
|
||||
<< " an array. (IEEE 1800-2017 7.6)");
|
||||
UINFO(1, " Related lo: " << modDTypep->skipRefp() << endl);
|
||||
UINFO(1, " Related hi: " << exprDTypep->skipRefp() << endl);
|
||||
}
|
||||
|
5
test_regress/t/t_inst_misarray2_bad.out
Normal file
5
test_regress/t/t_inst_misarray2_bad.out
Normal file
@ -0,0 +1,5 @@
|
||||
%Error: t/t_inst_misarray2_bad.v:10:17: Illegal input port connection 'i_data', mismatch between port which is not an array, and expression which is an array. (IEEE 1800-2017 7.6)
|
||||
: ... In instance t
|
||||
10 | .i_data(fft_oQ[6:0])
|
||||
| ^~~~~~
|
||||
%Error: Exiting due to
|
20
test_regress/t/t_inst_misarray2_bad.pl
Executable file
20
test_regress/t/t_inst_misarray2_bad.pl
Executable file
@ -0,0 +1,20 @@
|
||||
#!/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.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
scenarios(linter => 1);
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
|
||||
ok(1);
|
||||
1;
|
17
test_regress/t/t_inst_misarray2_bad.v
Normal file
17
test_regress/t/t_inst_misarray2_bad.v
Normal file
@ -0,0 +1,17 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
// any use, without warranty, 2020 by Wilson Snyder.
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
wire signed [16:0] fft_oQ [6:0];
|
||||
round round(
|
||||
.i_data(fft_oQ[6:0])
|
||||
);
|
||||
endmodule
|
||||
module round(
|
||||
input wire signed [16:0] i_data // Misdeclared, not a vector
|
||||
);
|
||||
wire signed [15:0] w_convergent = {10'b0, {6{~i_data[7]}}};
|
||||
endmodule
|
@ -1,5 +1,5 @@
|
||||
%Error: t/t_inst_misarray_bad.v:17:27: VARREF 't.foo' is not an unpacked array, but is in an unpacked array context
|
||||
: ... In instance t.foo
|
||||
%Error: t/t_inst_misarray_bad.v:17:23: Illegal input port connection 'foo', mismatch between port which is an array, and expression which is not an array. (IEEE 1800-2017 7.6)
|
||||
: ... In instance t
|
||||
17 | .foo(foo));
|
||||
| ^~~
|
||||
| ^~~
|
||||
%Error: Exiting due to
|
||||
|
Loading…
Reference in New Issue
Block a user