OpenCores
URL https://opencores.org/ocsvn/ft816float/ft816float/trunk

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [verilog2/] [dfdiv.sv] - Diff between revs 84 and 86

Show entire file | Details | Blame | View Log

Rev 84 Rev 86
Line 80... Line 80...
);
);
end
end
endgenerate
endgenerate
 
 
reg nz;
reg nz;
reg [N-1:0] zc;
reg [N*2-1:0] zc;
genvar g;
genvar g;
generate begin : glzcnt
generate begin : glzcnt
        for (g = N-1; g >= 0; g = g - 1)
        for (g = N*2-1; g >= 0; g = g - 1)
        always_comb
        always_comb
                zc[g] = qi[g*4+3+N*4:g*4+N*4]==0;
                zc[g] = qi[g*4+3:g*4]==0;
end
end
endgenerate
endgenerate
 
 
integer n;
integer n;
always_comb
always_comb
begin
begin
        nz = 1'b0;
        nz = 1'b0;
        lzcnt = 'd0;
        lzcnt = 'd0;
        for (n = N-1; n >= 0; n = n - 1)
        for (n = N*2-1; n >= 0; n = n - 1)
        begin
        begin
                nz = nz | ~zc[n];
                nz = nz | ~zc[n];
                if (!nz)
                if (!nz)
                        lzcnt = lzcnt + 1;
                        lzcnt = lzcnt + 1;
        end
        end
Line 135... Line 135...
                                        if (dcnt==6'd0)
                                        if (dcnt==6'd0)
                                                st <= DONE;
                                                st <= DONE;
                                end
                                end
                                else
                                else
                                begin
                                begin
                                        ri <= dif;//N[0] ? dif : dif[FPWID+4-1:4];
                                        ri <= dif;
                                        cnt <= cnt + 1'd1;
                                        cnt <= cnt + 1'd1;
                                end
                                end
                        end
                        end
                end
                end
        end
        end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.