Operator on array slice

Discussion in 'VHDL' started by johughes, Nov 27, 2009.

  1. johughes

    johughes

    Joined:
    Nov 27, 2009
    Messages:
    1
    I'm trying to do this:

    Code:
    type enum1 is (None, Up, Down, Both);
    type type1 is array (7 downto 0) of enum1;
    signal ary1: type1 := (others => None);
    
    remaining: for k in 7 downto 0 generate
    	requests_up(k) <= '1' when ary1(ary1'high downto k) = (others => None) else '0';
    end generate remaining;
    
    Or more specifically, trying to see if a slice of my array of enum types is uniformly equal to a certain value.

    I've tried these both:

    Code:
    ary1(7 downto 5) = (7 downto 5 => None)
    ary1(7 downto 5) = (others => None)
    
    But for some reason ary1(7 downto 5) always comes up with only single element.

    What is the proper way to do this?? I can't seem to find much more information on array slices.
    johughes, Nov 27, 2009
    #1
    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. Dave Bazell

    slice of multidimensional array

    Dave Bazell, Jul 23, 2003, in forum: Perl
    Replies:
    2
    Views:
    4,076
  2. kr

    array slice question

    kr, Aug 10, 2004, in forum: Perl
    Replies:
    3
    Views:
    660
  3. Antony Sequeira

    type safe array slice

    Antony Sequeira, Mar 24, 2006, in forum: Java
    Replies:
    6
    Views:
    2,589
    Hendrik Maryns
    Mar 28, 2006
  4. praba kar
    Replies:
    1
    Views:
    320
    Diez B. Roggisch
    Apr 16, 2005
  5. niall.macpherson@ntlworld.com

    Array slice to end of array of indeterminate size

    niall.macpherson@ntlworld.com, May 22, 2006, in forum: Perl Misc
    Replies:
    9
    Views:
    241
    David Squire
    May 22, 2006
Loading...

Share This Page