1- From the notebook:
# these are the clock cycles for which we sum the power measurement
# for positive numbers, we add the power measurement at that clock cycle;
# for negative numbers, we substract the power measurement at abs(clock cycle).
poi = [4202, -6, 7]
If you zoom on the difference of averages plot (just before “bingo!” in the notebook), you should see something like this:
We see a significant difference between the averages at cycles 6 and 7. Now if we were to add the two power measurements from cycle 6 and 7, they would almost cancel each other out, and this wouldn’t be very helpful towards picking out the difference between a k bit = 1 versus a k bit = 0.
We’re trying to build a metric that best distinguishes 1’s from 0’s. So the -6, 7 (and 4202) numbers aren’t magical – they are just what the difference of means plot reveal to be where a 1 differs from a 0. And that is the significance of this metric.
The cycle index’s sign is accounted for by
def get_sums() here:
power = trace.wave[c+abs(i)]
if i < 0:
sum -= power
sum += power
2- If you look in the next cell where corrx, corry and corrz are computed, you’ll find that the correlations are computed over trace segments of
rupdate_cycles clock cycles. We set this to 8 because the x, y, z coordinates are each read or written over 8 clock cycles (256-bit numbers into a 32-bit wide memory). I’ll update the notebook to clarify this!