diff --git a/README.md b/README.md index e261e7b..4d99bf5 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ All IEEE 754-2008 status flags are supported, namely ### Dependencies FPnew currently depends on the following: -- `lzc` and `rr_arb_tree` from the `common_cells` repository (https://github.com/pulp-platform/common_cells.git) +- `cc_lzc` and `cc_rr_arb_tree` from the `common_cells` repository (https://github.com/pulp-platform/common_cells.git) - optional: Divider and square-root unit from the `fpu-div-sqrt-mvp` repository (https://github.com/pulp-platform/fpu_div_sqrt_mvp.git) These two repositories are included in the source code directory as git submodules, use diff --git a/src/fpnew_cast_multi.sv b/src/fpnew_cast_multi.sv index fca5f3b..85f0f46 100644 --- a/src/fpnew_cast_multi.sv +++ b/src/fpnew_cast_multi.sv @@ -275,9 +275,8 @@ module fpnew_cast_multi #( logic [LZC_RESULT_WIDTH:0] renorm_shamt_sgn; // signed form for calculations // Leading-zero counter is needed for renormalization - lzc #( - .WIDTH ( INT_MAN_WIDTH ), - .MODE ( 1 ) // MODE = 1 counts leading zeroes + cc_lzc #( + .Width ( INT_MAN_WIDTH ) ) i_lzc ( .in_i ( encoded_mant ), .cnt_o ( renorm_shamt ), diff --git a/src/fpnew_fma.sv b/src/fpnew_fma.sv index d725a5d..e8b38a1 100644 --- a/src/fpnew_fma.sv +++ b/src/fpnew_fma.sv @@ -503,9 +503,8 @@ module fpnew_fma #( assign sum_lower = sum_q[LOWER_SUM_WIDTH-1:0]; // Leading zero counter for cancellations - lzc #( - .WIDTH ( LOWER_SUM_WIDTH ), - .MODE ( 1 ) // MODE = 1 counts leading zeroes + cc_lzc #( + .Width ( LOWER_SUM_WIDTH ) ) i_lzc ( .in_i ( sum_lower ), .cnt_o ( leading_zero_count ), diff --git a/src/fpnew_fma_multi.sv b/src/fpnew_fma_multi.sv index e232084..1beab4f 100644 --- a/src/fpnew_fma_multi.sv +++ b/src/fpnew_fma_multi.sv @@ -591,9 +591,8 @@ module fpnew_fma_multi #( assign sum_lower = sum_q[LOWER_SUM_WIDTH-1:0]; // Leading zero counter for cancellations - lzc #( - .WIDTH ( LOWER_SUM_WIDTH ), - .MODE ( 1 ) // MODE = 1 counts leading zeroes + cc_lzc #( + .Width ( LOWER_SUM_WIDTH ) ) i_lzc ( .in_i ( sum_lower ), .cnt_o ( leading_zero_count ), diff --git a/src/fpnew_opgroup_block.sv b/src/fpnew_opgroup_block.sv index f03119a..9c31d01 100644 --- a/src/fpnew_opgroup_block.sv +++ b/src/fpnew_opgroup_block.sv @@ -227,14 +227,14 @@ module fpnew_opgroup_block #( output_t arbiter_output; // Round-Robin arbiter to decide which result to use - rr_arb_tree #( + cc_rr_arb_tree #( .NumIn ( NUM_FORMATS ), - .DataType ( output_t ), + .data_t ( output_t ), .AxiVldRdy ( 1'b1 ) ) i_arbiter ( .clk_i, .rst_ni, - .flush_i, + .clr_i ( flush_i ), .rr_i ( '0 ), .req_i ( fmt_out_valid ), .gnt_o ( fmt_out_ready ), diff --git a/src/fpnew_opgroup_multifmt_slice.sv b/src/fpnew_opgroup_multifmt_slice.sv index 0d12950..c984b4b 100644 --- a/src/fpnew_opgroup_multifmt_slice.sv +++ b/src/fpnew_opgroup_multifmt_slice.sv @@ -66,6 +66,7 @@ module fpnew_opgroup_multifmt_slice #( output logic busy_o ); +`ifndef SYNTHESIS if ((OpGroup == fpnew_pkg::DIVSQRT)) begin if ((DivSqrtSel == fpnew_pkg::TH32) && !((FpFmtConfig[0] == 1) && (FpFmtConfig[1:NUM_FORMATS-1] == '0))) begin $fatal(1, "T-Head-based DivSqrt unit supported only in FP32-only configurations. \ @@ -93,6 +94,7 @@ or on 16b inputs producing 32b outputs"); $fatal(1, "MXDOTP requires FP8 to be enabled as a source format. Please enable FP8 in MxFpFmtConfig."); end end +`endif localparam int unsigned MAX_FP_WIDTH = fpnew_pkg::max_fp_width(FpFmtConfig); localparam int unsigned MAX_INT_WIDTH = fpnew_pkg::max_int_width(IntFmtConfig); diff --git a/src/fpnew_sdotp_multi.sv b/src/fpnew_sdotp_multi.sv index a08419c..cad67d1 100644 --- a/src/fpnew_sdotp_multi.sv +++ b/src/fpnew_sdotp_multi.sv @@ -1166,9 +1166,8 @@ module fpnew_sdotp_multi #( assign sum_lower = {(~effective_subtraction_z && sum_carry_z), sum_z}; // Leading zero counter for cancellations - lzc #( - .WIDTH ( LZC_SUM_WIDTH ), - .MODE ( 1 ) // MODE = 1 counts leading zeroes + cc_lzc #( + .Width ( LZC_SUM_WIDTH ) ) i_lzc ( .in_i ( sum_lower ), .cnt_o ( leading_zero_count ), diff --git a/src/fpnew_top.sv b/src/fpnew_top.sv index a483df7..fa63e5b 100644 --- a/src/fpnew_top.sv +++ b/src/fpnew_top.sv @@ -168,15 +168,15 @@ module fpnew_top #( output_t arbiter_output; // Round-Robin arbiter to decide which result to use - rr_arb_tree #( + cc_rr_arb_tree #( .NumIn ( NUM_OPGROUPS ), - .DataType ( output_t ), + .data_t ( output_t ), .AxiVldRdy ( 1'b1 ) ) i_arbiter ( .clk_i, .rst_ni, - .flush_i, - .rr_i ( '0 ), + .clr_i ( flush_i ), + .rr_i ( '0 ), .req_i ( opgrp_out_valid ), .gnt_o ( opgrp_out_ready ), .data_i ( opgrp_outputs ), diff --git a/src/fpu_div_sqrt_mvp b/src/fpu_div_sqrt_mvp index 86e1f55..2d21881 160000 --- a/src/fpu_div_sqrt_mvp +++ b/src/fpu_div_sqrt_mvp @@ -1 +1 @@ -Subproject commit 86e1f558b3c95e91577c41b2fc452c86b04e85ac +Subproject commit 2d21881b17bdb3b30f30cc36e97c7d1a78f98188 diff --git a/src/mxdotp/fpnew_mxdotp_multi_modules.sv b/src/mxdotp/fpnew_mxdotp_multi_modules.sv index 687ae79..b1f6a7a 100644 --- a/src/mxdotp/fpnew_mxdotp_multi_modules.sv +++ b/src/mxdotp/fpnew_mxdotp_multi_modules.sv @@ -814,9 +814,8 @@ module fpnew_mxdotp_normalizer ); // Leading sign counter - lzc #( - .WIDTH ( LZC_SUM_WIDTH ), - .MODE ( 1 ) // MODE = 1 counts leading zeroes + cc_lzc #( + .Width ( LZC_SUM_WIDTH ) ) i_lzc ( .in_i ( sum_magnitude ), .cnt_o ( leading_zero_count ),