Commit 5797c966eb73d43d3059bb0677e44fe47f68992f

Authored by Brice Colombier
1 parent c1520dd68c
Exists in master

Add further bit comparisons before/after/on_board

Showing 2 changed files with 9 additions and 6 deletions

CASCADE/cascade.py View file @ 5797c96
... ... @@ -48,7 +48,6 @@
48 48 block_size *= 2
49 49 block_size_increased = True
50 50 print "Block size:", block_size
51   - print "Response on board:", tclsh.eval(board_manager.offload_response())
52 51 reference_response_indexed = zip(indices, reference_response)
53 52 if passe > 0:
54 53 rd.shuffle(reference_response_indexed)
... ... @@ -311,18 +311,22 @@
311 311 self.tcl_obj.eval(self.board_manager.reset_boards())
312 312 self.tcl_obj.eval(self.board_manager.generate_response())
313 313 server_before = self.server_reference_response
314   - print "Before Reconciliation:", server_before
  314 + on_board = response_converter_to_bin_list(self.tcl_obj.eval(self.board_manager.offload_response()))
  315 + print on_board
315 316 self.server_reference_response = cascade(self.server_reference_response,
316 317 0.02,
317 318 int(self.reconciliation_parameter_number_of_passes_spinbox.get()),
318 319 self.tcl_obj,
319 320 self.board_manager,
320 321 int(self.reconciliation_parameter_initial_block_size_spinbox.get()))
321   - server_after = response_converter_to_hex(self.server_reference_response)
322   - print "After Reconciliation:", server_after
  322 + server_after = self.server_reference_response
323 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]
  324 + print server_before
  325 + print server_after
  326 + print on_board
  327 + print "Differences before/on_board: ", [a for (a, (b, c)) in enumerate(zip(server_before, list(reversed(on_board)))) if b != c]
  328 + print "Differences after/on_board: ", [a for (a, (b, c)) in enumerate(zip(server_after, list(reversed(on_board)))) if b != c]
  329 + print "Differences before/after: ", [a for (a, (b, c)) in enumerate(zip(server_before, server_after)) if b != c]
326 330 print ("Reconciliation done")
327 331  
328 332 def reset_board(self):