[Libre-soc-bugs] [Bug 716] PartitionedSignal Slice and Part needed for __getitem__

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Oct 15 09:10:36 BST 2021


--- Comment #6 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Jacob Lifshay from comment #5)
> (In reply to Luke Kenneth Casson Leighton from comment #3)
> > (In reply to Jacob Lifshay from comment #2)
> > > I think we also need something to handle stuff like:
> > > a[3:5].eq(b)
> > > since assigning to a slice is quite common.
> > 
> > this should work automatically because (i forgot to
> > emphasise) the return result from the submodule
> > (which is then a return result of SimdSignal.Slice/Part,
> > which in turn is then a return result of Value.__getitem__)
> > must be *another SimdSignal*.
> That operators need to return SimdSignals is totally obvious to me...

actually, now that I think about it, Slice and Cat and Part have to return a
SimdValue, not a SimdSignal, since otherwise a[5].eq(b) will assign to the
signal that is a result of slicing, but the assignment won't propagate back to
`a` since it won't know where to propagate to.

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

More information about the libre-soc-bugs mailing list