[Libre-soc-bugs] [Bug 731] potential design oversight in Partitioned SimdSignal Cat/Assign/etc lhs/rhs

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Thu Oct 21 13:09:30 BST 2021


--- Comment #12 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
jacob: you damaged the code by adding in a NotImplemented exception
behind SimdSignal.__Slice__

it is clear that you had not run the unit tests because if you had,
you would have found the error that i just encountered, and fixed
in both PartitionedAssign and PartitionedRepl.

diff --git a/src/ieee754/part_repl/repl.py b/src/ieee754/part_repl/repl.py
index 7347648..05db372 100644
--- a/src/ieee754/part_repl/repl.py
+++ b/src/ieee754/part_repl/repl.py
@@ -73,7 +73,8 @@ class PartitionedRepl(Elaboratable):
         start = keys[upto]
         end = keys[upto+numparts]
         print ("start end", start, end, len(x))
-        return x[start:end]
+        # access the underlying Signal of SimdSignal directly
+        return x.sig[start:end]

     def elaborate(self, platform):
         m = Module()

please ensure that you follow Project Development Practices by always
identifying and running relevant unit tests.

please do not assume "the code is unused therefore it doesnt' matter"
(unless of course it is *actually* not used - including not having
a unit test at all because it's code that's just been added - in which
case Project Development Practices state clearly that it's ok to
change code that's not in use).

in this case, however, given the extensive unit tests, how absolutely
crucial this is, how it is critical path and how much effort has gone
into keeping this code stable (6 months and climbing)
it does *not* qualify as "unused", and *requires* running unit tests.

test_partsig.py at the bare minimum.  visual inspection of each
sub-classes output, and running them to ensure no syntax or runtime
errors is a secondary (but high) priority.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-soc-bugs mailing list