@@ -102,9 +102,9 @@ wire eqne = (generic_cmp_opc_i == GENERIC_SFEQ) |
102
102
(generic_cmp_opc_i == GENERIC_SFNE);
103
103
104
104
// Comparison is invalid if:
105
- // 1) sNaN is an operand of ordered/unordered EQ/NE comparison
105
+ // 1) sNaN is an operand of any comparison
106
106
// 2) NaN is an operand of ordered LT/LE/GT/GE comparison
107
- wire inv_cmp = (eqne & snan) | ((~ eqne) & anan & (~ unordered_cmp_bit_i));
107
+ wire inv_cmp = snan | ((~ eqne) & anan & (~ unordered_cmp_bit_i));
108
108
109
109
110
110
// //////////////////////////////////////////////////////////////////////
@@ -383,16 +383,7 @@ assign ready_o = fpu_op_is_comp_i;
383
383
384
384
if (fpu_op_is_comp_i) begin
385
385
assert (cmp_flag_o == f_cmp_flag);
386
- `ifndef PFPU32_FCMP_SNAN_BUG
387
- // XXX inv_o diverges from expected behaviour when sNaN is passed to
388
- // sfult, sfule, sfugt, or sfuge.
389
- if (~ (f_have_snan & unordered_cmp_bit_i
390
- & (generic_cmp_opc_i == GENERIC_SFLT
391
- | generic_cmp_opc_i == GENERIC_SFLE
392
- | generic_cmp_opc_i == GENERIC_SFGT
393
- | generic_cmp_opc_i == GENERIC_SFGE)))
394
- `endif // PFPU32_FCMP_SNAN_BUG
395
- assert (inv_o == f_have_inv);
386
+ assert (inv_o == f_have_inv);
396
387
assert (inf_o == f_have_inf);
397
388
end
398
389
end
0 commit comments