[Libre-soc-dev] SimdSignal library

lkcl luke.leighton at gmail.com
Sat Oct 2 10:50:44 BST 2021


On Sat, Oct 2, 2021 at 3:18 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> On Fri, Oct 1, 2021, 11:56 Jacob Lifshay <programmerjake at gmail.com> wrote:
>>
>> sure! adapting the testing code I just wrote to work with PartitionedSignal should be relatively easy -- mostly accounting for the fact PartitionedSignal can be partitioned more ways since misaligned and non-power-of-two-sized lanes are not excluded (even though those lanes probably aren't very useful for an actual cpu), as well as changing the padding check to always use the no-padding case.
>
>
> Added PartitionedSignalTester:
> https://git.libre-soc.org/?p=ieee754fpu.git;a=commitdiff;h=99b48a366020f8a690452ed08da3117506766345

ok good... except two things:

1) cesar has already written one: so as not to waste effort (and NLnet
funds) when he reminded me of that, i asked if you could check and
work with what he has done, not duplicate effort.

2) you added type information, after i've asked i think about nine or
ten times over the past 2 years not to do that, because the resultant
code is unreadable, longer (more lines), takes up more space, and so
many other things i'm getting very irritated repeating them.

i have said *multiple times*: if you want to add type information *add
it to a separate .pyi file*.

please listen.

i was forced to spend about 15 minutes removing type information,
which is not a fun activity, it is a total waste of my time.

i then also have to do a review, which spends another 15 minutes time
explaining things that i've already explained multiple times, and
isn't fun either.

i managed to complete the removal of type information and introduced
several syntax errors in the process.

in attempting to correct them i couldn't even understand what this is doing:

        self.reference_output_values = {
            lane, tuple(
                inp.sig[lane.translate_to(layout).as_slice()]
                for inp, layout in zip(self.inputs, self.layouts))
            for lane in self.layouts[0].lanes()
        }

if i've been using python for 21 years and can't interpret that, it's
a bad sign.

there's no code comments - at all - so i have absolutely no idea what
the code is doing.

if i don't know what the code's doing, i can't even make a guess at
how to fix it.


> I completely ported it to work with PartitionedSignal for both sim/formal, but ran out of time after adding tests that just check the identity function for PartitionedSignal.
>
> I'll start adding tests for addition and stuff after the weekend.

great.

please.

WITHOUT adding type information to the actual .py file. it will only
piss me off.

if you absolutely insist on having it, add it to a .pyi file.  please.

l.



More information about the Libre-soc-dev mailing list