( others => '0')
is an expression, an aggregate of elements into a composite type.
Without seeing the declaration for cmd_r
we can imagine it's an array type, an array type is a composite type (made of one or more elements).
An aggregate combines one or more values as elements into a composite type.
aggregate ::=
( element_association { , element_association } )
Notice the opening and closing parentheses are required.
Those elements can be associated positionally by name for a record type or by index value position for an array type.
element_association ::=
[ choices => ] expression
The element association is governed by choices.
choices ::= choice { | choice }
The element association can cover more than one choice.
choice ::=
simple_expression
| discrete_range
| element_simple_name
| others
A choice can represent one or more elements.
An element simple name is used for a record type or an array type with an index type that is an enumerated type.
others
is always the last choice and stands for all the remaining choices for that type. The type can be discovered in an assignment from the target. In some instances the type is required to be supplied explicitly, as in a qualified expression.
The element association others => '0'
stands for all other elements of the type of the aggregate. In this case the type and subtype of cmd_r
, where a subtype indication specifies a range index of elements of a std_logic_vector.
The expression '0'
is required to be of the element type, and the aggregate (others => '0')
stands for a value of the subtype of cmd_r
comprised of '0'
's for each of the elements of cmd_r
in this case.