diff --git a/hw/vendor/patches/pulp_platform_fpnew/0001-fpnew-fix-modelsim-issue-with-reduced-visibility.patch b/hw/vendor/patches/pulp_platform_fpnew/0001-fpnew-fix-modelsim-issue-with-reduced-visibility.patch new file mode 100644 index 000000000..ae036374c --- /dev/null +++ b/hw/vendor/patches/pulp_platform_fpnew/0001-fpnew-fix-modelsim-issue-with-reduced-visibility.patch @@ -0,0 +1,34 @@ +From 62c12c42d1d9865c21ba5492d51ebd79641a43db Mon Sep 17 00:00:00 2001 +From: Luca Bertaccini +Date: Thu, 12 May 2022 18:41:10 +0200 +Subject: [PATCH] fpnew fix modelsim issue with reduced visibility + +--- + src/fpnew_opgroup_multifmt_slice.sv | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/fpnew_opgroup_multifmt_slice.sv b/src/fpnew_opgroup_multifmt_slice.sv +index 2f31f50..2245b39 100644 +--- a/src/fpnew_opgroup_multifmt_slice.sv ++++ b/src/fpnew_opgroup_multifmt_slice.sv +@@ -342,7 +342,7 @@ module fpnew_opgroup_multifmt_slice #( + assign lane_out_valid[lane] = out_valid & ((lane == 0) | result_is_vector); + + // Properly NaN-box or sign-extend the slice result if not in use +- assign local_result = lane_out_valid[lane] ? op_result : '{default: lane_ext_bit[0]}; ++ assign local_result = lane_out_valid[lane] ? op_result : {(LANE_WIDTH){lane_ext_bit[0]}}; + assign lane_status[lane] = lane_out_valid[lane] ? op_status : '0; + + // Otherwise generate constant sign-extension +@@ -352,7 +352,7 @@ module fpnew_opgroup_multifmt_slice #( + assign lane_aux[lane] = 1'b0; // unused lane + assign lane_tags[lane] = 1'b0; // unused lane + assign lane_ext_bit[lane] = 1'b1; // NaN-box unused lane +- assign local_result = '{default: lane_ext_bit[0]}; // sign-extend/nan box ++ assign local_result = {(LANE_WIDTH){lane_ext_bit[0]}}; // sign-extend/nan box + assign lane_status[lane] = '0; + assign lane_busy[lane] = 1'b0; + end +-- +2.16.5 + diff --git a/hw/vendor/pulp_platform_fpnew.vendor.hjson b/hw/vendor/pulp_platform_fpnew.vendor.hjson index 69100945f..eab14f0a3 100644 --- a/hw/vendor/pulp_platform_fpnew.vendor.hjson +++ b/hw/vendor/pulp_platform_fpnew.vendor.hjson @@ -10,6 +10,8 @@ rev: "feature/expanding_dotp", }, + patch_dir: "patches/pulp_platform_fpnew", + exclude_from_upstream: [ "src/common_cells", "src/fpu_div_sqrt_mvp", diff --git a/hw/vendor/pulp_platform_fpnew/src/fpnew_opgroup_multifmt_slice.sv b/hw/vendor/pulp_platform_fpnew/src/fpnew_opgroup_multifmt_slice.sv index 2f31f5009..2245b3993 100644 --- a/hw/vendor/pulp_platform_fpnew/src/fpnew_opgroup_multifmt_slice.sv +++ b/hw/vendor/pulp_platform_fpnew/src/fpnew_opgroup_multifmt_slice.sv @@ -342,7 +342,7 @@ module fpnew_opgroup_multifmt_slice #( assign lane_out_valid[lane] = out_valid & ((lane == 0) | result_is_vector); // Properly NaN-box or sign-extend the slice result if not in use - assign local_result = lane_out_valid[lane] ? op_result : '{default: lane_ext_bit[0]}; + assign local_result = lane_out_valid[lane] ? op_result : {(LANE_WIDTH){lane_ext_bit[0]}}; assign lane_status[lane] = lane_out_valid[lane] ? op_status : '0; // Otherwise generate constant sign-extension @@ -352,7 +352,7 @@ module fpnew_opgroup_multifmt_slice #( assign lane_aux[lane] = 1'b0; // unused lane assign lane_tags[lane] = 1'b0; // unused lane assign lane_ext_bit[lane] = 1'b1; // NaN-box unused lane - assign local_result = '{default: lane_ext_bit[0]}; // sign-extend/nan box + assign local_result = {(LANE_WIDTH){lane_ext_bit[0]}}; // sign-extend/nan box assign lane_status[lane] = '0; assign lane_busy[lane] = 1'b0; end