<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:14pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Yes, I think you are right.</p>
<p><br>
</p>
<div id="x_Signature">
<div style="font-family:Tahoma; font-size:13px"></div>
</div>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> subexp-daq <subexp-daq-bounces@lists.chalmers.se> im Auftrag von Håkan T Johansson <f96hajo@chalmers.se><br>
<b>Gesendet:</b> Freitag, 22. März 2024 17:37:42<br>
<b>An:</b> Discuss use of Nurdlib, TRLO II, drasi and UCESB.<br>
<b>Betreff:</b> Re: [subexp-daq] SIS3316 implementation in NURDLIB fixed</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText"><br>
Dear Günter,<br>
<br>
just had a quick look:<br>
<br>
This old code with +1 is surely not good:<br>
<br>
                bytes_to_read =<br>
                    ((a_words_to_read * sizeof(uint32_t)) + 1) & ~0x7;<br>
<br>
Since sizeof(uint32_t) is 4, the addition of 1 would not have any effect.<br>
<br>
However, I'm a bit wondering about addint 8 (and 16 in the case of ~0xf).<br>
<br>
How about the following:<br>
<br>
                bytes_to_read =<br>
                    ((a_words_to_read * sizeof(uint32_t)) + 0x7) & ~0x7;<br>
<br>
(and '+ 0xf' with '& ~0xf') ?<br>
<br>
That ought to bring it up to the next boundary if the read count was <br>
unaligned.  And the if-statements would not be needed.<br>
<br>
Cheers,<br>
Håkan<br>
<br>
<br>
<br>
<br>
On Fri, 22 Mar 2024, Weber, Guenter Dr. wrote:<br>
<br>
> <br>
> Dear friends,<br>
> <br>
> <br>
> we just pushed a fixed version of the SIS3316 implementation. Compared to<br>
> the original version of REBASING_SIS3316 a lot of glitches in the code were<br>
> fixed in a first run a few days ago and now we finally also fixed a<br>
> long-standing problem with the readout of the averaged traces.<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> Best greetings and have a nice weekend everybody<br>
> <br>
> Günter<br>
> <br>
> <br>
> <br>
> <br>
> <br>
></div>
</span></font>
</body>
</html>