forked from github/verilator
Fix .* on interface pins, bug1176.
This commit is contained in:
parent
644c22b08f
commit
abf2fcf820
2
Changes
2
Changes
@ -11,6 +11,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
*** Fix power operator on wide constants, bug761. [Clifford Wolf]
|
||||
|
||||
*** Fix .* on interface pins, bug1176. [Maciej Piechotka]
|
||||
|
||||
|
||||
* Verilator 3.904 2017-05-30
|
||||
|
||||
|
@ -335,7 +335,8 @@ private:
|
||||
UINFO(9," need .* PORT "<<portp<<endl);
|
||||
// Create any not already connected
|
||||
AstPin* newp = new AstPin(nodep->fileline(),0,portp->name(),
|
||||
new AstVarRef(nodep->fileline(),portp->name(),false));
|
||||
new AstParseRef(nodep->fileline(),
|
||||
AstParseRefExp::PX_TEXT, portp->name(), NULL, NULL));
|
||||
newp->svImplicit(true);
|
||||
nodep->addPinsp(newp);
|
||||
} else { // warn on the CELL that needs it, not the port
|
||||
|
18
test_regress/t/t_interface_star.pl
Executable file
18
test_regress/t/t_interface_star.pl
Executable file
@ -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-2009 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;
|
41
test_regress/t/t_interface_star.v
Normal file
41
test_regress/t/t_interface_star.v
Normal file
@ -0,0 +1,41 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2017 by Wilson Snyder.
|
||||
|
||||
module t (/*AUTOARG*/
|
||||
// Inputs
|
||||
clk
|
||||
);
|
||||
|
||||
input clk;
|
||||
integer cyc=1;
|
||||
|
||||
counter_io c_data();
|
||||
|
||||
counter_ansi c1 (.clk, .*);
|
||||
|
||||
always @ (posedge clk) begin
|
||||
cyc <= cyc + 1;
|
||||
if (cyc==20) begin
|
||||
if (c_data.value != 12345) $stop;
|
||||
$write("*-* All Finished *-*\n");
|
||||
$finish;
|
||||
end
|
||||
end
|
||||
endmodule
|
||||
|
||||
interface counter_io;
|
||||
integer value;
|
||||
endinterface
|
||||
|
||||
module counter_ansi
|
||||
(
|
||||
input clk,
|
||||
counter_io c_data
|
||||
);
|
||||
|
||||
always_ff @ (posedge clk) begin
|
||||
c_data.value <= 12345;
|
||||
end
|
||||
endmodule : counter_ansi
|
Loading…
Reference in New Issue
Block a user