Analysis of IR2062

From: Ajayharsh Varikat <ajay_at_.....>
Date: Wed Apr 06 2005 - 07:13:16 PDT
Please find attached my analysis of IR2062.

-ajay

VHDL Issue Number:        2062 

Language_Version          VHDL-2002
Classification            Language Definition Problem
Summary                   range staticness 
Relevant_LRM_Sections     7.4.1 Locally static primaries
                          7.4.2 Globally static primaries

Related_Issues            Note: there are many related issues with definition 
                          of type staticness.

Key_Words_and_Phrases     type static
Authors_Name              Gingold
Authors_Phone_Number      0
Authors_Fax_Number        
Authors_Email_Address     tgingold@free.fr
Authors_Affiliation       
Authors_Address1          
Authors_Address2          
Authors_Address3          

Current Status:           Submitted

Superseded By:

------------------------
Date Submitted:           19 February 2005
Date Analyzed:             6 April 2005
Author of Analysis:       Ajayharsh Varikat
Revision Number:          1
Date Last Revised:         6 April 2005

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

What does "imposing" means in the following sentence:

    "A locally static array subtype is a constrained array subtype
    formed by imposing on an unconstrained array type a locally static
    index constraint".
    
    The problem arise with interfaces:
    [...]
      generic (a :
    bit_vector);
    [...]
      sub: for i in a'range generate
    [...]
    
    A generate statement requires the discrete range to be static.  Is
    the range in this example static ?  Since the type of object "a"
    is not constrained at analysis time, the answer is no.  However,
    since it is constrained at elaboration time, the answer may be
    yes.

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

Replaces " A globally static range is either [...], or a range of the
first form whose prefix denotes either a globally static subtype or an
object that is of a globally static subtype."

    by

    "A globally static range is either [...], or a range of the first
    form whose prefix denotes either a globally static subtype or a
    globally static object."

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

Section 9.7 of the LRM specifies that the range in a for-generate statement
must be a static discrete range. 

Section 7.4.2 of the LRM specifies that:

    "A globally static discrete range is either a globally static subtype 
     or a globally static range."

and:

    "A globally static range is either a range of the second form 
     whose bounds are globally static expressions, or a range of the first 
     form whose prefix denotes either a globally static subtype or an 
     object that is of a globally static subtype."

where the terms "first form" and "second form" refer to the grammar
defining a range in section 3.1:

     range ::=
           range_attribute_name
         | simple_expression direction simple_expression

A static discrete range is either a locally static discrete range or
a globally static discrete range.

In the example of an unconstrained array type generic described in this
IR, A'range is not a static range. This is  because the subtype of A is not
globally static. 

However, as the submitter points out, the range of this generic is known 
after it has been elaborated, and it is useful to be able to refer to 
A'range in a generate scheme. In fact, the second paragraph in section
7.4 indicates that the term "globally static" is used to refer to 
something that is known after hierarchy elaboration. Hence it makes
sense to extend the definition of a static range along the lines
proposed by the submitter.


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

In section 7.4.2, change the sentence 

    "A globally static range is either a range of the second form 
     (see  3.1  ) whose bounds are globally static expressions, or a 
     range of the first form whose prefix denotes either a globally 
     static subtype or an object that is of a globally static subtype."

to the following.

    "A globally static range is either a range of the second form 
     (see  3.1 ) whose bounds are globally static expressions, or a 
     range of the first form whose prefix either denotes a globally 
     static subtype or is a globally static primary that denotes an object."


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

TBD
Received on Wed Apr 6 07:13:21 2005

This archive was generated by hypermail 2.1.8 : Wed Apr 06 2005 - 07:13:22 PDT