[Libre-soc-dev] clamping/saturation semantics
programmerjake at gmail.com
Fri Dec 11 21:37:47 GMT 2020
On Fri, Dec 11, 2020, 13:29 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> On 12/11/20, Jacob Lifshay <programmerjake at gmail.com> wrote:
> > mv.swizzle would be a 1 src 1 dest op.
> this is probably a good idea to have regardless of whether svp64 has it.
> > I think you might misunderstand:
> probably :)
> > from what I recall from playing around with audio code,
> > the operation required would be the following translated to a sequence
> of 1
> > or more instructions:
> > read inputs at src size
> > scale to account for src/dest size mismatch // if src size==dest size,
> > step isn't needed
> > perform arith at higher precision
> > clamp result to dest size // not src size, not any other size
> > write result to dest
> ok so in that context, how critical would it be to have separate
> mv.saturate ops
I think we'd want these either way.
> arith.saturate being able to specify a saturation depth less than that
> of the arithmetic operation elwidth
I've never heard of an ISA that saturates to a different size than the dest
size, so I'd expect it to be mostly unused.
that said, having an op with different src and dest sizes could be quite
More information about the Libre-soc-dev