Update unpackinput.sv

Program clean up
This commit is contained in:
Harshini Srinath 2023-06-11 17:09:11 -07:00 committed by GitHub
parent c8948dcb29
commit 420ee8dad9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,7 +107,6 @@ module unpackinput import cvw::*; #(parameter cvw_t P) (
// is the exponent all 1's // is the exponent all 1's
assign ExpMax = Fmt ? &In[P.FLEN-2:P.NF] : &In[P.LEN1-2:P.NF1]; assign ExpMax = Fmt ? &In[P.FLEN-2:P.NF] : &In[P.LEN1-2:P.NF1];
end else if (P.FPSIZES == 3) begin // three floating point precsions supported end else if (P.FPSIZES == 3) begin // three floating point precsions supported
// largest format | larger format | smallest format // largest format | larger format | smallest format
@ -247,7 +246,6 @@ module unpackinput import cvw::*; #(parameter cvw_t P) (
2'b10: Sgn = In[P.H_LEN-1]; 2'b10: Sgn = In[P.H_LEN-1];
endcase endcase
// extract the fraction // extract the fraction
always_comb always_comb
case (Fmt) case (Fmt)
@ -266,7 +264,6 @@ module unpackinput import cvw::*; #(parameter cvw_t P) (
2'b10: ExpNonZero = |In[P.H_LEN-2:P.H_NF]; 2'b10: ExpNonZero = |In[P.H_LEN-2:P.H_NF];
endcase endcase
// example double to single conversion: // example double to single conversion:
// 1023 = 0011 1111 1111 // 1023 = 0011 1111 1111
// 127 = 0000 0111 1111 (subtract this) // 127 = 0000 0111 1111 (subtract this)
@ -285,7 +282,6 @@ module unpackinput import cvw::*; #(parameter cvw_t P) (
2'b10: Exp = {In[P.H_LEN-2], {P.Q_NE-P.H_NE{~In[P.H_LEN-2]}}, In[P.H_LEN-3:P.H_NF+1], In[P.H_NF]|~ExpNonZero}; 2'b10: Exp = {In[P.H_LEN-2], {P.Q_NE-P.H_NE{~In[P.H_LEN-2]}}, In[P.H_LEN-3:P.H_NF+1], In[P.H_NF]|~ExpNonZero};
endcase endcase
// is the exponent all 1's // is the exponent all 1's
always_comb always_comb
case (Fmt) case (Fmt)