[libre-riscv-dev] Introduction

Jacob Lifshay programmerjake at gmail.com
Sun Feb 3 07:17:10 GMT 2019


I could write the calculator, shouldn't take very long. It will use
integers for i/o, they will be bitcasted to the fp types. This way we avoid
problems with decimal representations while still being simple enough to
implement since not everything can read/write hex floats (like
0x1234.5678P+25).

Should I use infix notation, lisp-like S expressions, or RPN?
I think we should not use infix notation as it's harder to parse and not as
clear which order operators are being applied.

RPN is the easiest to parse.
S expressions maintain the familiar operation nesting and is second easiest
to parse.

Infix notation:
0x40000000 f32_add_round_to_even 0x40000000 f32_mul_round_to_even 0x3F800000

S expressions:
(f32_add_round_to_even 0x40000000 (f32_mul_round_to_even 0x40000000
0x3F800000))

RPN:
0x40000000 0x40000000 0x3F800000 f32_mul_round_to_even f32_add_round_to_even

Jacob

On Sat, Feb 2, 2019, 22:34 Luke Kenneth Casson Leighton <lkcl at lkcl.net
wrote:

> On Sat, Feb 2, 2019 at 4:49 PM Aleksandar Kostovic
> <alexandar.kostovic at gmail.com> wrote:
> >
> > >
> > > when you're comfortable and have that feeling best described as "a V8
> > > supercharged engine revving at 8000 RPM but the clutch pedal is still
> > > on the floor", do let me know, as there are some preliminary tests,
> > > simulations or self-contained projects that could be done (one being a
> > > modular pipelined IEEE754 ALU)
> >
> >
> > I think i could be ready to start this. Where do we begin?
>
>  ok so i should set up a repo, something boring like ieee754alu, which
> can be used as a submodule.  mainly, we need to set and agree some
> development rules / processes.
>
>  oh, can i suggest looking at the berkeley softfloat library, it seems
> to be a very clear implementation.  a copy is in the riscv-isa-tests,
> see e.g. softfloat/s_addMagsF32.c
>
>  we need to start with something really simple, make sure that there
> are proper unit tests in place, then move forward incrementally.
>
>  although it may sound strange, i'd like to actually *use* the
> softfloat library to do unit tests (as it's been in such prevalent
> use).  create a command-line calculator (c-based) that can be talked
> to via a pipe from python, in order to feed it numbers to calculate,
> that are then compared against the nmigen simulation.
>
> l.
>
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
>


More information about the libre-riscv-dev mailing list