Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change in conditional operator which uses concatenation with parameters to support Riviera-PRO #28

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fpnew_cast_multi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,13 @@ module fpnew_cast_multi #(

localparam logic [EXP_BITS-1:0] QNAN_EXPONENT = '1;
localparam logic [MAN_BITS-1:0] QNAN_MANTISSA = 2**(MAN_BITS-1);

localparam logic [FP_WIDTH-1:0] QNAN = {1'b0, QNAN_EXPONENT, QNAN_MANTISSA};
if (FpFmtConfig[fmt]) begin : active_format
always_comb begin : special_results
logic [FP_WIDTH-1:0] special_res;
special_res = info_q.is_zero
? input_sign_q << FP_WIDTH-1 // signed zero
: {1'b0, QNAN_EXPONENT, QNAN_MANTISSA}; // qNaN
: QNAN; // qNaN

// Initialize special result with ones (NaN-box)
fmt_special_result[fmt] = '1;
Expand Down