Specifying vector length in the function output

Discussion in 'VHDL' started by valentin tihomirov, Jun 28, 2005.

  1. it seems that the following code will not work

    function F() return std_logic_vector (1 to 10) -- error

    while the following is compiled

    function F() return std_logic_vector

    So, I would like to highlight the length to the user looking at package
    interface part.
     
    valentin tihomirov, Jun 28, 2005
    #1
    1. Advertisements

  2. "valentin tihomirov" <> writes:

    > it seems that the following code will not work
    >
    > function F() return std_logic_vector (1 to 10) -- error

    [...]
    > So, I would like to highlight the length to the user looking at package
    > interface part.


    Just define a subtype.

    HTH,
    Colin
     
    Colin Marquardt, Jun 28, 2005
    #2
    1. Advertisements

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. pmatos
    Replies:
    6
    Views:
    25,418
  2. jeremito
    Replies:
    0
    Views:
    348
    jeremito
    May 25, 2006
  3. Replies:
    8
    Views:
    2,314
    Csaba
    Feb 18, 2006
  4. mathieu
    Replies:
    4
    Views:
    563
    Kai-Uwe Bux
    Aug 12, 2006
  5. Replies:
    2
    Views:
    621
    David Harmon
    Feb 9, 2007
  6. Javier
    Replies:
    2
    Views:
    876
    James Kanze
    Sep 4, 2007
  7. Richard A. DeVenezia
    Replies:
    4
    Views:
    327
    Lasse Reichstein Nielsen
    Sep 5, 2003
  8. Rushikesh Joshi
    Replies:
    0
    Views:
    577
    Rushikesh Joshi
    Jul 10, 2004
Loading...