mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
lza cleanup
This commit is contained in:
parent
c3e9719c99
commit
f56b26ec40
@ -84,8 +84,9 @@ module fma(
|
||||
// ///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
fmaadd add(.Am, .Pm, .Ze, .Pe, .Ps, .As, .KillProd, .ZmSticky, .AmInv, .PmKilled, .NegSum, .InvA, .Sm, .Se, .Ss);
|
||||
|
||||
fmalza lza(.A(AmInv), .Pm({PmKilled, 1'b0, InvA&Ps&ZmSticky&KillProd}), .Cin(InvA & ~(ZmSticky & ~KillProd)), .sub(InvA), .SCnt);
|
||||
|
||||
|
||||
fmalza lza(.A(AmInv[3*`NF+5:0]), .Pm({PmKilled, 1'b0, InvA&Ps&ZmSticky&KillProd}), .Cin(InvA & ~(ZmSticky & ~KillProd)), .sub(InvA), .SCnt);
|
||||
endmodule
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
`include "wally-config.vh"
|
||||
|
||||
module fmalza( // [Schmookler & Nowka, Leading zero anticipation and detection, IEEE Sym. Computer Arithmetic, 2001]
|
||||
input logic [3*`NF+6:0] A, // addend
|
||||
input logic [3*`NF+5:0] A, // addend
|
||||
input logic [2*`NF+3:0] Pm, // product
|
||||
input logic Cin, // carry in
|
||||
input logic sub,
|
||||
@ -45,12 +45,11 @@ module fmalza( // [Schmookler & Nowka, Leading zero anticipation and detection,
|
||||
|
||||
assign B = {{(`NF+2){1'b0}}, Pm}; // Zero extend product
|
||||
|
||||
assign P = A[WIDTH-2:0]^B[WIDTH-2:0];
|
||||
assign G = A[WIDTH-2:0]&B[WIDTH-2:0];
|
||||
assign K= ~A[WIDTH-2:0]&~B[WIDTH-2:0];
|
||||
assign P = A[WIDTH-2:0]^B;
|
||||
assign G = A[WIDTH-2:0]&B;
|
||||
assign K= ~A[WIDTH-2:0]&~B;
|
||||
|
||||
assign Pp1 = {sub, P[WIDTH-2:1]};
|
||||
// assign Pp1 = {A[WIDTH-1], P[WIDTH-2:1]};
|
||||
assign Gm1 = {G[WIDTH-3:0], Cin};
|
||||
assign Km1 = {K[WIDTH-3:0], ~Cin};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user