diff --git a/README.md b/README.md index b1d323a2..7bcb9ee0 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Multiple integer formats with arbitrary number of bits (as source or destionatio - Conversions between FP formats and integers (signed & unsigned) and vice versa - Classification -Multi-format FMA operations (i.e. multiplication in one format, accumulation in another) are optionally supported. +Multi-format FMA operations (i.e. multiplication in one format, accumulation in another) are optionally supported. Optionally, *packed-SIMD* versions of all the above operations can be generated for formats narrower than the FPU datapath width. E.g.: Support for double-precision (64bit) operations and two simultaneous single-precision (32bit) operations. @@ -137,3 +137,11 @@ Furthermore, this repository tries to adhere to [SemVer](https://semver.org/), a ## Licensing FPnew is released under the *SolderPad Hardware License*, which is a permissive license based on Apache 2.0. Please refer to the [license file](LICENSE) for further information. + +## Acknowledgement + +This project has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 732631. + +For further information, visit [oprecomp.eu](http://oprecomp.eu). + +![OPRECOMP](docs/fig/oprecomp_logo_inline1.png) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bcbb290a..701a7d37 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -14,6 +14,15 @@ Versions of the IP in the same major relase are "pin-compatible" with each other ### Changed ### Fixed +## [0.6.2] - 2020-06-02 + +### Changed +- Number of pipeline registers in multi-format units is the maximum of all contained formats instead of the first format marked `MERGED` + +### Fixed +- Typo in changelog +- Missing type cast breaking simulation in VCS [(#24)](https://github.com/pulp-platform/fpnew/issues/24) + ## [0.6.1] - 2019-07-10 @@ -34,7 +43,7 @@ Versions of the IP in the same major relase are "pin-compatible" with each other - Various linter warnings - Documentation to reflect on updated pipeline distribution order - [fpu_div_sqrt_mvp] Bumped to fix linter warnings -- [Bender] Fixed dependencies for Bender [(#14)](https://github.com/pulp-platform/fpnew/pull/15) +- [Bender] Fixed dependencies for Bender [(#15)](https://github.com/pulp-platform/fpnew/pull/15) ### Removed - Currently unused modules: `fpnew_pipe*`, `fpnew_{f2i,f2f,i2f}_cast` diff --git a/docs/fig/oprecomp_logo_inline1.png b/docs/fig/oprecomp_logo_inline1.png new file mode 100644 index 00000000..f1bc78bc Binary files /dev/null and b/docs/fig/oprecomp_logo_inline1.png differ diff --git a/src/fpnew_cast_multi.sv b/src/fpnew_cast_multi.sv index e21cc368..9d54c79e 100644 --- a/src/fpnew_cast_multi.sv +++ b/src/fpnew_cast_multi.sv @@ -441,7 +441,7 @@ module fpnew_cast_multi #( // Handle FP over-/underflows end else begin // Overflow or infinities (for proper rounding) - if ((destination_exp_q >= 2**fpnew_pkg::exp_bits(dst_fmt_q2)-1) || + if ((destination_exp_q >= signed'(2**fpnew_pkg::exp_bits(dst_fmt_q2))-1) || (~src_is_int_q && info_q.is_inf)) begin final_exp = unsigned'(2**fpnew_pkg::exp_bits(dst_fmt_q2)-2); // largest normal value preshift_mant = '1; // largest normal value and RS bits set diff --git a/src/fpnew_opgroup_block.sv b/src/fpnew_opgroup_block.sv index b9daeeb7..637e85f6 100644 --- a/src/fpnew_opgroup_block.sv +++ b/src/fpnew_opgroup_block.sv @@ -153,6 +153,7 @@ module fpnew_opgroup_block #( if (fpnew_pkg::any_enabled_multi(FmtUnitTypes, FpFmtMask)) begin : gen_merged_slice localparam FMT = fpnew_pkg::get_first_enabled_multi(FmtUnitTypes, FpFmtMask); + localparam REG = fpnew_pkg::get_num_regs_multi(FmtPipeRegs, FmtUnitTypes, FpFmtMask); logic in_valid; @@ -164,7 +165,7 @@ module fpnew_opgroup_block #( .FpFmtConfig ( FpFmtMask ), .IntFmtConfig ( IntFmtMask ), .EnableVectors ( EnableVectors ), - .NumPipeRegs ( FmtPipeRegs[FMT] ), + .NumPipeRegs ( REG ), .PipeConfig ( PipeConfig ), .TagType ( TagType ) ) i_multifmt_slice ( diff --git a/src/fpnew_pkg.sv b/src/fpnew_pkg.sv index 734ca96b..6065054f 100644 --- a/src/fpnew_pkg.sv +++ b/src/fpnew_pkg.sv @@ -470,4 +470,15 @@ package fpnew_pkg; return fp_format_e'(0); endfunction + // Returns the largest number of regs that is active and is set as MERGED + function automatic int unsigned get_num_regs_multi(fmt_unsigned_t regs, + fmt_unit_types_t types, + fmt_logic_t cfg); + automatic int unsigned res = 0; + for (int unsigned i = 0; i < NUM_FP_FORMATS; i++) begin + if (cfg[i] && types[i] == MERGED) res = maximum(res, regs[i]); + end + return res; + endfunction + endpackage