code: def write_core_register(self, reg, data):
          
          regIndex = register_name_to_index(reg)
          # Convert float to int.
          if is_single_float_register(regIndex) and type(data) is float:
              data = conversion.float32_to_u32(data)
          elif is_double_float_register(regIndex) and type(data) is float:
              data = conversion.float64_to_u64(data)
          self.write_core_register_raw(regIndex, data)
docs: write a CPU register.
          Will need to pack floating point register values before writing.