File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,18 @@ Versions of the IP in the same major relase are "pin-compatible" with each other
9
9
10
10
11
11
## [ Unreleased]
12
+
12
13
### Added
13
14
### Changed
14
15
### Fixed
15
16
16
17
18
+ ## [ 0.5.5] - 2019-06-02
19
+
20
+ ### Fixed
21
+ - UF flag handling according to IEEE754-2008 (#11 )
22
+
23
+
17
24
## [ 0.5.4] - 2019-06-02
18
25
19
26
### Added
Original file line number Diff line number Diff line change @@ -557,7 +557,7 @@ module fpnew_cast_multi #(
557
557
end
558
558
559
559
// Classification after rounding select by destination format
560
- assign uf_after_round = fmt_uf_after_round[dst_fmt_q2] & ~ result_true_zero; // zero is not UF
560
+ assign uf_after_round = fmt_uf_after_round[dst_fmt_q2];
561
561
assign of_after_round = fmt_of_after_round[dst_fmt_q2];
562
562
563
563
// Negative integer result needs to be brought into two's complement
@@ -669,7 +669,7 @@ module fpnew_cast_multi #(
669
669
NV : src_is_int_q & (of_before_round | of_after_round), // overflow is invalid for I2F casts
670
670
DZ : 1'b0 , // no divisions
671
671
OF : ~ src_is_int_q & (~ info_q2.is_inf & (of_before_round | of_after_round)), // inf casts no OF
672
- UF : uf_after_round,
672
+ UF : uf_after_round & fp_regular_status. NX ,
673
673
NX : src_is_int_q ? (| fp_round_sticky_bits) // overflow is invalid in i2f
674
674
: (| fp_round_sticky_bits) | (~ info_q2.is_inf & (of_before_round | of_after_round))
675
675
} ;
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ module fpnew_f2fcast #(
319
319
NV : 1'b0 , // only valid cases are handled in regular path
320
320
DZ : 1'b0 , // no divisions
321
321
OF : ~ info_a.is_inf & (of_before_round | of_after_round), // rounding can introduce new overflow
322
- UF : uf_after_round, // true zero results don't count as underflow
322
+ UF : uf_after_round & regular_status. NX , // only inexact results raise UF
323
323
NX : (| round_sticky_bits) | (~ info_a.is_inf & (of_before_round | of_after_round))
324
324
} ;
325
325
Original file line number Diff line number Diff line change @@ -616,7 +616,7 @@ module fpnew_fma #(
616
616
NV : 1'b0 , // only valid cases are handled in regular path
617
617
DZ : 1'b0 , // no divisions
618
618
OF : of_before_round | of_after_round, // rounding can introduce new overflow
619
- UF : uf_after_round & ~ result_zero , // true zero results don't count as underflow
619
+ UF : uf_after_round & regular_status. NX , // only inexact results raise UF
620
620
NX : (| round_sticky_bits) | of_before_round | of_after_round // RS bits mean loss in precision
621
621
} ;
622
622
Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ module fpnew_fma_multi #(
741
741
end
742
742
743
743
// Classification after rounding select by destination format
744
- assign uf_after_round = fmt_uf_after_round[dst_fmt_q2] & ~ result_zero; // zero is not UF
744
+ assign uf_after_round = fmt_uf_after_round[dst_fmt_q2];
745
745
assign of_after_round = fmt_of_after_round[dst_fmt_q2];
746
746
747
747
@@ -757,7 +757,7 @@ module fpnew_fma_multi #(
757
757
NV : 1'b0 , // only valid cases are handled in regular path
758
758
DZ : 1'b0 , // no divisions
759
759
OF : of_before_round | of_after_round, // rounding can introduce new overflow
760
- UF : uf_after_round & ~ result_zero , // true zero results don't count as underflow
760
+ UF : uf_after_round & regular_status. NX , // only inexact results raise UF
761
761
NX : (| round_sticky_bits) | of_before_round | of_after_round // RS bits mean loss in precision
762
762
} ;
763
763
You can’t perform that action at this time.
0 commit comments