Checking correctness of hardware result