Unofficial Hacker News client - receive Push Notifications on replies.

Beating Floating Point at Its Own Game: Posit Arithmetic [pdf] (opens external site)

100 points by xenophonf 2 days ago | www.johngustafson.net | 33 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (1)

  1. Here is some hacked up julia 0.5 that generates verilog for add:

    https://github.com/interplanetary-robot/mullinengine/blob/ma...

    and multiply:

    https://github.com/interplanetary-robot/mullinengine/blob/ma...

    Here is an example generated verilog files:

    https://github.com/interplanetary-robot/mullinengine/blob/ma...

    You may find the handcrafted "circ" files more useful.

    https://github.com/interplanetary-robot/mullinengine/blob/ma...

    https://github.com/interplanetary-robot/mullinengine/blob/ma...

    This was the julia library I wrote to be able to output verilog from julia. In the case of the posit math, it's verified by compiling with verlator, and doing a comprehensive (256 x 256 8-bit) scan comparing the emitted C-abi .so file, the wire values from verilog.jl, soft-values from the SigmoidNumbers package, the "true" value.

    https://github.com/interplanetary-robot/Verilog.jl