diff --git a/Changes b/Changes index c90d1c3c1..efeb53902 100644 --- a/Changes +++ b/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 diff --git a/src/V3LinkCells.cpp b/src/V3LinkCells.cpp index 5a9f59804..f49789032 100644 --- a/src/V3LinkCells.cpp +++ b/src/V3LinkCells.cpp @@ -335,7 +335,8 @@ private: UINFO(9," need .* PORT "<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 diff --git a/test_regress/t/t_interface_star.pl b/test_regress/t/t_interface_star.pl new file mode 100755 index 000000000..1118f2e0e --- /dev/null +++ b/test_regress/t/t_interface_star.pl @@ -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; diff --git a/test_regress/t/t_interface_star.v b/test_regress/t/t_interface_star.v new file mode 100644 index 000000000..e51c06a01 --- /dev/null +++ b/test_regress/t/t_interface_star.v @@ -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