[Libre-soc-dev] All div pipe tests pass

Luke Kenneth Casson Leighton lkcl at lkcl.net
Wed Oct 7 20:34:26 BST 2020

On 10/7/20, Jacob Lifshay <programmerjake at gmail.com> wrote:
> On Wed, Oct 7, 2020, 05:22 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> wrote:
>> On Wed, Oct 7, 2020 at 6:00 AM Jacob Lifshay <programmerjake at gmail.com>
>> wrote:
>> >
>> > On Tue, Oct 6, 2020 at 9:42 PM Luke Kenneth Casson Leighton
>> > <lkcl at lkcl.net> wrote:
>> > >
>> > > On 10/7/20, Jacob Lifshay <programmerjake at gmail.com> wrote:
>> > > > I got all the div fu tests to pass by fixing the ISA spec and fixing
>> > > > the one bug I found in the div fu.
>> > >
>> > > briiiliant.
>> > >
>> > > that's good in two ways because we can propose the pseudocode for a
>> v3.0C spec.
>> >
>> > Still need to convert all `undefined` references in those instructions
>> > to 0 bits though.
>> i "solved" that one by (in the simulator) defining the variable
>> "undefined" to 0b00000000000000000000000000000000...
>> proposing to OPF two inter-related things at once is probably not a
>> good idea.  they should really be separate discussions, not least
>> because the variable named "undefined" is used in multiple places.
> My plan for div is to just remove references to undefined, not removing the
> definition of undefined.

yes, that's what i expected, and it implies two things when submitted to OPF:

1) a new pseudocode ("accurate" rather than "guess what it means by
reading the accompanying text")

2) we also *at the same time* demand / request / propose removal of "undefined".

doing these both at the same time is not a good idea and would be
exactly what we would be requesting if we submit pseudocode that does
not have "undefined" in it.

the ISA WG would quite reasonably reject (1) precisely because we had
included (2).

they would also very reasonably ask "why on earth are you confusing
these two completely separate issues"

we need to keep them separate and until they have made a decision
"undefined" being set to 0b000.... allows us to have a working

>> that said, we need to be prepared to have the discussion where someone
>> brings it up.
> yeah, though basically the only part that would functionally change in the
> ISA spec is the undefined issue,

and that really does need to be a completely separate discussion, as a
completely separate thread, absolutely nothing to do with (1)

> the other spec bugs were all on our side:
> mistranslating the overflow conditions into code, using the wrong division
> op, etc.

the reason why the new pseudocode was written is not because what *we*
wrote contained mistakes, it was written because the official v3.0B
spec pseudocode is hopelessly wrong, incomplete and ambiguous.

it is a divide, but oh err actually if the inputs were this then err
actually the output is something different? this is total nonsense.

oh and err it's a divide, but err actually we really meant it's a
signed divide in this case but an unsigned one in that?


now, if we then say "ah and in addition to this we ALSO propose
replacing undefined with zero" that's far too much.

one thing at a time.


More information about the Libre-soc-dev mailing list