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

Subversion Repositories ft816float

[/] [ft816float/] [trunk/] [rtl/] [verilog/] [isqrt.v] - Diff between revs 26 and 28

Show entire file | Details | Blame | View Log

Rev 26 Rev 28
Line 66... Line 66...
        state <= IDLE;
        state <= IDLE;
end
end
else if (ce) begin
else if (ce) begin
        if (!cnt_done)
        if (!cnt_done)
                cnt <= cnt + 8'd1;
                cnt <= cnt + 8'd1;
case(state)
 
IDLE:
 
        if (ld) begin
        if (ld) begin
                cnt <= 8'd0;
                cnt <= 8'd0;
                state <= CALC;
                state <= CALC;
                remLo <= {a,32'h0};
                remLo <= {a,32'h0};
                remHi <= {WID{1'b0}};
                remHi <= {WID{1'b0}};
                root <= {WID{1'b0}};
                root <= {WID{1'b0}};
        end
        end
 
case(state)
CALC:
CALC:
        if (!cnt_done) begin
        if (!cnt_done) begin
                // Shift the remainder low
                // Shift the remainder low
                remLo <= {remLo[WID*2-3:0],2'd0};
                remLo <= {remLo[WID*2-3:0],2'd0};
                // Shift the remainder high
                // Shift the remainder high

powered by: WebSVN 2.1.0

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