Professional Documents
Culture Documents
Arrays: Ram (Sel) (Loc) Ram (Sel, Loc)
Arrays: Ram (Sel) (Loc) Ram (Sel, Loc)
First - One needs to define a type that defines the base type for each element of the array and the size
(range | number of elements) of the array. Second - Signals are then declared with this type.
e.g.
Initial values may be assigned as part of the declaration - a complete set of values for all elements of the
array must be provided - values are assigned in order first_element to last_element.
e.g.
If the array is read-only i.e. never written to then it could be declared as a constant.
e.g.
Arrays are accessed using an integer value as an index. Targets must be of the same base type as the array
being read from, or written to.
e.g.
Note the syntax for referencing a particular element of a two dimensional array
e.g.
ram ( sel ) ( loc );
[The VHDL language definition also shows an alternative method ram (sel, loc) but this is currently NOT
supported within Xilinx Tools]