Simple question

Discussion in 'VHDL' started by VHDL_lover, Mar 17, 2005.

  1. VHDL_lover

    VHDL_lover Guest

    Hi guys

    I have very simple question but I am looking for best way to implement
    this ,as I need this function so many time in my application.

    I have four Numbers A,B ,C,D

    I want to find minimun number out of these.

    I was wondering if there is any in built function for this.

    Like
    Ans = min(A,B,C,D)

    thanks
    VHDL_lover, Mar 17, 2005
    #1
    1. Advertising

  2. VHDL_lover

    David Bishop Guest

    VHDL_lover wrote:
    > Hi guys
    >
    > I have very simple question but I am looking for best way to implement
    > this ,as I need this function so many time in my application.
    >
    > I have four Numbers A,B ,C,D
    >
    > I want to find minimun number out of these.
    >
    > I was wondering if there is any in built function for this.
    >
    > Like
    > Ans = min(A,B,C,D)


    Good question.

    In the VHDL-200x-ft update, you will see that we are making the
    following function implicit for all data types:

    function minimum (L, R).

    (you can't use "min", because in the type "time" there is a unit called
    "min" (minute).)

    Thus you can do this, you just have to call it several times, either
    like this:

    minimum (minimum(A, B), minimum (C, D))

    Or, you could call it recursively.
    David Bishop, Mar 17, 2005
    #2
    1. Advertising

  3. VHDL_lover

    VHDL_lover Guest

    Thanks for you reply,
    I am using modelsim 4.4 ,When I use this function ,it is giving error.

    May be this is not included in this version ,
    Any other help would be aprreciated.
    thanks
    VHDL_lover, Mar 20, 2005
    #3
    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. Replies:
    0
    Views:
    545
  2. Kevin Spencer

    Re: Simple Simple question!!!

    Kevin Spencer, Jun 25, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    649
    Kevin Spencer
    Jun 25, 2004
  3. Daniel Frey

    Simple Question - Simple Answer?

    Daniel Frey, Dec 28, 2004, in forum: XML
    Replies:
    4
    Views:
    825
    Daniel Frey
    Jan 12, 2005
  4. Oli

    simple simple question

    Oli, Jan 26, 2004, in forum: ASP General
    Replies:
    10
    Views:
    361
    Roland Hall
    Jan 26, 2004
  5. Peter Bailey

    simple, simple array question

    Peter Bailey, Apr 8, 2008, in forum: Ruby
    Replies:
    7
    Views:
    203
    Peter Bailey
    Apr 8, 2008
Loading...

Share This Page