forked from Github_Repos/cvw
Move Z sign swapping out of unpacker
This commit is contained in:
parent
31be570461
commit
c9890afb7f
@ -253,7 +253,7 @@ module fma2(
|
||||
// Negate Z when doing one of the following opperations:
|
||||
// -prod + Z
|
||||
// prod - Z
|
||||
assign ZSgnEffM = ZSgnM^FOpCtrlE[0]; // Swap sign of Z for subtract
|
||||
assign ZSgnEffM = ZSgnM^FOpCtrlM[0]; // Swap sign of Z for subtract
|
||||
assign InvZ = ZSgnEffM ^ PSgn;
|
||||
|
||||
// Choose an inverted or non-inverted addend - the one is added later
|
||||
|
@ -19,13 +19,11 @@ module unpacking (
|
||||
logic XExpNonzero, YExpNonzero, ZExpNonzero;
|
||||
logic XFracZero, YFracZero, ZFracZero; // input fraction zero
|
||||
logic XExpZero, YExpZero, ZExpZero; // input exponent zero
|
||||
// logic [63:0] Addend; // value to add (Z or zero)
|
||||
logic YExpMaxE, ZExpMaxE; // input exponent all 1s
|
||||
|
||||
// assign Addend = FOpCtrlE[2] ? 64'b0 : Z; // Z is only used in the FMA, and is set to Zero if a multiply opperation
|
||||
assign XSgnE = FmtE ? X[63] : X[31];
|
||||
assign YSgnE = FmtE ? Y[63] : Y[31];
|
||||
assign ZSgnE = FmtE ? Z[63]^FOpCtrlE[0] : Z[31]^FOpCtrlE[0]; // *** Maybe this should be done in the FMA for modularity?
|
||||
assign ZSgnE = FmtE ? Z[63] : Z[31];
|
||||
|
||||
assign XExpE = FmtE ? X[62:52] : {X[30], {3{~X[30]&~XExpZero|XExpMaxE}}, X[29:23]};
|
||||
assign YExpE = FmtE ? Y[62:52] : {Y[30], {3{~Y[30]&~YExpZero|YExpMaxE}}, Y[29:23]};
|
||||
|
Loading…
Reference in New Issue
Block a user