LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cores > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: "Jim Dempsey" <tapedisk@a...>
    Date: Fri, 15 Aug 2003 12:14:19 -0500
    Subject: Re: [oc] How to convert integer to single precision floating point
    Top

    The easest way is to copy the 32-bit number into the Mantissa (the number
    part) and then set the exponent to 32. The resultant number is not
    normalized but this should not present you with a problem. On next
    compuation the result will be normalized. If there is a possibility that
    this technique would result in a roundoff error (it shouldn't as there is no
    real fraction) then processing section (in the C code that may be running
    inside or outside your FPGA) do something seemingly benign
    
        float result = *yourFPresult + 0.;
    
    Requires compiler optimizatons are off.
    
    Jim
    
    
    
    
    
    ----- Original Message -----
    From: <l.huang@i...>
    To: <cores@o...>
    Sent: Friday, August 15, 2003 9:59 AM
    Subject: [oc] How to convert integer to single precision floating point
    
    
    > Hello everyone,
    >
    > I'm working on a logic unit design.  I run into a problem. After
    > computation, I get a 32-bit binary integer number. Now I need to
    > convert it into single precision floating point number. Is there
    > anyone familiar with how to do? Please tell me the procedure of logic
    > design of this part. Thank you very much for your help, and waiting
    > for your response.
    >
    > Linjia
    > 
    
    
    
    

    ReferenceAuthor
    [oc] How to convert integer to single precision floating pointL huang

    Follow upAuthor
    Re: [oc] How to convert integer to single precision floating pointRudolf Usselmann

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.