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. Advertising

  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. 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. pmatos
    Replies:
    6
    Views:
    24,036
  2. Replies:
    8
    Views:
    1,987
    Csaba
    Feb 18, 2006
  3. Javier
    Replies:
    2
    Views:
    603
    James Kanze
    Sep 4, 2007
  4. Richard A. DeVenezia
    Replies:
    4
    Views:
    152
    Lasse Reichstein Nielsen
    Sep 5, 2003
  5. Rushikesh Joshi
    Replies:
    0
    Views:
    387
    Rushikesh Joshi
    Jul 10, 2004
Loading...

Share This Page