Fix non-colon array of interface modports, bug1212.

This commit is contained in:
Wilson Snyder 2017-09-14 21:15:56 -04:00
parent b11b693c08
commit 41b40157d8
3 changed files with 10 additions and 3 deletions

View File

@ -16,6 +16,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
**** Fix constant function default parameters, bug1211. [Mike Popoloski]
**** Fix non-colon array of interface modports, bug1212. [Mike Popoloski]
* Verilator 3.910 2017-09-07

View File

@ -863,7 +863,7 @@ port<nodep>: // ==IEEE: port
{ $$ = $3; VARDECL(AstVarType::IFACEREF); VARIO(UNKNOWN);
VARDTYPE(new AstIfaceRefDType($<fl>2,"",*$2));
$$->addNextNull(VARDONEP($$,$4,$5)); }
| portDirNetE id/*interface*/ '.' idAny/*modport*/ portSig rangeListE sigAttrListE
| portDirNetE id/*interface*/ '.' idAny/*modport*/ portSig variable_dimensionListE sigAttrListE
{ $$ = $5; VARDECL(AstVarType::IFACEREF); VARIO(UNKNOWN);
VARDTYPE(new AstIfaceRefDType($<fl>2,"",*$2,*$4));
$$->addNextNull(VARDONEP($$,$6,$7)); }

View File

@ -5,11 +5,14 @@
interface foo_intf;
logic a;
modport m(input a);
endinterface
module foo_mod
(
foo_intf foo
foo_intf foo,
foo_intf.m bars[4]
);
endmodule
@ -18,12 +21,14 @@ module t (/*AUTOARG*/);
localparam N = 4;
foo_intf foos [N-1:0] ();
foo_intf bars [N] ();
//foo_intf foos ();
foo_mod
foo_mod
(
.foo (foos[2])
.foo (foos[2]),
.bars (bars)
//.foo (foos)
);