From: Jacob Lifshay Date: Fri, 27 Mar 2020 05:34:41 +0000 (-0700) Subject: add simple-soft-float section X-Git-Url: https://git.libre-soc.org/?p=crowdsupply.git;a=commitdiff_plain;h=32c5913e85c174372cfa80b7fb6f12f8531ad00e add simple-soft-float section --- diff --git a/updates/023_2020mar26_decoder_emulator_started.mdwn b/updates/023_2020mar26_decoder_emulator_started.mdwn index 97b7912..a94aa34 100644 --- a/updates/023_2020mar26_decoder_emulator_started.mdwn +++ b/updates/023_2020mar26_decoder_emulator_started.mdwn @@ -22,7 +22,7 @@ Here's the summary (if it can be called a summary): and on a mini-simulator [calling QEMU](https://git.libre-riscv.org/?p=soc.git;a=blob;f=src/soc/simulator/qemu.py;h=9eb103bae227e00a2a1d2ec4f43d7e39e4f44960;hb=56d145e42ac75626423915af22d1493f1e7bb143) for verification. -* Jacob's algorithmic library grows +* Jacob's simple-soft-float library growing [Power FP compatibility](http://bugs.libre-riscv.org/show_bug.cgi?id=258) and python bindings. * A Conference call with OpenPOWER Foundation Director, Hugh, and Timothy @@ -74,9 +74,25 @@ TODO TODO -# Arbitrary IEEE754 Algorithmic Library and POWER FP emulation +# simple-soft-float Library and POWER FP emulation -TODO +The [simple-soft-float](https://salsa.debian.org/Kazan-team/simple-soft-float) library is a floating-point library Jacob wrote with the intention of being a reference implementation of IEEE 754 for hardware testing purposes. It's specifically designed to be written to be easier to understand instead of having the code obscured in pursuit of speed: + + * Being easier to understand helps prevent bugs where the code does not match the IEEE spec. + * It uses the [algebraics](https://salsa.debian.org/Kazan-team/algebraics) library that Jacob wrote since that allows using numbers that behave like exact real numbers, making reasoning about the code simpler. + * It is written in Rust rather than highly-macro-ified C, since that helps with readability since operations aren't obscured, as well as safety, since Rust proves at compile time that the code won't seg-fault unless you specifically opt-out of those guarantees by using `unsafe`. + +It currently supports 16, 32, 64, 128-bit FP for RISC-V, along with having a `DynamicFloat` type which allows dynamically specifying all aspects of how a particular floating-point type behaves -- if one wanted, they could configure it as a 2048-bit floating-point type. + +It also has Python bindings, thanks to the awesome [PyO3](https://pyo3.rs/) library for writing Python bindings in Rust. + +We decided to write simple-soft-float instead of extending the industry-standard [Berkeley softfloat](http://www.jhauser.us/arithmetic/SoftFloat.html) library because of a range of issues, including not supporting Power FP, requiring recompilation to switch which ISA is being emulated, not supporting all the required operations, architectural issues such as depending on global variables, etc. We are still testing simple-soft-float against Berkeley softfloat where we can, however, since Berkeley softfloat is widely used and highly likely to be correct. + +simple-soft-float is [gaining support for Power FP](http://bugs.libre-riscv.org/show_bug.cgi?id=258), which requires rewriting a lot of the status-flag handling code since Power supports a much larger set of floating-point status flags and exceptions than most other ISAs. + +Thanks to RaptorCS for giving us remote access to a Power9 system, since that makes it much easier verifying that the test cases are correct. + +API Docs for stable releases of both [simple-soft-float](https://docs.rs/simple-soft-float) and [algebraics](https://docs.rs/algebraics) are available on docs.rs. # OpenPOWER Conference calls