Bug 43 - create an IEEE754 FP "sqrt"
Summary: create an IEEE754 FP "sqrt"
Status: PAYMENTPENDING FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: ALU (including IEEE754 16/32/64-bit FPU) (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- enhancement
Assignee: Aleksandar Kostovic
URL:
: 56 (view as bug list)
Depends on:
Blocks: 48
  Show dependency treegraph
 
Reported: 2019-03-09 05:42 GMT by Luke Kenneth Casson Leighton
Modified: 2020-09-21 02:59 BST (History)
1 user (show)

See Also:
NLnet milestone: NLnet.2019.02
total budget (EUR) for completion of task and all subtasks: 1200
budget (EUR) for this task, excluding subtasks' budget: 1200
parent task for budget allocation: 48
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:
# guessed date for lkcl lkcl={amount=480,paid=2019-08-10} programmerjake={amount=720,paid=2019-08-16}


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2019-03-09 05:42:01 GMT
this to be done using an adaptation (to Base 4) of the binary method:
https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Binary_numeral_system_(base_2)

adaptation to base 4 is 2-bits at a time.  this requires only 3 extra comparators and one extra adder (the adder being used to calculate a multiply by 3).  multiply by 0 is clearly 0.  multiply by 1 is clearly the original. multiply by 2 is a fixed-width shift.  multiply by 3 is an add (of number shifted added to original number).
Comment 2 Luke Kenneth Casson Leighton 2019-04-05 06:40:12 BST
*** Bug 56 has been marked as a duplicate of this bug. ***
Comment 3 Aleksandar Kostovic 2019-04-25 04:57:13 BST
Plan for thr further FPU development:

- create sqrt function
- create test for sqrt function
- run the tests for the whole FPU
Comment 4 Luke Kenneth Casson Leighton 2019-04-25 11:20:14 BST
what i recommend instead is to create a milestone "preliminary
exploratory software emulation of FP SQRT" milestone.

context:
http://lists.libre-riscv.org/pipermail/libre-riscv-dev/2019-April/001221.html
Comment 5 Luke Kenneth Casson Leighton 2019-04-25 11:26:17 BST
(In reply to Aleksandar Kostovic from comment #3)
> Plan for thr further FPU development:
> 
> - create sqrt function
> - create test for sqrt function
> - run the tests for the whole FPU

so if you approve the idea "create preliminary software-only exploratory version"
can you please create a new bugreport, and set its "Blocks" field to 43 (this bug)?

also remember to "take ownership" of the bug, and to set the NLnet milestone field.

i need you to do more of this because i'm getting RSI and it's now very painful to type.
Comment 6 Luke Kenneth Casson Leighton 2019-04-25 20:25:19 BST
> > paper) into python, which we will *need anyway as part of the unit
> > tests*.
> >

> Yes i will convert that code to python.

great.  look fwd to seeing it.  always wanted to impl.
Comment 7 Luke Kenneth Casson Leighton 2019-05-03 02:50:35 BST
Hi Aleksander I moved fsqrt.py to its own subdir, it is still the same filename so use find . -name fsqrt.py ok?
Comment 8 Aleksandar Kostovic 2019-05-03 07:38:59 BST
>Hi Aleksander I moved fsqrt.py to its own >subdir, it is still the same filename so use >find . -name fsqrt.py ok?
Thats fine. Will check it out