Non integer results in fault101 step 2

After a lot of playing around I finally found something that would produce regular faults on the fault101 1_2. I used the following parameters with the XMEGA target.

gc.set_range("width", 1, 45)
gc.set_range("offset", 1, 2)
gc.set_range("ext_offset", 0, 200)

The width max could be 15 and the ext_offset could be 75.

Here are the success results:

[{'parameters': (3.125, 1.171875, 64), 'strdesc': None, 'metadata': None}, {'parameters': (3.125, 1.953125, 62), 'strdesc': None, 'metadata': None}, {'parameters': (3.125, 1.953125, 64), 'strdesc': None, 'metadata': None}, {'parameters': (3.90625, 1.171875, 62), 'strdesc': None, 'metadata': None}, {'parameters': (3.90625, 1.171875, 64), 'strdesc': None, 'metadata': None}, {'parameters': (3.90625, 1.953125, 62), 'strdesc': None, 'metadata': None}, {'parameters': (3.90625, 1.953125, 64), 'strdesc': None, 'metadata': None}, {'parameters': (5.078125, 1.171875, 62), 'strdesc': None, 'metadata': None}, {'parameters': (5.078125, 1.953125, 62), 'strdesc': None, 'metadata': None}, {'parameters': (5.859375, 1.171875, 62), 'strdesc': None, 'metadata': None}, {'parameters': (5.859375, 1.953125, 62), 'strdesc': None, 'metadata': None}, {'parameters': (7.03125, 1.171875, 62), 'strdesc': None, 'metadata': None}, {'parameters': (7.03125, 1.953125, 62), 'strdesc': None, 'metadata': None}, {'parameters': (7.8125, 1.171875, 62), 'strdesc': None, 'metadata': None}]

My question is, why are the values floating point and not integers?

It is interesting that the offsets is one of three values and ext_offset is one of two values. Ad the Width get larger in narrows to a single width and ext_offset.

I ran it a second time and the floating point values are the same

Hi,

AFAIK, width and offset are floating point just to make them a slightly nicer representation - in the hardware, they’re actually 8 bit integer values. You can actually see side effects of this when you try doing very small changes to width and offset, as instead of behaving like actual floats, they have a fixed step size of ~0.39, which is 100/256. It’s similar to the power traces captures - in hardware they’re integers, but they get converted in Python to floating point values.

Alex