From 286e43807ae87d1864b4092f46154e59718b36df Mon Sep 17 00:00:00 2001 From: Cedar Turek Date: Fri, 30 Dec 2022 18:06:35 -0800 Subject: [PATCH] added mux to intdiv result --- pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv b/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv index 82bdf868..e6feaf1b 100644 --- a/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv +++ b/pipelined/src/fpu/fdivsqrt/fdivsqrtpostproc.sv @@ -147,10 +147,11 @@ module fdivsqrtpostproc( end // sign extend result for W64 - if (`XLEN==64) - assign FPIntDivResultM = (W64M ? {{(`XLEN-32){SpecialFPIntDivResultM[31]}}, SpecialFPIntDivResultM[31:0]} : - SpecialFPIntDivResultM[`XLEN-1:0]); // Sign extending in case of W64 - else + if (`XLEN==64) begin + mux2 #(64) resmux(SpecialFPIntDivResultM[`XLEN-1:0], + {{(`XLEN-32){SpecialFPIntDivResultM[31]}}, SpecialFPIntDivResultM[31:0]}, // Sign extending in case of W64 + W64M, FPIntDivResultM); + end else assign FPIntDivResultM = SpecialFPIntDivResultM[`XLEN-1:0]; end endmodule \ No newline at end of file