New IR 2075: Arrays with numeric and enumeration index types are not closely related

From: Chuck Swart <cswart_at_.....>
Date: Fri Oct 14 2005 - 15:03:38 PDT
We'll review this at our next meeting.

Chuck Swart


VHDL Issue Number:        2075       

Language_Version          VHDL-2002
Classification            Language Modeling Enhancement or Deficiency
Summary                   Arrays with numeric and enumeration index types are not closely related
Relevant_LRM_Sections     7.3.5 Type conversions
Related_Issues            
Key_Words_and_Phrases     closely related types, array types, type conversion
Authors_Name              Peter Ashenden
Authors_Phone_Number      +61 414 709 106
Authors_Fax_Number        
Authors_Email_Address     peter@ashenden.com.au
Authors_Affiliation       Ashenden Designs
Authors_Address1          
Authors_Address2          
Authors_Address3          

Current Status:           Submitted

Superseded By:

------------------------
Date Submitted:           13 October 2005
Date Analyzed:
Author of Analysis:
Revision Number:          0
Date Last Revised:

Description of Problem
----------------------

A user has the following question:
    
Given types:
     
      type SLV15To0 is array (15 downto 0) of std_logic;
      type SMRst is (RstIDE,RstIU,RSTOU, RstCF2B);
      type SMRstSLV is array (SMRst'left to SMRst'right)
                             of std_logic;
    
Given port identifier:
    
      EBD : inout SLV15To0;
    
Given signal:
    
      signal SMRCR : SMRstSLV;
    
How do I set SMRCR to the the 4 lsbs of EBD?
    
An assignment
    
      SMRCR <:   SMRstSLV(EBD(3 downto 0));
    
is not legal, since the array types are not closely related and so the
type conversion cannot be applied. The types are not closely related
since one index type is an abstract numeric type and the other is an
enumeration type.

Proposed Resolution
-------------------

Consider whether arrays with other than numeric index types can be
defined to be closely related, provided they are of the same
dimensionality and have the same element type.

VASG-ISAC Analysis & Rationale
------------------------------
TBD

VASG-ISAC Recommendation for IEEE Std 1076-2002
-----------------------------------------------
TBD

VASG-ISAC Recommendation for Future Revisions
---------------------------------------------
TBD


-------------END OF IR----------------
Received on Fri Oct 14 15:03:41 2005

This archive was generated by hypermail 2.1.8 : Fri Oct 14 2005 - 15:03:49 PDT