Array of std_logic_vector

Discussion in 'VHDL' started by Willem Oosthuizen, Jul 9, 2003.

  1. I have the following:

    type AA is array(6 downto 0) of std_logic_vector(5 downto 0);
    signal Thing: AA;

    begin

    Thing(0,0) <= '1';

    ......
    The Synth complains about the assignment: "Indexing operation does not match
    dimensionality of array"

    Any suggestions?
     
    Willem Oosthuizen, Jul 9, 2003
    #1
    1. Advertising

  2. Willem Oosthuizen

    Mario Trams Guest

    Willem Oosthuizen wrote:

    > I have the following:
    >
    > type AA is array(6 downto 0) of std_logic_vector(5 downto 0);
    > signal Thing: AA;
    >
    > begin
    >
    > Thing(0,0) <= '1';
    >
    > .....
    > The Synth complains about the assignment: "Indexing operation does not
    > match dimensionality of array"
    >
    > Any suggestions?


    Of course, wrong indexing syntax.
    It has to be

    Thing(0)(0) <= '1';

    (like indexing in C)

    Regards,
    Mario
     
    Mario Trams, Jul 9, 2003
    #2
    1. Advertising

  3. Mario Trams wrote:
    >
    > Willem Oosthuizen wrote:
    >
    > > I have the following:
    > >
    > > type AA is array(6 downto 0) of std_logic_vector(5 downto 0);
    > > signal Thing: AA;
    > >
    > > begin
    > >
    > > Thing(0,0) <= '1';
    > >
    > > .....
    > > The Synth complains about the assignment: "Indexing operation does not
    > > match dimensionality of array"
    > >
    > > Any suggestions?

    >
    > Of course, wrong indexing syntax.
    > It has to be
    >
    > Thing(0)(0) <= '1';
    >
    > (like indexing in C)


    More completely, it's not incorrect syntax but rather the wrong syntax
    for this type of array. The thing(a,b) format is for multidimensional
    arrays whereas thing(a)(b) is for an array of arrays, which is what you
    have. For some reason, synthesizer makers have chosen to support arrays
    of arrays but not multidimensional arrays. Multidimensional arrays are
    perfectly legal for simulation.
    --
    Tim Hubberstey, P.Eng. . . . . . Hardware/Software Consulting Engineer
    Marmot Engineering . . . . . . . VHDL, ASICs, FPGAs, embedded systems
    Vancouver, BC, Canada . . . . . . . . . . . http://www.marmot-eng.com
     
    Tim Hubberstey, Jul 9, 2003
    #3
  4. Willem Oosthuizen

    mathukutty

    Joined:
    Feb 26, 2010
    Messages:
    1
    I tested both multidimensional arrays and array of arrays. Both are synthesizeable. I am using an Altera D2 Board with Quartus II simulator
     
    mathukutty, Feb 26, 2010
    #4
    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. Brandon
    Replies:
    2
    Views:
    5,180
    Brandon
    Jul 18, 2005
  2. Brad Smallridge

    std_logic_vector Array Input

    Brad Smallridge, Feb 22, 2007, in forum: VHDL
    Replies:
    5
    Views:
    897
  3. vince00001
    Replies:
    3
    Views:
    2,785
    quantum_dot
    Jun 6, 2007
  4. Thomas Rouam
    Replies:
    6
    Views:
    1,186
  5. Replies:
    6
    Views:
    720
Loading...

Share This Page