Method inlining, fixed point arithmetic and more - Hastlayer v1.0.8 released

Method inlining, fixed point arithmetic and more - Hastlayer v1.0.8 released

Tags: Release, Method inlinding, Fixed-point arithmetic

New year, new Hastlayer version - and we think this one is quite exciting, a lot of improvements arrived! Let's see the highlights:

  • Hastlayer now supports method inlining. Method inlining is when a compiler basically copies the implementation of the method to the place where it's called, thus avoiding the overhead of a method call but making the program bigger. We've added support for the AggressiveInlining attribute so you can instruct Hastlayer to inline methods, just as you'd do the same with the .NET compiler. Since method calls in hardware are also an overhead you can vastly improve the performance of your Hastlayer-using code if it contains many small methods that are frequently called. In our tests with the posit floating point type we cut down execution time by about 40%!

  • Added a 64b fixed-point arithmetic library and made it Hastlayer-compatible. Why is this good? Although making computations with integers is very efficient (and fast), sometimes you need to use fractions. Before the only option with Hastlayer was to scale up your floating point numbers (multiplying them by 10000 for example so there will be no digits after the decimal point), let Hastlayer do the work, then scale them back down. But now we added a 64b number type that can also handle fractions, it's just that there are 31 bits for the digits before the decimal point and 32 bits for the ones after it. But still, the computations will be quite efficient. Nevertheless we're also working on floating point support.
  • Added support for ref and out parameters and made configuration of parallelized code a bit easier.

So Hastlayer just got a lot better for a lot of programs!

For more details and the corresponding downloads visit the Hastlayer SDK and Hastlayer Hardware Framework - Xilinx repos on GitHub. Be sure to also check out the updated documentation on how to utilize these new features.