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
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

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

    From: Damjan Lampret<lampret@o...>
    Date: Mon Dec 29 17:20:39 CET 2003
    Subject: [openrisc] FPU
    Top
    Hi All,

    I'm integrating a FPU into OR1200. Openrisc architecture defines FP
    instructions however it doesn't defines some additional results of FP insns.
    For example FP insns can produce the following flags: not a number,
    underflow, overflow, invalid result, infinity, divide by zero etc. Question
    is, should this flags be available to the user or not? If yes, how should
    they be available? Also FPU supports different rounding modes. Two control
    bits can control rounding mode. I see two ways:
    1) SR register
    2) FPU specific SPR

    For result flags I prefer FPU SPR because SR doesn't have to be modified by
    adding these special flags. However to control FPU rounding modes if FPU SPR
    is used, and there are different user applications running that use
    different rounding modes, then FPU SPR would have to be saved by context
    switching code. So in a way using SR for rounding control bits would already
    save FPU rounding mode by current context switching code.... Also should
    some FP result flags cause an exception - for example divide by zero flag?
    Which exception should happen? Also keep in mind that there are probably two
    scenarios: 1) Embedded applications where application software can run also
    in supervisor mode and could easily switch between different rounding modes
    etc. And 2) Linux type of application code where there is a big difference
    between user application code running only in user mode and OS running in
    supervisor mode - in this case user code can or should be able to set
    rounding modes or not - SR can onyl be written in supervisor mode... By the
    way how can application SW under Linux/I386 change rounding modes?

    So what do you think is the best way to incorporate FP support? Remember
    maybe result flags are not needed, and only one rounding mode is enough?

    I copy Stefano who developed the FPU and has a lot of experience with the
    rounding modes etc. I remember Stefano you once told me that only one
    rounding mode is usually used and the other two and rarely used.

    regards,
    Damjan

    Follow upAuthor
    [openrisc] FPUMatt Porter

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