[libre-riscv-dev] IEEE754 FPU turning into ALU with Reservation Stations

Aleksandar Kostovic alexandar.kostovic at gmail.com
Fri Mar 29 14:50:27 GMT 2019


thanks for showing the concern about the readability of the actual code.

> i appreciate that hypothetically, all of the code that's not related
> to fadd, fmul, fdiv etc. could be moved to a separate python module,
> which would greatly reduce the amount of code seen in each of fadd,
> fmul etc. because the normalisation, packing, etc., that's all exactly
> the same.
> this would leave the specialcases and the actual work (mul/div/add) in
> the module, making it more obvious what's going on...

Thats exactly what i had in mind. General stuff done in the separate
modules and operation specific cases done in fmul, fdiv.....

Hopefuly you can work it out since i cant help with the current form :)


On Fri, Mar 29, 2019 at 12:22 AM Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> so i took a look at fmul.py, and compared it to the code in fadd, and,
> aleksander, i absolutely agree with you: it's really *really* hard to
> understand what's going on.
>
> that is officially Not Good (tm).
>
> i think i may have a way to put the Stage/Pipeline API transparently
> behind this:
>
> https://git.libre-riscv.org/?p=ieee754fpu.git;a=blob;f=src/add/pipeline_example.py;hb=HEAD
>
> i appreciate that hypothetically, all of the code that's not related
> to fadd, fmul, fdiv etc. could be moved to a separate python module,
> which would greatly reduce the amount of code seen in each of fadd,
> fmul etc. because the normalisation, packing, etc., that's all exactly
> the same.
>
> this would leave the specialcases and the actual work (mul/div/add) in
> the module, making it more obvious what's going on...
>
> ... i still don't like it.  the reason is: the setup and connectivity
> between stages is sufficiently involved that it's hiding actual code.
> however, SimplePipeline shows that this doesn't have to be the case.
>
> i.e. all the pipeline stage setup can be *completely automated* with
> the right infrastructure.
>
> i just have to work out what that is.
>
> 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