I never got a reply to this. Any comments? Thanks, Shalom ________________________________ From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Bresticker, Shalom Sent: Sunday, April 23, 2006 9:30 AM To: sv-bc@server.eda.org Subject: [sv-bc] Static casting types This is a spinoff of Mantis 1273. That was an enhancement request from the 1364 database to allow writing a numeric literal with a parametric size, something like P'3, where P is a parameter identifier. Brad pointed out that in SV, you can get the same result (ignoring possible differences in bit-extension, which I did not check) by a static cast by writing P'(3). That serves the need, but 4.14 is not clear enough that this is possible. It comes out of the BNF, but it is not at all clear from the text. All this raises two questions in my mind: 1. What if P is a type parameter instead of a value parameter? 4.14 says, "When casting to a predefined type, the prefix of the cast must be the predefined type keyword. When casting to a user-defined type, the prefix of the cast must be the user-defined type identifier," so is this allowed or not? A parameter type is neither of these. 2. The casting_type BNF says that it can be constant_primary. What are the restrictions, if any, on what type of constant_primary can be used as a casting_type. This is the constant_primary BNF: constant_primary ::= primary_literal | ps_parameter_identifier constant_select | specparam_identifier [ constant_range_expression ] | genvar_identifier | [ package_scope | class_scope ] enum_identifier | constant_concatenation | constant_multiple_concatenation | constant_function_call | ( constant_mintypmax_expression ) | constant_cast | constant_assignment_pattern_expression | type_reference Thanks, Shalom Shalom Bresticker Intel Jerusalem LAD DA +972 2 589-6852 +972 54 721-1033 I don't represent Intel
This archive was generated by hypermail 2.1.8 : Mon Sep 18 2006 - 01:18:29 PDT