[sv-bc] parameter_port_list - are paranthesis obligatory

From: Daniel Mlynek <daniel.mlynek_at_.....>
Date: Mon Feb 09 2009 - 07:33:56 PST
In parameter_port_list definition paranthesis are obligatory : 

parameter_port_list ::=
# ( list_of_param_assignments { , parameter_port_declaration } )
| # ( parameter_port_declaration { , parameter_port_declaration } )
| #( )

However this is imposible to check this restriction on compilation - becasue
primitive instantation syntax allow to use #NUMBER specification. So below
code can be compiled even if sub is module definition:

module top;
 sub #1 uut(); //legal vs illegal when sub is module
 udp1 #1 uut1(); //illegal when udp1 is udp
endmodule

Maybe LRM should allow make skipping paranthesis legal as this is impossible
on compilation to check it.

This problem is also inherited by parametrized classes.

C #1 c=new; //legal vs illegal?

 

DANiel


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Feb 9 07:34:41 2009

This archive was generated by hypermail 2.1.8 : Mon Feb 09 2009 - 07:35:33 PST