Commit c1520dd68c78b80259993d36e96f671e3daffd24

Authored by Brice Colombier
1 parent 79fdfe3900
Exists in master

Explicitely compare bits to flip, derived and observed

Showing 1 changed file with 7 additions and 3 deletions

... ... @@ -310,15 +310,19 @@
310 310 def perform_reconciliation(self):
311 311 self.tcl_obj.eval(self.board_manager.reset_boards())
312 312 self.tcl_obj.eval(self.board_manager.generate_response())
313   - print "Before Reconciliation:", response_converter_to_hex(self.server_reference_response)
  313 + server_before = self.server_reference_response
  314 + print "Before Reconciliation:", server_before
314 315 self.server_reference_response = cascade(self.server_reference_response,
315 316 0.02,
316 317 int(self.reconciliation_parameter_number_of_passes_spinbox.get()),
317 318 self.tcl_obj,
318 319 self.board_manager,
319 320 int(self.reconciliation_parameter_initial_block_size_spinbox.get()))
320   - print "After Reconciliation:", response_converter_to_hex(self.server_reference_response)
321   - print "On board:\n", self.tcl_obj.eval(self.board_manager.offload_response())
  321 + server_after = response_converter_to_hex(self.server_reference_response)
  322 + print "After Reconciliation:", server_after
  323 + on_board = response_converter_to_bin_list(self.tcl_obj.eval(self.board_manager.offload_response()))
  324 + print "On board:\n", on_board
  325 + print "Differences: ", [a for (a, (b, c)) in enumerate(zip(server_before, list(reversed(on_board)))) if b != c]
322 326 print ("Reconciliation done")
323 327  
324 328 def reset_board(self):