Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

How to initialize this array

hi my friends!

how to initialize this array:


type dataout is array (6 downto 0,11 downto 0) of std_logic_vector(7 downto 0);

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    that is not an array - it is a type declaration. You initialise the signal/variable/constant when you declare it.

    constant some_array : dataout := (others => (others => (others =>'0')));

    btw - dataout is a very poor name choice for a type. At least call it dataout_type or similar.