Mantis 2169

Clarify part-select terminology

P1800-2008/D4

In Section 7.4.6 (Indexing and slicing of arrays)

ADD at the end:

See 11.5.1 and 11.5.2 for more information on vector and array element selecting and slicing.

 

In Table 10-1, CHANGE

Constant part-select of a vector net or packed variable

Constant indexed part-select of a vector net or packed variable

...

Constant part-select of a packed variable

Indexed part-select of a packed variable

 

TO

Constant part-select of a vector net or packed variable

Constant indexed part-select of a vector net or packed variable

...

Constant p Part-select of a packed variable

Indexed part-select of a packed variable

 

In Section 11.5.1, CHANGE

11.5.1 Vector bit-select and part-select addressing

Bit-selects extract a particular bit from a vector net, vector variable, packed array, packed structure or parameter. The bit can be addressed using an expression. If the bit-select is out of the address bounds or the bit-select is x or z, then the value returned by the reference shall be x. A bit-select or part-select of a scalar, or of a real variable or real parameter, shall be illegal.

 

Several contiguous bits in a vector net, vector variable, packed array, packed structure or parameter can be addressed and are known as part-selects. There are two types of part-selects, a constant part-select and an indexed part-select. A constant part-select of a vector reg or net is given with the following syntax:

 

vect[msb_expr:lsb_expr]

 

Both msb_expr and lsb_expr shall be constant integer expressions. The first expression shall address a more significant bit than the second expression.

 

An indexed part-select of a vector net, vector variable, packed array, packed structure or parameter is given with the following syntax:

 

TO

11.5.1 Vector bit-select and part-select addressing

Bit-selects extract a particular bit from a vector net, vector variable, packed array, packed structure or parameter. The bit can be addressed using an expression. If the bit-select is out of the address bounds or the bit-select is x or z, then the value returned by the reference shall be x. A bit-select or part-select of a scalar, or of a real variable or real parameter, shall be illegal.

 

Several contiguous bits in a vector net, vector variable, packed array, packed structure or parameter can be addressed and are known as part-selects. There are two types of part-selects, a constant part-select and an indexed part-select a non-indexed part-select and an indexed part-select. A constant part-select non-indexed part-select of a vector reg or net is given with the following syntax:

 

vect[msb_expr:lsb_expr]

 

Both msb_expr and lsb_expr shall be constant integer expressions. The first expression shall address a more significant bit than the second expression.

 

An indexed part-select indexed part-select of a vector net, vector variable, packed array, packed structure or parameter is given with the following syntax:

 

 

CHANGE
The msb_base_expr and lsb_base_expr shall be integer expressions, and the width_expr shall be a positive constant integer expression. The lsb_base_expr and msb_base_expr can vary at run time. The first two examples select bits starting at the base and ascending the bit range. The number of bits selected is equal to the width expression. The second two examples select bits starting at the base and descending the bit range.

 

TO

The msb_base_expr and lsb_base_expr shall be integer expressions, and the width_expr shall be a positive constant integer expression. The lsb_base_expr and msb_base_expr can vary at run time. The first two examples select bits starting at the base and ascending the bit range. The number of bits selected is equal to the width expression. The second two examples select bits starting at the base and descending the bit range.

 

A constant bit-select is a bit-select whose position is constant. A constant part-select is a part-select whose position and width are both constant. The width of a part-select is always constant. Thus, a non-indexed part-select is always a constant part-select, and an indexed part-select is a constant part-select if its base is a constant value as well as its width.