2D array question

Discussion in 'VHDL' started by Divyang M, Sep 6, 2005.

  1. Divyang M

    Divyang M Guest

    Hi,

    How do I assign 8 bits of a 16-bit 2D array to an 8-bit 2D array:

    I tried both the following and I get an error:

    prim_out_n_re(9) <= prim_out_n(15 downto 8)(9);

    AND

    prim_out_n_re(9) <= prim_out_n(9)(15 downto 8);

    where

    prim_out_n_re is array(10 downto 0) of std_logic_vector(7 downto 0)
    prim_out_n is array(10 downto 0) of std_logic_vector(15 downto 0)

    Thanks,

    Divyang M
    Divyang M, Sep 6, 2005
    #1
    1. Advertising

  2. Divyang M

    Divyang M Guest

    I tried the following and it compiles..is it correct?

    prim_out_n_re(i)(7 downto 0) <= prim_out_n(i)(15 downto 8);

    Divyang M.
    Divyang M, Sep 6, 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. Joseph Turian
    Replies:
    11
    Views:
    498
    Joseph Turian
    Jan 19, 2005
  2. Fabio
    Replies:
    0
    Views:
    298
    Fabio
    Nov 5, 2008
  3. Mara Guida

    const and array of array (of array ...)

    Mara Guida, Sep 2, 2009, in forum: C Programming
    Replies:
    3
    Views:
    464
    David RF
    Sep 3, 2009
  4. Tom
    Replies:
    3
    Views:
    187
    salsablr
    Dec 20, 2004
  5. Tuan  Bui
    Replies:
    14
    Views:
    452
    it_says_BALLS_on_your forehead
    Jul 29, 2005
Loading...

Share This Page