reading a bookArray


A data type which consists of a vector or a multi-dimensional set of values of the same base type. Can be used to describe RAMs, ROMs, FIFOs, or any regular multi-dimensional structure.

Syntax ( Key to Notation )

type NewName is {unconstrained}
  array (IndexTypeName range <>, ...) of DataType;

type NewName is {constrained}
  array (Range, ...) of DataType;

Where

See Declaration

Rules

Synthesis

Some synthesis tools do not support multi-dimensional arrays, only support arrays of bits or arrays of vectors, or do not permit ports to be arrays of arrays.

Tips

Example

subtype Word is Std_logic_vector(15 downto 0);
type Mem is array (0 to 2**12-1) of Word;
variable Memory: Mem := (others => Word'(others=>'U'));
...
if MemoryRead then
  Data <= Memory(To_Integer(Address));
elsif MemoryWrite then
  Memory(To_Integer(Address)) := Data;
end if;

See Also

Range, Name, String, Type


reference cardVHDL Quick Reference
teaching pointerDoulos Training Courses
reading a bookBack to the VHDL Golden Reference Guide


riverDoulos Home Page

Copyright 1995-1997 Doulos
This page was last updated 25th June 1996

mail iconWe welcome your e-mail comments. Please contact us at: webmaster@doulos.co.uk