Francoise Martinolle writes: >The solution seems to be to add : > >[package_scope] {[class_scope]} parameter_identifier constant_select in the >constant_primary derivation rule. How about instead changing the first production in ps_parameter_identifier (A.9.3) from [ package_scope ] parameter_identifier to [ class_scope | package_scope ] parameter_identifier ? -- Brad [In reply to http://www.eda-stds.org/sv-ec/hm/3791.html .] ________________________________ From: owner-sv-ec@eda.org [mailto:owner-sv-ec@eda.org] On Behalf Of Francoise Martinolle Sent: Friday, November 10, 2006 10:58 AM To: sv-ec@eda.org Subject: [sv-ec] BNF: constant_primary missing class scoped parameters I think that there is an oversight in the BNF for constant expressions. It does not allow a class scoped parameter expression as a constant expression. For example we should be able to write: class c #(p = 0); endclass class b #(q = c#()::q ); // in a parameter declaration bit [ c#()::q :7] m1; // in a constant range endclass Right now the BNF is: parameter_declaration ::= parameter data_type_or_implicit list_of_param_assignments | parameter type list_of_type_assignments list_of_param_assignments ::= param_assignment { , param_assignment } param_assignment ::= parameter_identifier { unpacked_dimension } = constant_param_expression constant_param_expression ::= constant_mintypmax_expression | data_type | $ constant_mintypmax_expression ::= constant_expression | constant_expression : constant_expression : constant_expression constant_expression ::= constant_primary | unary_operator { attribute_instance } constant_primary | constant_expression binary_operator { attribute_instance } constant_expression | constant_expression ? { attribute_instance } constant_expression : constant_expression constant_primary ::= primary_literal | ps_parameter_identifier constant_select | specparam_identifier [ constant_range_expression ] | genvar_identifier32 | [ package_scope | class_scope ] enum_identifier | constant_concatenation | constant_multiple_concatenation | constant_function_call | ( constant_mintypmax_expression ) | constant_cast | constant_assignment_pattern_expression | type_reference29 ps_parameter_identifier ::= [ package_scope ] parameter_identifier | { generate_block_identifier [ [ constant_expression ] ] . } parameter_identifier package_scope ::= package_identifier :: | $unit :: The solution seems to be to add : [package_scope] {[class_scope]} parameter_identifier constant_select in the constant_primary derivation rule. FrancoiseReceived on Sun Nov 12 22:46:31 2006
This archive was generated by hypermail 2.1.8 : Sun Nov 12 2006 - 22:47:05 PST