[subexp-daq] SIS3316 implementation in NURDLIB fixed

Weber, Guenter Dr. g.weber at hi-jena.gsi.de
Fri Mar 22 23:01:29 CET 2024


Yes, I think you are right.


________________________________
Von: subexp-daq <subexp-daq-bounces at lists.chalmers.se> im Auftrag von Håkan T Johansson <f96hajo at chalmers.se>
Gesendet: Freitag, 22. März 2024 17:37:42
An: Discuss use of Nurdlib, TRLO II, drasi and UCESB.
Betreff: Re: [subexp-daq] SIS3316 implementation in NURDLIB fixed


Dear Günter,

just had a quick look:

This old code with +1 is surely not good:

                bytes_to_read =
                    ((a_words_to_read * sizeof(uint32_t)) + 1) & ~0x7;

Since sizeof(uint32_t) is 4, the addition of 1 would not have any effect.

However, I'm a bit wondering about addint 8 (and 16 in the case of ~0xf).

How about the following:

                bytes_to_read =
                    ((a_words_to_read * sizeof(uint32_t)) + 0x7) & ~0x7;

(and '+ 0xf' with '& ~0xf') ?

That ought to bring it up to the next boundary if the read count was
unaligned.  And the if-statements would not be needed.

Cheers,
Håkan




On Fri, 22 Mar 2024, Weber, Guenter Dr. wrote:

>
> Dear friends,
>
>
> we just pushed a fixed version of the SIS3316 implementation. Compared to
> the original version of REBASING_SIS3316 a lot of glitches in the code were
> fixed in a first run a few days ago and now we finally also fixed a
> long-standing problem with the readout of the averaged traces.
>
>
>
>
>
> Best greetings and have a nice weekend everybody
>
> Günter
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.chalmers.se/pipermail/subexp-daq/attachments/20240322/de6051b8/attachment.html>


More information about the subexp-daq mailing list