Giter VIP home page Giter VIP logo

Comments (6)

jkampitakis avatar jkampitakis commented on July 24, 2024

I am VERY interested in this! Amazing!

from fixedmath.net.

Piedone avatar Piedone commented on July 24, 2024

Glad to hear John! Let me know if you try Hastlayer!

from fixedmath.net.

asik avatar asik commented on July 24, 2024

Do you need any source code changes to achieve this? I'm not sure how I can help. The source code is under a permissive license so you can do whatever you please with it

from fixedmath.net.

Piedone avatar Piedone commented on July 24, 2024

I'm looking through the project. At them time the only issue I see is that Hastlayer doesn't yet support static fields. Nevertheless I started a PoC in this branch: https://github.com/Lombiq/Hastlayer-SDK/commits/issue/HAST-140, see the diff of the work done here: Lombiq/Hastlayer-SDK@dev...issue/HAST-140.

from fixedmath.net.

Piedone avatar Piedone commented on July 24, 2024

I added a PoC implementation after some necessary modifications. What's now transformable into hardware is this implementation: https://github.com/Lombiq/Hastlayer-SDK/blob/issue/HAST-140/Hast.Algorithms/Fix64.cs

The two most notable changes I made is that I got rid of the static fields (not supported by Hastlayer) and applied a workaround temporarily necessary for large hex literals.

Tested various operations and seems to be working alright. This sample that simply sums numbers needs about 106ms on my machine (Core i7, 8 logical cores) with an input of 10000000, 1300ms on a low-end FPGA, This is with purely sequential code (to make FPGAs feasibly the algorithm needs to be massively parallelizable), but still, the FPGA is only 13 times slower with a 32 times lower clock speed (100Mhz vs 3,2Ghz) and most possibly proportionally more power efficient.

With a parallelism of 10 degrees (i.e. 10 threads working in parallel) the same sample takes 264ms on the CPU and still 1300ms on the FPGA. As you can see as we increase the level of parallelism the CPU will get slower of course (if the level of parallelism exceeds the number of cores), the FPGA will stay the same. It's still slower, and this is because more threads won't fit on this low-end FPGA of ours (but we're working on supporting bigger ones).

And thus now FixedMath.Net is the included fixed-point library in Hastlayer.

from fixedmath.net.

asik avatar asik commented on July 24, 2024

Good to know this library was useful to you! I guess this issue can be closed now.

from fixedmath.net.

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.