There are a couple of ways of reading/writing floats. One is convert to/from an integer in your code:
f = struct.unpack('f', struct.pack('I', device.read(0x20)))[0]
Alternatively you can cast the entire address space to an array of float and access the registers through that: equivalently
ar = device.mmio.array.view('f')
f = ar[0x8]
Note that in this second way you need use indexes in the array rather than addresses.
You should also do something similar for writing floating point values - .write
will also expect an int so floating point values may be converted to integers rather than written out bit-correctly.
Peter