real to std_logic_vector conversion

Discussion in 'VHDL' started by vivo_m, Feb 23, 2012.

  1. vivo_m

    vivo_m

    Joined:
    Feb 23, 2012
    Messages:
    3
    Hi,

    any idea how can i convert from real to std_logic_vector and vise versa..??
     
    vivo_m, Feb 23, 2012
    #1
    1. Advertising

  2. vivo_m

    jeppe

    Joined:
    Mar 10, 2008
    Messages:
    348
    Location:
    Denmark
    Hi

    Try typecast like integer1 := conv_integer( std_logic_vec1);
    real1 := real( integer1);

    integer2 := integer( real2);
    std_vec2 := conv_std_logic_vector( integer2, 16);
     
    jeppe, Feb 23, 2012
    #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. eneko
    Replies:
    2
    Views:
    3,025
    eneko
    Oct 20, 2004
  2. eNo
    Replies:
    2
    Views:
    16,319
    Hubble
    Aug 9, 2005
  3. jing
    Replies:
    1
    Views:
    4,474
    Mike Treseler
    May 17, 2006
  4. Thomas Rouam
    Replies:
    6
    Views:
    1,190
  5. GeekWizard
    Replies:
    0
    Views:
    986
    GeekWizard
    May 8, 2008
Loading...

Share This Page