From: Jacob Lifshay <programmerjake@gmail.com>
To: Libre-RISCV General Development <libre-riscv-dev@lists.libre-riscv.org>
Subject: Re: [libre-riscv-dev] div pipe
Date: Sun, 19 Jul 2020 17:32:39 -0700
Message-ID: <CAC2bXD4ipWkR=1Z2hX+=HvMbDwtinhvC7CWgG6GFEsu57j1-Eg@mail.gmail.com> (raw)
In-Reply-To: <CAPweEDz79NiDvrAzFQ9kgMdBu1gX9EgvWY2yLXBR=FAMxU0=Uw@mail.gmail.com>
On Sun, Jul 19, 2020, 15:07 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
wrote:
> On Sunday, July 19, 2020, Jacob Lifshay <programmerjake@gmail.com> wrote:
>
> > What we could do is just revert
> > the bitwidth changes if we want to have working code anyway.
>
>
> well, what i did was, if the configuration (initialisation) requests sqrt
> or rsqrt the bitwidth is set to the 3x
>
yeah, that part's correct as far as I can tell.
the part that's broken is where the width is set to 2x for div-only, since
effectively what's happening is the code is treating the compare_?hs
signals as if the binary value N means the fraction N/2^(3*fract_width)
(essentially fixed-point numbers), so changing the bit width of N without
adjusting the fract_width means there are too few integer bits and too many
fractional bits. additionally, some of the shifts and bit sliced will have
to be adjusted to get the right bits.
>
> no reversion should be needed.
>
except that, last I checked DivPipeCore doesn't correctly do divisions when
configured to only support UDivRem, since that's when it enables the broken
code adjustments.
see the test_bit_width_8_fract_width_4_radix_4[_comb]_div_only test
functions in TestDivPipeCore -- the code only breaks when div-only is
enabled: compare to test_bit_width_8_fract_width_4_radix_4[_comb]
Jacob
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev
next prev parent reply index
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-18 22:18 [libre-riscv-dev] lots of stuff broken Luke Kenneth Casson Leighton
2020-07-19 6:55 ` Jacob Lifshay
2020-07-19 10:46 ` Luke Kenneth Casson Leighton
2020-07-19 21:11 ` Luke Kenneth Casson Leighton
2020-07-19 21:27 ` [libre-riscv-dev] div pipe Jacob Lifshay
2020-07-19 22:07 ` Luke Kenneth Casson Leighton
2020-07-20 0:32 ` Jacob Lifshay [this message]
2020-07-20 1:38 ` Luke Kenneth Casson Leighton
2020-07-20 2:06 ` Jacob Lifshay
2020-07-20 2:13 ` Luke Kenneth Casson Leighton
2020-07-20 3:21 ` Jacob Lifshay
2020-07-20 10:31 ` Luke Kenneth Casson Leighton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAC2bXD4ipWkR=1Z2hX+=HvMbDwtinhvC7CWgG6GFEsu57j1-Eg@mail.gmail.com' \
--to=programmerjake@gmail.com \
--cc=libre-riscv-dev@lists.libre-riscv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Libre RISC-V Mailing list Archives (accessible via public-inbox)
Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev
Example config snippet for mirrors
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git