unconstrained array in case..is

Discussion in 'VHDL' started by Xin Xiao, Jan 26, 2008.

  1. Xin Xiao

    Xin Xiao Guest

    What's the "technical" reason why it is not possible to write

    case Signal is
    ....

    ....

    with "Signal" being an unconstrained array?

    Does this mean that you cannot write a generic entry if it is going to be
    used in a "case..is" statement?
     
    Xin Xiao, Jan 26, 2008
    #1
    1. Advertising

  2. Xin Xiao wrote:
    > What's the "technical" reason why it is not possible to write
    > case Signal is
    > ...
    > with "Signal" being an unconstrained array?


    How can I cover all the cases
    without knowing how many there are?

    > Does this mean that you cannot write a generic entry if it is going to
    > be used in a "case..is" statement?


    No. I could declare and use a subtype that matches the
    width of a port or generic. For example:

    subtype char_t is std_logic_vector(readData'range);

    -- Mike Treseler
     
    Mike Treseler, Jan 27, 2008
    #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. FE
    Replies:
    0
    Views:
    1,656
  2. Alex Rast
    Replies:
    3
    Views:
    5,183
    Jim Lewis
    Oct 6, 2003
  3. Victor Hannak
    Replies:
    1
    Views:
    541
    Mike Treseler
    Nov 25, 2003
  4. Amal
    Replies:
    5
    Views:
    8,697
    Brandon
    Mar 8, 2006
  5. jens
    Replies:
    3
    Views:
    833
Loading...

Share This Page