2
Text-only version This is Google's cache of http://www.vdlande.com/VHDL/arrays.html . It is a snapshot of the page as it appeared on Sep 26, 2009 14:09:54 GMT. The current page could have changed in the meantime. Learn more These search terms are highlighted: vhdl These terms only appear in links pointing to this page: reference guide vdlande Arrays Declaration ---- used in ----> Package Entity Architecture Process Procedure Function Syntax type type_name is array (range) of element_type; See LRM section 3.2.1 Rules and Examples An arraycontains multiple elements of the same type. When an array object is declared, an existing array type must be used. type NIBBLE is array (3 downto 0) of std_ulogic; type RAM is array (0 to 31) of integer range 0 to 255; signal A_BUS : NIBBLE; signal RAM_0 : RAM; An array type definition can be unconstrained, i.e. of undefined length. String, bit_vector and std_logic_vector are defined in this way. An object (signal, variable or constant) of an unconstrained array type must have it's index type range defined when it is declared. type INT_ARRAY is array (integer range <>) of integer; variable INT_TABLE: INT_ARRAY(0 to 9); variable LOC_BUS : std_ulogic_vector(7 downto 0); Arrays with character elements such as string, bit_vector and std_logic_vector may be assigned a literal value using double quotes (see literals): CONSTANT MSG_o: string := "Test 1 Completed"; ... A_BUS <= "0000"; LOC_BUS <= "10101010"; VHDL Reference Guide - Arrays http://www.ics.uci.edu/~jmoorkan/vhdlref/arrays.html 1 of 2 02/12/2013 09:29 PM

Arrays in Vhdl

Embed Size (px)

DESCRIPTION

This is how e describe array in vhd

Citation preview

Text-only versionThis is Google's cache of http://www.vdlande.com/VHDL/arrays.html. It is a snapshot of the page as itappeared on Sep 26, 2009 14:09:54 GMT. The current page could have changed in the meantime. LearnmoreThese search terms are highlighted: vhdl These terms only appear in links pointing to thispage: reference guide vdlandeArraysDeclaration ---- used in ---->PackageEntityArchitectureProcessProcedureFunctionSyntaxtype type_name is array (range) ofelement_type;See LRM section 3.2.1Rules and ExamplesAn arraycontains multiple elements of the same type. When an array objectis declared, an existing array type must be used.type NIBBLE is array (3 downto 0) of std_ulogic;type RAM is array (0 to 31) of integer range 0 to 255;signal A_BUS : NIBBLE;signal RAM_0 : RAM;An array type definition can be unconstrained, i.e. of undefinedlength. String, bit_vector and std_logic_vector are defined in thisway. An object (signal, variable or constant) of an unconstrainedarray type must have it's index type range defined when it isdeclared.type INT_ARRAY is array (integer range ) of integer;variable INT_TABLE: INT_ARRAY(0 to 9);variable LOC_BUS : std_ulogic_vector(7 downto 0);Arrays with character elements such as string, bit_vectorand std_logic_vector may be assigned a literal value usingdouble quotes (see literals):CONSTANT MSG_o: string := "Test 1 Completed";...A_BUS