Skip to content

Commit

Permalink
🔖 Release 0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Mach committed Jun 2, 2019
2 parents c0826db + 94ff400 commit 120f7f5
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,18 @@ Versions of the IP in the same major relase are "pin-compatible" with each other


## [Unreleased]

### Added
### Changed
### Fixed


## [0.5.5] - 2019-06-02

### Fixed
- UF flag handling according to IEEE754-2008 (#11)


## [0.5.4] - 2019-06-02

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/fpnew_cast_multi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ module fpnew_cast_multi #(
end

// Classification after rounding select by destination format
assign uf_after_round = fmt_uf_after_round[dst_fmt_q2] & ~result_true_zero; // zero is not UF
assign uf_after_round = fmt_uf_after_round[dst_fmt_q2];
assign of_after_round = fmt_of_after_round[dst_fmt_q2];

// Negative integer result needs to be brought into two's complement
Expand Down Expand Up @@ -669,7 +669,7 @@ module fpnew_cast_multi #(
NV: src_is_int_q & (of_before_round | of_after_round), // overflow is invalid for I2F casts
DZ: 1'b0, // no divisions
OF: ~src_is_int_q & (~info_q2.is_inf & (of_before_round | of_after_round)), // inf casts no OF
UF: uf_after_round,
UF: uf_after_round & fp_regular_status.NX,
NX: src_is_int_q ? (| fp_round_sticky_bits) // overflow is invalid in i2f
: (| fp_round_sticky_bits) | (~info_q2.is_inf & (of_before_round | of_after_round))
};
Expand Down
2 changes: 1 addition & 1 deletion src/fpnew_f2fcast.sv
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ module fpnew_f2fcast #(
NV: 1'b0, // only valid cases are handled in regular path
DZ: 1'b0, // no divisions
OF: ~info_a.is_inf & (of_before_round | of_after_round), // rounding can introduce new overflow
UF: uf_after_round, // true zero results don't count as underflow
UF: uf_after_round & regular_status.NX, // only inexact results raise UF
NX: (| round_sticky_bits) | (~info_a.is_inf & (of_before_round | of_after_round))
};

Expand Down
2 changes: 1 addition & 1 deletion src/fpnew_fma.sv
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ module fpnew_fma #(
NV: 1'b0, // only valid cases are handled in regular path
DZ: 1'b0, // no divisions
OF: of_before_round | of_after_round, // rounding can introduce new overflow
UF: uf_after_round & ~result_zero, // true zero results don't count as underflow
UF: uf_after_round & regular_status.NX, // only inexact results raise UF
NX: (| round_sticky_bits) | of_before_round | of_after_round // RS bits mean loss in precision
};

Expand Down
4 changes: 2 additions & 2 deletions src/fpnew_fma_multi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ module fpnew_fma_multi #(
end

// Classification after rounding select by destination format
assign uf_after_round = fmt_uf_after_round[dst_fmt_q2] & ~result_zero; // zero is not UF
assign uf_after_round = fmt_uf_after_round[dst_fmt_q2];
assign of_after_round = fmt_of_after_round[dst_fmt_q2];


Expand All @@ -757,7 +757,7 @@ module fpnew_fma_multi #(
NV: 1'b0, // only valid cases are handled in regular path
DZ: 1'b0, // no divisions
OF: of_before_round | of_after_round, // rounding can introduce new overflow
UF: uf_after_round & ~result_zero, // true zero results don't count as underflow
UF: uf_after_round & regular_status.NX, // only inexact results raise UF
NX: (| round_sticky_bits) | of_before_round | of_after_round // RS bits mean loss in precision
};

Expand Down

0 comments on commit 120f7f5

Please sign in to comment.