> On 03/07/2014 02:11, ryan.w.hinton@L-3com.com wrote: > I can see some type conversions which may require reference to the function return subtype > and this maybe another reason to sort out the problems with this proposal: > > http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/FunctionsKnowOutputSubtype Another starting point would be the unwritten proposal that is described in the last paragraph of the 'Requirement' section at this link... http://www.eda-twiki.org/cgi-bin/view.cgi/P1076/FunctionKnowsVectorSize The 'FunctionKnowsVectorSize' proposal details a method for a function to have access to attributes of the target of the function. The unwritten proposal described there is... This idea can be extended further to include scalar objects but would require adoption of another (as yet unwritten) proposal. For scalars, it is valid today to refer to attributes such as 'left, 'right, etc. of a type, but not for an object of that type. Assuming that one could get attributes of a scalar object, then object'left, object'right would then return the left and right bounds of that scalar (i.e. signal xyz: integer range 2 to 5 --> xyz'left = 2; xyz'right = 5). All of the other usual attributes would also be available, not just 'left and 'right. On the assumption that this new proposal happens, then this proposal would automatically inherit the ability to access scalar attributes as well. This would allow the function to know the range of the output object. It appears to me that this is what you're looking for with your other statement... > We can then create a function to return the modulus of the subtype using: > > 'subtype'high - 'subtype'low + 1 > > or rather we can't at present because we can't get this from the > actual part of the interface element. Kevin Jennings -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Jul 7 10:41:28 2014
This archive was generated by hypermail 2.1.8 : Mon Jul 07 2014 - 10:42:21 PDT