Using arrays as generic types 
Author Message
 Using arrays as generic types

Hi everyone,

How do I use arrays as generic types? For example, I want the following generic:
   cSeq : sequenceType := (1, 14, 7, 24, 17, 34, 27, 44, 37, 54, 47, 59)
   type sequenceType is array(11 downto 0) of integer range 0 to 127;

Where do I do the type declaration?



Sat, 17 Sep 2005 03:36:25 GMT  
 Using arrays as generic types


> How do I use arrays as generic types?

Add a generic clause to your entity.
For simulation you can use any type you like as a generic.

use work.my_types.all;
entity my_entity is
generic ( cSeq : sequenceType);
-- . . .

> Where do I do the type declaration?

In a package.

  -- Mike Treseler

Sat, 17 Sep 2005 04:05:23 GMT  
 [ 2 post ] 

 Relevant Pages 

1. null unconstrained arrays vs generic formal types

2. Tagged Types as Generic Formal Parameters (was comparison in generic packages)

3. Generic using another generic instantiated elsewhere

4. Question about array ops on arrays of types of arrays of ...(ack)

5. using an array in a type c'tor in Haskell

6. convert 2d array to 1d array without using shift registers and build array

7. member types and array-element-type?

8. Array scan in type declared array

9. Ada83 array of pointers to unconstrained array type

10. typed structured array or simple fortan array?

11. DEALLOCATE of a derived type array containing pointer array components

12. (typep (make-array 10 :element-type 'bit) '(array bit (10)))


Powered by phpBB® Forum Software