Giter VIP home page Giter VIP logo

Comments (1)

dawsonjon avatar dawsonjon commented on July 17, 2024 3

Hi,

The restoring division algorithm is used in this core. I expect that some processors do use the restoring division algorithm, however there are more computationally efficient methods such as SRT (as in the famous Pentium bug) and Newton's method. These algorithms take approximately half the number of iterations to achieve the same precision. The multiplication uses the hard multiplier blocks in the FPGA.

My aim was to prioritise area over speed in this library, because floating point operations can consume rather a lot of real estate in FPGA fabric. For example division is achieved by performing repeated shifts and subtracts, in this core the same shift and subtract logic are reused for each iteration of the algorithm. This means that each division takes ~100 cycles, but uses about 1/50th of the logic that a pipelined implementation would use. There is still room for improvement, but this was a pretty reasonable trade-off in my original application.

If you are interested in a high-performance implementation of floating point operations why not check out https://github.com/dawsonjon/verilog-math this contains fully pipelined implementations of multiply, divide and square root among others. In this implementation the single precision divider has a latency of 36 clock cycles, but has a throughput rate of 1 operation per clock cycle. The design should be good for a few hundred MHz in a modern FPGA.

Jon

from fpu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.