FPGA Center

 * Constant

 * Signal

 * Operators

 * Component

 * Concurrent Assignments

 * Process

 * Sequential Statements

 * Variable

  * User Defined Types


User Defined Data Types

1. Array

Sub-elements of the arrays are all the same type. Each element of an array has an index number within a range. There is one index number for one-dimensional arrays. The index number is up to the size of the array for multi-dimensional arrays.


type type_name is array (range) of element_name
type type_name is array (type range <>) of element_name


type RAM_D is array (2**8-1 downto 0)  of std_logic_vector(7 downto 0);
signal RAM_U : RAM_D;

2. Enumarated Data Type

Users can define data types with their names and values. So the code can be more clear. These types mostly used in finite state machines.


type tip ismi is (type_element, type_element, ...);


Type state_type is (idle,start,data,stop);
Signal state :state_type:= idle;





Home | Fpga | VHDL | VHDL Dictionary | Digital Design | Simulation | PCB | Examples | Contact Us
Copyright © 2010 - 2013 FPGAcenter. All Rights Reserved.