using reset for arrays

Discussion in 'VHDL' started by vedpsingh@gmail.com, Oct 3, 2005.

  1. Guest

    Hi all,
    I am not getting clue, how to do this:
    I want to make contents of an array to be zero when RESET signal is
    high.
    I have been doing this in std_logic_vector but dont know how to do in
    array !

    -------------------------------------------------------------

    type resultArray is array (0 to 62) of integer range 511 downto -511;

    architecutre....


    signal resultMult : resultArray;



    begin
    shift_reg : process (clock)

    begin
    if RESET='1' then --asynchronous RESET active High
    -- resultMult <= (others => '0'); --THis dont work
    ---I want to make resultmult=0 at RESET


    elsif (clock'event and clock='1') then

    .......................
    end process

    end architecture
     
    , Oct 3, 2005
    #1
    1. Advertising

  2. john Doef Guest

    a écrit :

    > Hi all,
    > I am not getting clue, how to do this:
    > I want to make contents of an array to be zero when RESET signal is
    > high.
    > I have been doing this in std_logic_vector but dont know how to do in
    > array !

    [...]
    > type resultArray is array (0 to 62) of integer range 511 downto -511;

    [...]
    > -- resultMult <= (others => '0'); --THis dont work
    > ---I want to make resultmult=0 at RESET

    Hi,

    resultArray is an array of integers. So elements are integers. But
    '0' is not
    an integer!
    You should write:
    resultmult <= (others => 0);

    JD.
     
    john Doef, Oct 3, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandra Stehman
    Replies:
    5
    Views:
    30,755
    Chris Smith
    Jun 17, 2004
  2. Bill Reyn
    Replies:
    3
    Views:
    2,280
    Bob Hairgrove
    Jun 22, 2004
  3. Mantorok Redgormor

    initializing arrays of arrays

    Mantorok Redgormor, Sep 10, 2003, in forum: C Programming
    Replies:
    4
    Views:
    579
  4. Philipp
    Replies:
    21
    Views:
    1,156
    Philipp
    Jan 20, 2009
  5. shashi
    Replies:
    17
    Views:
    436
    Guest
    Apr 13, 2006
Loading...

Share This Page