Upload
enas-dhuhri
View
220
Download
1
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