[libre-riscv-dev] IEEE754 FPU

Jacob Lifshay programmerjake at gmail.com
Sun Feb 17 20:46:58 GMT 2019


On Sun, Feb 17, 2019, 12:32 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
wrote:

> On Monday, February 18, 2019, Aleksandar Kostovic <
> alexandar.kostovic at gmail.com> wrote:
>
> > I have finished the module. Now Luke please go over it and find any
> > mistakes. I left the commented Verilog code for you to see if there is
> > anything that needs to be changed.
>
>
> Cool.
> Ok line 23 to 25, FPNum all need 2nd arg False, just like in div.py, this
> makes the mantissa 24 bit as opposed to 27 bit.
>
> 28, it is product not tot and it needs to be i think 51 bit.
>
> Indentation, 33 to 90 back 8 spaces, 91 back 4, 93 to 98 back 12.
>
> As hendrik says, indents are part of the syntax , you MUST get this right,
> as it is literally a block of code. Put in even one extra space and it is a
> declaration of a DIFFERENT block.
>
>  Will try some tomorrow, 4am at the moment.
>
> Do take a copy of test-add.py call it test_mul.py
>
> Then you can start running things and see whats going on. Remember to
> change the vcd file name output.
>
> L.
>
> Also, what's up with the indentation in python? Getting error messages just
> > because something is not indented properly. For real? Definitely not a
> > language i would like to use outside of migen/nmigen. Also autocompletion
> > FTW! Without it, I would do this for 20% more time at least.
>
>
> Java and javascript as well as c and c++ to a lesser extent all get written
> extremely badly.
>
clang-format to the rescue.
Rust doesn't really have that problem because, unlike most other
programming languages, there is a standard code format that the compiler
will warn about and there is rustfmt.

>
> It is thus near impossible for a developer to be useful immediately as the
> code is not readable. Even coding standards do not help because they are
> different from project to project.
>
> Python is clear as day precisely because you absolutely must use the
> correct same indentation amount in any given block.
>
> There do exist python aware IDEs, I refuse to use them, they slow me down,
> significantly.
>
> vim is the simplest fastest editor i encountered, due to the separation of
> command and edit mode. The keys are actually blindingly obvious, d means
> delete, a for append, i for insert. dd means delete line, w means move
> forward one word, dw means delete one word, etc etc. 9dw means delete 9
> words.  Once memorised it's extremely fast as there is absolutely no need
> whatsoever to coordinate mouse movement or even bother eye tracking the
> cursor.
>

I personally like code-completion and the ability to see definitions of any
identifier by mouse-over or keyboard-shortcut. That allows me to use long
identifiers (where appropriate) that describe exactly what they are without
the typing speed penalty. One other very useful feature is matching error
and warnings from the compiler with there locations in the code as you type.

Jacob


More information about the libre-riscv-dev mailing list