real numbers or integer to binary in vhdl

Discussion in 'VHDL' started by hari, Apr 23, 2004.

  1. hari

    hari Guest

    hi
    i would like to know how to covert real numbers or integer to 16 bit
    binary in vhdl.do we have any default funtions for that

    thanks
    hariprasath
     
    hari, Apr 23, 2004
    #1
    1. Advertising

  2. Have a look at:
    http://www.eda.org/fphdl/

    Egbert Molenkamp

    "hari" <> schreef in bericht
    news:...
    > hi
    > i would like to know how to covert real numbers or integer to 16 bit
    > binary in vhdl.do we have any default funtions for that
    >
    > thanks
    > hariprasath
     
    Egbert Molenkamp, Apr 23, 2004
    #2
    1. Advertising

  3. Hi Hari,
    If you numeric_std package, you could do:

    my_unsigned := to_unsigned(my_integer, 16);


    You can cast it to a std_logic_vector, if need be.

    HTH,
    Ajeetha,
    http://www.noveldv.com
    Co-Author: Using PSL/SUGAR for Formal and Dynamic Verification 2nd Edition.

    (hari) wrote in message news:<>...
    > hi
    > i would like to know how to covert real numbers or integer to 16 bit
    > binary in vhdl.do we have any default funtions for that
    >
    > thanks
    > hariprasath
     
    Ajeetha Kumari, Apr 23, 2004
    #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. senthil
    Replies:
    5
    Views:
    1,444
    senthil
    Jan 24, 2004
  2. hari
    Replies:
    2
    Views:
    10,126
    Charles Bailey
    May 12, 2004
  3. =?ISO-8859-1?Q?Sch=FCle_Daniel?=

    newbe: how to print integer and real numbers?

    =?ISO-8859-1?Q?Sch=FCle_Daniel?=, Jun 27, 2006, in forum: VHDL
    Replies:
    4
    Views:
    12,486
    =?ISO-8859-1?Q?Sch=FCle_Daniel?=
    Jun 29, 2006
  4. Curious Trigger
    Replies:
    2
    Views:
    1,855
    Curious Trigger
    Sep 9, 2006
  5. canadianJaouk

    VHDL switch in real numbers

    canadianJaouk, Sep 28, 2006, in forum: VHDL
    Replies:
    9
    Views:
    2,985
    Paul Uiterlinden
    Oct 29, 2006
Loading...

Share This Page